提交 7ea0dcaf 编写于 作者: yi.li's avatar yi.li

Merge branch 'dev-followUp-20190312' of...

Merge branch 'dev-followUp-20190312' of 192.168.110.53:com.pica.cloud.education.frontend/pica.cloud.web-education-admin into dev-followUp-20190312
...@@ -95,15 +95,9 @@ export default { ...@@ -95,15 +95,9 @@ export default {
// 获取用户权限 // 获取用户权限
getUserAuth(token) { getUserAuth(token) {
let req = null let req = null
if(localStorage.getItem('storageToken')) {
req = {
token: localStorage.getItem('storageToken')
}
} else {
req = { req = {
token: token token: token
} }
}
vm.GET('common/v1/role',req).then((res) => { vm.GET('common/v1/role',req).then((res) => {
if(res.code == '000000') { if(res.code == '000000') {
vm.changeIdType(res.data.idType) vm.changeIdType(res.data.idType)
......
...@@ -8,6 +8,7 @@ const createComponent = r => require.ensure([], () => r(require('../views/educat ...@@ -8,6 +8,7 @@ const createComponent = r => require.ensure([], () => r(require('../views/educat
const roleManager = r => require.ensure([], () => r(require('../views/system/role.vue')),'role') const roleManager = r => require.ensure([], () => r(require('../views/system/role.vue')),'role')
const addManager = r => require.ensure([], () => r(require('../views/education/add-manager.vue')), 'add-manager') const addManager = r => require.ensure([], () => r(require('../views/education/add-manager.vue')), 'add-manager')
const itemRole = r => require.ensure([], () => r(require('../views/system/item-role.vue')), 'item-role') const itemRole = r => require.ensure([], () => r(require('../views/system/item-role.vue')), 'item-role')
const tree = r => require.ensure([], () => r(require('../views/education/tree.vue')), 'tree')
import followRouters from './follow' import followRouters from './follow'
...@@ -45,6 +46,9 @@ export default [{ ...@@ -45,6 +46,9 @@ export default [{
},{ },{
path: '/item-role', path: '/item-role',
component: itemRole component: itemRole
},{
path: '/tree',
component: tree
}, },
followRouters, followRouters,
] ]
......
import * as types from './mutations-types'
export const changeToken = ({commit}, data) => {
commit(types.TOKEN, data)
}
export const changeIdType = ({commit}, data) => {
commit(types.ID_TYPE, data)
}
\ No newline at end of file
export const _token = state => state._token
export const idType = state => state.idType const getters = {
_token: state => state.common._token,
idType: state => state.common.idType
}
export default getters
import Vue from 'vue' import Vue from 'vue'
import Vuex from 'vuex' import Vuex from 'vuex'
import * as actions from './actions' import common from './modules/common'
import * as getters from './getters' //随访
import state from './state' import followModules from './modules/followup/index'
import mutations from './mutations'
import getters from './getters'
Vue.use(Vuex) Vue.use(Vuex)
export default new Vuex.Store({ export default new Vuex.Store({
actions, modules: {
getters, common,
state, ...followModules
mutations, },
getters
}) })
const common = {
state: {
_token: '',
idType: ''
},
mutations: {
CHANGE_TOKEN: (state, data) => {
state._token = data
},
CHANGE_IDTYPE: (state, data) => {
state.idType = data
}
},
actions: {
changeToken({ commit }, tokenData) {
commit('CHANGE_TOKEN', tokenData)
},
changeIdType({ commit }, idTypeData) {
commit('CHANGE_IDTYPE', idTypeData)
}
}
}
export default common
\ No newline at end of file
import planManage from './planManage'
const followModules = {
planManage
}
export default followModules
import followApi from '../../../utils/followup/followapis'
export default {
namespaced: true,
state: {
residentList: { //居民列表
pageNum: 1, //当前页码
pageSize: 10, //每页数据大小
total: null, //总数
},
groupList: [], //分组列表
},
mutations: {
GET_RESIDENT_LIST(state, payload) {
state.residentList = payload
},
GET_GROUP_LIST(state, payload) {
state.groupList = payload.labelDtoList
}
},
actions: {
getResidentList(context, payload) {
const { pageSize, pageNum } = context.state.residentList;
followApi.getResidentList({
pageSize,
pageNum,
...payload
}).then(({data}) => {
context.commit('GET_RESIDENT_LIST', data);
});
},
getGroupList(context, payload) {
followApi.getGroupList({}).then(({data}) => {
context.commit('GET_GROUP_LIST', data);
});
}
},
}
export const TOKEN = 'TOKEN'
export const ID_TYPE = 'ID_TYPE'
\ No newline at end of file
import * as types from './mutations-types'
const mutations = {
[types.TOKEN](state, tokenData) {
state._token = tokenData
},
[types.ID_TYPE](state, idTypeData) {
state.idType = idTypeData
}
}
export default mutations
\ No newline at end of file
const state = {
_token: '',
idType: ''
}
export default state
\ No newline at end of file
...@@ -6,65 +6,52 @@ export const envConfig = { ...@@ -6,65 +6,52 @@ export const envConfig = {
// baseUrl: 'https://dev-sc.yunqueyi.com/', // baseUrl: 'https://dev-sc.yunqueyi.com/',
// // baseUrl: 'http://10.177.15.180:10202/', // // baseUrl: 'http://10.177.15.180:10202/',
// // baseUrl: 'http://192.168.140.14:10201/', // // baseUrl: 'http://192.168.140.14:10201/',
// apiUrl: 'https://dev-api.yunqueyi.com/',
// webPageUrl: 'https://dev-phome.yunqueyi.com/',
// baseUrl: 'https://test1-sc.yunqueyi.com/', // baseUrl: 'https://test1-sc.yunqueyi.com/',
// apiUrl: 'https://test1-api.yunqueyi.com/',
// webPageUrl: 'https://test1-phome.yunqueyi.com/'
//baseUrl: 'https://uat-sc.yunqueyi.com/', //baseUrl: 'https://uat-sc.yunqueyi.com/',
baseUrl: 'http://192.168.110.226:11905/portal/', baseUrl: 'http://localhost:11905/portal/',
apiUrl: 'https://uat-api.yunqueyi.com/',
webPageUrl: 'https://uat-phome.yunqueyi.com/',
qiniuUrl: "http://localhost:10201/contents/admin/qiniu/token",
qiniuFileUrl: "http://localhost:10201/contents/admin/qiniu/token1", qiniuFileUrl: "http://localhost:10201/contents/admin/qiniu/token1",
qiniuResourceUrl: "https://test1-videos.yunqueyi.com", qiniuResourceUrl: "https://test1-videos.yunqueyi.com",
qiniuImgUrl: "https://test1-file.yunqueyi.com", qiniuImgUrl: "https://test1-file.yunqueyi.com",
loginUrl: 'https://dev-saas.yunqueyi.com/pica-login/work_station.html', loginUrl: 'https://dev-saas.yunqueyi.com/pica-login/work_station.html',
innerLoginUrl: 'http://localhost:8090/PICA_SSO_FE/html/pica_login.html' innerLoginUrl: 'http://localhost:8090/PICA_SSO_FE/html/pica_login.html',
followUpApi: '',
followUpApiSoSoApi:'http://sosoapi.yunqueyi.com/sosoapi-web/pass/mock/73'
}, },
dev: { dev: {
baseUrl: 'https://dev-sc.yunqueyi.com/portal/', baseUrl: 'https://dev-sc.yunqueyi.com/portal/',
apiUrl: 'https://dev-api.yunqueyi.com/', qiniuFileUrl: "https://dev-sc.yunqueyi.com/contents/admin/qiniu/token1",
webPageUrl: 'https://dev-phome.yunqueyi.com/',
qiniuUrl: "http://localhost:11905/contents/admin/qiniu/token",
qiniuFileUrl: "http://localhost:11905/contents/admin/qiniu/token1",
qiniuResourceUrl: "https://test1-videos.yunqueyi.com", qiniuResourceUrl: "https://test1-videos.yunqueyi.com",
qiniuImgUrl: "https://test1-file.yunqueyi.com", qiniuImgUrl: "https://test1-file.yunqueyi.com",
loginUrl: 'https://dev-saas.yunqueyi.com/pica-login/work_station.html', loginUrl: 'https://dev-saas.yunqueyi.com/pica-login/work_station.html',
innerLoginUrl: 'https://dev-sso.yunqueyi.com/PICA_SSO_FE/html/pica_login.html' innerLoginUrl: 'https://dev-sso.yunqueyi.com/PICA_SSO_FE/html/pica_login.html',
followUpApi: '',
}, },
test: { test: {
baseUrl: 'https://test1-sc.yunqueyi.com/portal/', baseUrl: 'https://test1-sc.yunqueyi.com/portal/',
apiUrl: 'https://test1-api.yunqueyi.com/',
webPageUrl: 'https://test1-phome.yunqueyi.com/',
qiniuUrl: "https://test1-sc.yunqueyi.com/contents/admin/qiniu/token",
qiniuFileUrl: "https://test1-sc.yunqueyi.com/contents/admin/qiniu/token1", qiniuFileUrl: "https://test1-sc.yunqueyi.com/contents/admin/qiniu/token1",
qiniuResourceUrl: "https://test1-videos.yunqueyi.com", qiniuResourceUrl: "https://test1-videos.yunqueyi.com",
qiniuImgUrl: "https://test1-file.yunqueyi.com", qiniuImgUrl: "https://test1-file.yunqueyi.com",
loginUrl: 'https://test1-saas.yunqueyi.com/pica-login/work_station.html', loginUrl: 'https://test1-saas.yunqueyi.com/pica-login/work_station.html',
innerLoginUrl: 'https://test1-sso.yunqueyi.com/PICA_SSO_FE/html/pica_login.html' innerLoginUrl: 'https://test1-sso.yunqueyi.com/PICA_SSO_FE/html/pica_login.html',
followUpApi: '',
}, },
uat: { uat: {
baseUrl: 'https://uat-sc.yunqueyi.com/portal/', baseUrl: 'https://uat-sc.yunqueyi.com/portal/',
apiUrl: 'https://uat-api.yunqueyi.com/',
webPageUrl: 'https://uat-phome.yunqueyi.com/',
qiniuUrl: "https://uat-sc.yunqueyi.com/contents/admin/qiniu/token",
qiniuFileUrl: "https://uat-sc.yunqueyi.com/contents/admin/qiniu/token1", qiniuFileUrl: "https://uat-sc.yunqueyi.com/contents/admin/qiniu/token1",
qiniuResourceUrl: "https://videos.yunqueyi.com", // 视频 qiniuResourceUrl: "https://videos.yunqueyi.com", // 视频
qiniuImgUrl: "https://file.yunqueyi.com", qiniuImgUrl: "https://file.yunqueyi.com",
loginUrl: 'https://uat-saas.yunqueyi.com/pica-login/work_station.html', loginUrl: 'https://uat-saas.yunqueyi.com/pica-login/work_station.html',
innerLoginUrl: 'https://uat-sso.yunqueyi.com/PICA_SSO_FE/html/pica_login.html' innerLoginUrl: 'https://uat-sso.yunqueyi.com/PICA_SSO_FE/html/pica_login.html',
followUpApi: '',
}, },
pro: { pro: {
baseUrl: 'https://sc.yunqueyi.com/portal/', baseUrl: 'https://sc.yunqueyi.com/portal/',
apiUrl: 'https://api.yunqueyi.com/',
webPageUrl: 'https://phome.yunqueyi.com/',
qiniuUrl: "https://sc.yunqueyi.com/contents/admin/qiniu/token",
qiniuFileUrl: "https://sc.yunqueyi.com/contents/admin/qiniu/token1", qiniuFileUrl: "https://sc.yunqueyi.com/contents/admin/qiniu/token1",
qiniuResourceUrl: "https://videos.yunqueyi.com", qiniuResourceUrl: "https://videos.yunqueyi.com",
qiniuImgUrl: "https://file.yunqueyi.com", qiniuImgUrl: "https://file.yunqueyi.com",
loginUrl: 'https://saas.yunqueyi.com/pica-login/work_station.html', loginUrl: 'https://saas.yunqueyi.com/pica-login/work_station.html',
innerLoginUrl: 'https://sso.yunqueyi.com/PICA_SSO_FE/html/pica_login.html' innerLoginUrl: 'https://sso.yunqueyi.com/PICA_SSO_FE/html/pica_login.html',
followUpApi: '',
} }
} }
import axios from '../fetch'; import fetch from '../fetch';
import { getFollowUpApi } from '@/utils/index'
import utils from './followupUtils'; import utils from './followupUtils';
/*计划管理API*/ /*计划管理API*/
const planManageApi = [ const planManageApi = [
{ {
url: '/followup/planPatient', url: '/followup/planPatient/',
method: 'GET', method: 'get',
params: 'params', params: 'params',
name: 'getApproveList', name: 'getResidentList',
description: '获取居民列表', description: '获取居民列表',
}, },
{
url: '/followup/planPatient/group',
method: 'get',
params: 'params',
name: 'getGroupList',
description: '获取分组列表',
},
] ]
const api = {}; const api = {};
const apis = [...planManageApi]; const apis = [...planManageApi];
apis.forEach(item => api[item.name] = (params = {}, extraConfig = {}) => { apis.forEach(item => api[item.name] = (params = {}, extraConfig = {}) => {
const config = { const config = {
url: item.url, url: getFollowUpApi(item.url),
method: item.method, method: item.method,
}; };
if (extraConfig.urlSuffix) { // 需要做URL拼接的情况(比如*.do/2),,,可以根据自己的实际情况进行扩展 if (extraConfig.urlSuffix) { // 需要做URL拼接的情况(比如*.do/2),,,可以根据自己的实际情况进行扩展
config.url = `${config.url}${extraConfig.urlSuffix}`; config.url = `${config.url}${extraConfig.urlSuffix}`;
//something else //something else
...@@ -33,21 +45,15 @@ apis.forEach(item => api[item.name] = (params = {}, extraConfig = {}) => { ...@@ -33,21 +45,15 @@ apis.forEach(item => api[item.name] = (params = {}, extraConfig = {}) => {
} else { } else {
config.params = filterParams; config.params = filterParams;
} }
/*utils.MSG.$emit('axios:begin', item.url);*/ /*utils.MSG.$emit('axios:begin', item.url);*/
return axios({ return fetch({
...config, ...config,
...extraConfig, ...extraConfig,
}).then(res => { }).then(res => {
return Promise.resolve(res); return Promise.resolve(res);
}).catch(err => { }).catch(err => {
return Promise.resolve({ // 请务必根据data判断 return Promise.resolve(err);
data: {
code: 222222, // exception 专用
msg: 'axios:error',
err,
message: err
},
});
}); });
}); });
......
...@@ -146,20 +146,7 @@ export function getBaseUrl(url) { ...@@ -146,20 +146,7 @@ export function getBaseUrl(url) {
return getConfigByEnvType('baseUrl') + url return getConfigByEnvType('baseUrl') + url
} }
// 获取API服务器域名地址
export function getApiUrl(url) {
return getConfigByEnvType('apiUrl') + url
}
// 获取WEB部署服务器域名地址
export function getWebPageUrl(url) {
return getConfigByEnvType('webPageUrl') + url
}
// 获取七牛token // 获取七牛token
export function getQiniuToken() {
return getConfigByEnvType('qiniuUrl')
}
export function getQiniuToken1() { export function getQiniuToken1() {
return getConfigByEnvType('qiniuFileUrl') return getConfigByEnvType('qiniuFileUrl')
} }
...@@ -179,9 +166,14 @@ export function uploadVideo() { ...@@ -179,9 +166,14 @@ export function uploadVideo() {
export function uploadImg() { export function uploadImg() {
return getConfigByEnvType('qiniuImgUrl') return getConfigByEnvType('qiniuImgUrl')
} }
// 获取随访服务器域名地址
export function getFollowUpApi(url) {
return getConfigByEnvType('followUpApiSoSoApi') + url //当前使用sosoapi mock数据
}
// 根据不同环境,生成URL // 根据不同环境,生成URL
function getConfigByEnvType(urlType) { function getConfigByEnvType(urlType) {
return envConfig[process.env.BUILD_ENV][urlType] return envConfig[process.env.BUILD_ENV][urlType]
} }
import fetch from '@/utils/fetch' import fetch from '@/utils/fetch'
import { getBaseUrl, getApiUrl } from '@/utils/index' import { getBaseUrl } from '@/utils/index'
module.exports = { module.exports = {
data: function () { data: function () {
...@@ -175,27 +175,6 @@ module.exports = { ...@@ -175,27 +175,6 @@ module.exports = {
}) })
}, },
// 通用GET请求
API_GET(api, para, callback) {
para.token = para.token || this.token || '00175A13D70D4234822D90AC3C74202C' //'AF3DFCF2DD4B4115AC47ACA25D5420E9''F90DF48D3EFA49DFAE1267A67DBEFB18'//token
let url = api + this.getUrlPara(para)
return fetch({
url: getApiUrl(url),
method: 'get',
data: para
})
},
// 通用POST请求
API_POST(api, para, callback) {
para.token = para.token || this.token || '00175A13D70D4234822D90AC3C74202C' //'AF3DFCF2DD4B4115AC47ACA25D5420E9''F90DF48D3EFA49DFAE1267A67DBEFB18'//token
return fetch({
url: getApiUrl(api),
method: 'post',
data: para
})
},
// 从html参数 // 从html参数
getUrlKey(name) { getUrlKey(name) {
if (decodeURIComponent && location.href) { if (decodeURIComponent && location.href) {
...@@ -219,7 +198,7 @@ module.exports = { ...@@ -219,7 +198,7 @@ module.exports = {
} }
} }
return null return null
}, }
} }
} }
import {isEmptyUtils, isNotEmptyUtils, subString} from "./utils"; import {isEmptyUtils, isNotEmptyUtils, subString} from "./utils";
import fetchQiniu from './fetchQiniu.js'; import fetchQiniu from './fetchQiniu.js';
import { getQiniuToken, getQiniuToken1, uploadVideo, uploadImg } from './index' import { getQiniuToken1, uploadVideo, uploadImg } from './index'
// let apiUrl = localStorage.getItem("qiniuUrl");
// let fileApiUrl = localStorage.getItem("qiniuFileUrl");
let apiUrl = getQiniuToken()
let fileApiUrl = getQiniuToken1() let fileApiUrl = getQiniuToken1()
//该对象有一个 unsubscribe 方法取消订阅,同时终止上传行为。 //该对象有一个 unsubscribe 方法取消订阅,同时终止上传行为。
let subscription = null; let subscription = null;
...@@ -82,32 +78,6 @@ export const createFilePath = (file, fileName) => { ...@@ -82,32 +78,6 @@ export const createFilePath = (file, fileName) => {
return filePath; return filePath;
}; };
/**
* 获取七牛上传凭证
*
* @return {Promise} token 七牛上传凭证
* */
const doQiniuAction = () => {
console.log('send---'+apiUrl);
return new Promise(function (resolve, reject) {
fetchQiniu(apiUrl,{}, 'GET').then(function (result) {
let token = null;
if (isNotEmptyUtils(result) && result.code == "000000") {
token = result.data.qiniuToken;
resolve(token);
console.log('七牛临时授权成功');
localStorage.setItem('qiniuToken',token);
} else {
reject(result);
console.error('七牛临时授权失败:', result);
}
}).catch(function (error) {
reject();
console.error('七牛临时授权失败:', error);
});
});
};
/** /**
* 获取七牛上传凭证 * 获取七牛上传凭证
* *
......
此差异已折叠。
...@@ -306,7 +306,7 @@ export default { ...@@ -306,7 +306,7 @@ export default {
message: "ID为:" + row.id + "的项目删除成功" message: "ID为:" + row.id + "的项目删除成功"
}); });
this.loading = true; this.loading = true;
that.getProjectList(); vm.getProjectList();
} }
}); });
}, },
......
<template>
<div>
<el-tree
:data="data2"
show-checkbox
default-expand-all
node-key="id"
ref="tree"
highlight-current
:props="defaultProps"
@check="onChecked"
></el-tree>
<!-- <base1
:data="data2"
show-checkbox
default-expand-all
node-key="id"
ref="tree"
highlight-current
:props="defaultProps"
></base1>-->
<span></span>
<div class="buttons">
<el-button @click="getCheckedNodes">通过 node 获取</el-button>
<el-button @click="getCheckedKeys">通过 key 获取</el-button>
<el-button @click="setCheckedNodes">通过 node 设置</el-button>
<el-button @click="setCheckedKeys">通过 key 设置</el-button>
<el-button @click="resetChecked">清空</el-button>
</div>
</div>
</template>
<script>
import { ELTree1 } from "element-ui/lib/checkbox";
// import Vue from 'vue'
// require("element-ui/lib/checkbox"
export default {
// components: {
// base1
// },
mounted() {
// const base1 = Vue.extend(ELTree)
// Vue.component('base1', base1)
},
data() {
return {
data2: [
{
id: 11,
label: "一级 1",
children: [
{
id: 1,
label: "一级 1",
children: [
{
id: 4,
label: "二级 1-1",
children: [
{
id: 9,
label: "三级 1-1-1"
},
{
id: 10,
label: "三级 1-1-2"
}
]
}
]
},
{
id: 2,
label: "一级 2",
children: [
{
id: 5,
label: "二级 2-1"
},
{
id: 6,
label: "二级 2-2"
}
]
},
{
id: 3,
label: "一级 3",
children: [
{
id: 7,
label: "二级 3-1"
},
{
id: 8,
label: "二级 3-2"
}
]
}
]
}
],
defaultProps: {
children: "children",
label: "label"
}
};
},
methods: {
getCheckedNodes() {
console.log(this.$refs.tree.getCheckedNodes());
},
getCheckedKeys() {
console.log(this.$refs.tree.getCheckedKeys());
},
setCheckedNodes() {
this.$refs.tree.setCheckedNodes([
{
id: 5,
label: "二级 2-1"
},
{
id: 9,
label: "三级 1-1-1"
}
]);
},
setCheckedKeys() {
this.$refs.tree.setCheckedKeys([3]);
},
resetChecked() {
this.$refs.tree.setCheckedKeys([]);
},
onChecked() {
let cData = [],
oldData = (this.data2.length && this.data2.slice()) || [],
checkedKeys = this.$refs.tree.getCheckedKeys(),
halfCheckedKeys = this.$refs.tree.getHalfCheckedKeys(),
savedCheckedKeys = this.handlerCheckedData(oldData, checkedKeys).map(
key => {
return { type: 2, key: key };
}
),
savedHalfCheckedKeys = halfCheckedKeys.map(key => {
return { type: 1, key: key };
}),
allSelectedKeys = savedCheckedKeys.concat(savedHalfCheckedKeys);
console.log("treeData", this.data2);
console.log(allSelectedKeys);
},
// 递归删除列表中所有子节点
delSubKeysByNode(node, checkedKeys) {
let idIndex;
if (node.children && node.children.length) {
if (node.children && node.children.length) {
node.children.forEach(elm => {
idIndex = checkedKeys.findIndex(id => {
return id === elm.id;
});
if (idIndex > -1) {
checkedKeys.splice(idIndex, 1);
}
if (elm.children && elm.children.length) {
this.delSubKeysByNode(elm, checkedKeys);
}
});
}
}
},
// 去除子节点
handlerCheckedData(oldData, checkedKeys) {
oldData.forEach(element => {
for (let i = 0; i < checkedKeys.length; i++) {
// 如果此节点被选中,则删除所有子节点
if (element.id === checkedKeys[i]) {
this.delSubKeysByNode(element, checkedKeys);
} else {
if (element.children && element.children.length) {
this.handlerCheckedData(element.children, checkedKeys);
}
}
}
});
return checkedKeys;
}
}
};
</script>
\ No newline at end of file
...@@ -10,48 +10,47 @@ ...@@ -10,48 +10,47 @@
<p class="page-title">随访计划名称</p> <p class="page-title">随访计划名称</p>
<div class="search-div"> <div class="search-div">
<div class="search-input"> <div class="search-input">
<el-form :model="searchData" :inline="true" :label-width="labelWidth"> <el-form :model="searchData" ref="searchData" :inline="true" :label-width="labelWidth">
<el-form-item label="姓名:"> <el-form-item label="姓名:" prop="patientName">
<el-input v-model="searchData.residentName" placeholder="请输入姓名"></el-input> <el-input v-model="searchData.patientName" placeholder="请输入姓名"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="手机号:"> <el-form-item label="手机号:" prop="mobile">
<el-input v-model="searchData.phoneNumber" placeholder="请输入手机号"></el-input> <el-input v-model="searchData.mobile" placeholder="请输入手机号"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="分组:"> <el-form-item label="分组:" prop="labelId">
<el-select v-model="searchData.group" > <el-select v-model="searchData.labelId" >
<el-option <el-option
v-for="item in groupOption" v-for="item in groupList"
:key="item.value" :key="item.labelId"
:label="item.label" :label="item.labelName"
:value="item.value"> :value="item.labelId">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="随访开始时间:"> <el-form-item label="随访开始时间:" prop="startDate">
<el-select v-model="searchData.startTime"> <el-date-picker
<el-option v-model="searchData.startDate"
v-for="item in groupOption" type="datetime"
:key="item.value" format="yyyy-MM-dd hh:mm:ss"
:label="item.label" value-format="yyyy-MM-dd hh:mm:ss"
:value="item.value"> placeholder="选择随访开始时间">
</el-option> </el-date-picker>
</el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<div class="search-btn"> <div class="search-btn">
<el-button class="button-green" type="primary">查询</el-button> <el-button class="button-green" type="primary" @click="searchResidentList">查询</el-button>
<el-button class="button-white" plain>重置</el-button> <el-button class="button-white" plain @click="resetSearchData('searchData')">重置</el-button>
</div> </div>
</div> </div>
<div class="resident-table table-content"> <div class="resident-table table-content">
<el-radio-group v-model="tableType"> <el-radio-group v-model="status">
<el-radio-button label="0">未完成(200)</el-radio-button> <el-radio-button label="0">未完成({{residentList.notCount}})</el-radio-button>
<el-radio-button label="1">进行中(200)</el-radio-button> <el-radio-button label="1">进行中({{residentList.handCount}})</el-radio-button>
<el-radio-button label="2">已结束(100)</el-radio-button> <el-radio-button label="2">已结束({{residentList.yesCount}})</el-radio-button>
</el-radio-group> </el-radio-group>
<el-table <el-table
:data="residentData" :data="residentList.fPlanPatientInfoDtoList"
center center
style="width: 100%;margin-top: 20px;"> style="width: 100%;margin-top: 20px;">
<el-table-column <el-table-column
...@@ -98,14 +97,14 @@ ...@@ -98,14 +97,14 @@
</el-table> </el-table>
<el-pagination <el-pagination
background background
v-if="residentData.length" v-if="residentList.fPlanPatientInfoDtoList"
@size-change="handleSizeChangePre" @size-change="handleSizeChangePre"
@current-change="handleCurrentChangePre" @current-change="handleCurrentChangePre"
layout="total, sizes, prev, pager, next, jumper" layout="total, sizes, prev, pager, next, jumper"
:current-page="pageNum" :current-page="residentList.pageNum"
:page-sizes="[100, 200, 300, 400]" :page-sizes="[10, 20, 50, 100]"
:page-size="pageSize" :page-size="residentList.pageSize"
:total="total"> :total="residentList.total">
</el-pagination> </el-pagination>
</div> </div>
</div> </div>
...@@ -113,8 +112,9 @@ ...@@ -113,8 +112,9 @@
</template> </template>
<script> <script>
import api from '../../../utils/followup/followapis';
import BreadCrumb from '@/components/breadcrumb' import BreadCrumb from '@/components/breadcrumb'
import { mapState, mapActions } from 'vuex'
export default { export default {
name: "residentList", name: "residentList",
components: { components: {
...@@ -134,39 +134,56 @@ ...@@ -134,39 +134,56 @@
value: '全部', value: '全部',
label: '全部' label: '全部'
}], }],
tableType: 0, //列表筛选条件 status: 0, //列表筛选条件
residentData: [
{
"patientId": "居民ID",
"patientName": "居民姓名",
"sex": "性别",
"sexName": "性别名字",
"time": "随访开始时间",
"labelId": "分组ID",
"labelName": "分组名字"
}
], //居民列表
pageNum: 1,
pageSize: 15,
total: 100,
} }
}, },
created() { created() {
console.log('api',api)
},
mounted() {
this.getResidentList();
this.getGroupList(); //获取分组列表
},
computed: {
...mapState('planManage',{
residentList: state => state.residentList,
groupList: state => state.groupList
})
}, },
mounted() {},
methods: { methods: {
handleSizeChangePre() { ...mapActions('planManage', ['getResidentList', 'getGroupList']),
handleSizeChangePre(pageSize) {
this.getResidentList({
pageSize,
status: this.status
})
}, },
handleCurrentChangePre() { handleCurrentChangePre(pageNum) {
this.getResidentList({
pageNum,
status: this.status
})
}, },
goPatientDetail(patientId) { //居民详情页 goPatientDetail(patientId) { //居民详情页
alert(1+patientId)
this.$router.push('/followup/plan-manage/resident-detail') this.$router.push('/followup/plan-manage/resident-detail')
},
searchResidentList() { //查询居民列表
this.getResidentList({
...this.searchData,
status: this.status
})
},
resetSearchData(formName) {
this.$refs[formName].resetFields();
}
},
watch: {
status(val) {
this.getResidentList({
status: val,
...this.searchData
})
} }
} }
} }
...@@ -176,10 +193,4 @@ ...@@ -176,10 +193,4 @@
@import '../../../style/followup/followup-common'; @import '../../../style/followup/followup-common';
@import '../../../style/followup/element-reset.css'; @import '../../../style/followup/element-reset.css';
.resident-list {
.resident-content {
}
}
</style> </style>
...@@ -66,6 +66,9 @@ ...@@ -66,6 +66,9 @@
prop="patientName" prop="patientName"
label="姓名" label="姓名"
align="center"> align="center">
<template slot-scope="scope">
<el-button type="text" @click="goPatientDetail(scope.row.patientId)" >{{scope.row.patientName}}</el-button>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="sexName" prop="sexName"
...@@ -141,7 +144,15 @@ ...@@ -141,7 +144,15 @@
}], }],
tableType: 0, //列表筛选条件 tableType: 0, //列表筛选条件
reservationData: [ reservationData: [
{
"patientId": "居民ID",
"patientName": "居民姓名",
"sex": "性别",
"sexName": "性别名字",
"time": "随访开始时间",
"labelId": "分组ID",
"labelName": "分组名字"
}
], //居民列表 ], //居民列表
pageNum: 1, pageNum: 1,
pageSize: 15, pageSize: 15,
......
...@@ -59,24 +59,7 @@ export default { ...@@ -59,24 +59,7 @@ export default {
spanSecondNum: 12, spanSecondNum: 12,
tableData: [], tableData: [],
count: 0, count: 0,
messageList:[ messageList:[]
// {
// menuName: '审核提醒',
// type: 1,
// portalTime: '2019-01-02',
// content: '王小波创建了"浙江省2019高血压第一季度考试"项目,提醒您审核。'
// },{
// menuName: '审核未通过',
// type: 2,
// portalTime: '2019-01-02',
// content: '王小波创建了"浙江省2019高血压第一季度考试"项目,提醒您审核。'
// },{
// menuName: '审核通过',
// type: 3,
// portalTime: '2019-01-02',
// content: '王小波创建了"浙江省2019高血压第一季度考试"项目,提醒您审核。'
// }
]
} }
}, },
created() { created() {
......
...@@ -57,6 +57,11 @@ export default { ...@@ -57,6 +57,11 @@ export default {
title: '项目管理', title: '项目管理',
icon: 'el-icon-setting', icon: 'el-icon-setting',
index: 'item-manager' index: 'item-manager'
},
{
title: '树',
icon: 'el-icon-setting',
index: 'tree'
} }
] ]
},{ },{
......
...@@ -48,10 +48,12 @@ let treeData = [ ...@@ -48,10 +48,12 @@ let treeData = [
id: 11, id: 11,
name: "一级 1", name: "一级 1",
label: "一级 1", label: "一级 1",
isLeaf: "true",
children: [ children: [
{ {
id: 1, id: 1,
label: "一级 1", label: "一级 1",
isLeaf: "true",
children: [ children: [
{ {
id: 4, id: 4,
...@@ -75,14 +77,21 @@ let treeData = [ ...@@ -75,14 +77,21 @@ let treeData = [
children: [ children: [
{ {
id: 5, id: 5,
label: "二级 2-1" label: "二级 2-1",
children: [],
}, },
{ {
id: 6, id: 6,
label: "二级 2-2" label: "二级 2-2",
isLeaf: false,
} }
] ]
}, },
{
id: 4,
label: "一级 4",
isLeaf: false,
},
{ {
id: 3, id: 3,
label: "一级 3", label: "一级 3",
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册