|
@@ -1,52 +1,57 @@
|
|
|
import { commServer } from './server.js';
|
|
|
import {dateHandle} from "../../utils/dateHandle.js";
|
|
|
|
|
|
+const initState = {
|
|
|
+ showCheckMapDetail: false,
|
|
|
+ showCheckMapAdd: false,
|
|
|
+ showCheckPlan1: true,
|
|
|
+ needReload: true, // 切换页面是否需要获取新数据
|
|
|
+ stepActive: 0, // 步骤进度
|
|
|
+ theme: {id: null, title: null, des: null}, // 主题选中数据(id: 0个案 1系统)
|
|
|
+ condition: { // 条件页面数据
|
|
|
+ options: [], // 树形节点数据
|
|
|
+ conditionIds: [], // 选中的key
|
|
|
+ depType: 1, // 门急诊类型 1-门诊 2-急诊
|
|
|
+ defaultOpen: [], // 默认展开的项
|
|
|
+ },
|
|
|
+ checkRent: { // 查核组页面数据
|
|
|
+ list: [],
|
|
|
+ checkedItem: {id: null}
|
|
|
+ },
|
|
|
+ checkMap: { // 查核地图数据
|
|
|
+ list: [], // 列表数据
|
|
|
+ actionItem: {id: '', pointList: []}, // 当前操作的列表项
|
|
|
+ deptList: [], // 新增单位数据
|
|
|
+ },
|
|
|
+ checkPlan: { // 查核计划
|
|
|
+ checkedItem: {id: 'month', value: 2, label: '每月', model: 30}, // 选中的取模方式对象
|
|
|
+ dateObj: { // 保存开始日期结束日期的对象
|
|
|
+ start: dateHandle.todayDate(),
|
|
|
+ end: '',
|
|
|
+ dayNum: 0 // 两个日期间隔的天数
|
|
|
+ },
|
|
|
+ checkList: [], // 核查计划数组
|
|
|
+ },
|
|
|
+ situationPreview: { // 预览
|
|
|
+ sitName: null,
|
|
|
+ description: null,
|
|
|
+ preDay: null,
|
|
|
+ preH: null,
|
|
|
+ startDay: null
|
|
|
+ },
|
|
|
+ editConfig: null // 编辑时候的原始数据
|
|
|
+};
|
|
|
+
|
|
|
export default {
|
|
|
namespaced: true,
|
|
|
- state: {
|
|
|
- showCheckMapDetail: false,
|
|
|
- showCheckMapAdd: false,
|
|
|
- showCheckPlan1: true,
|
|
|
- needReload: true, // 切换页面是否需要获取新数据
|
|
|
- stepActive: 0, // 步骤进度
|
|
|
- theme: {id: null, title: null, des: null}, // 主题选中数据(id: 0个案 1系统)
|
|
|
- condition: { // 条件页面数据
|
|
|
- options: [], // 树形节点数据
|
|
|
- conditionIds: [], // 选中的key
|
|
|
- depType: 1, // 门急诊类型 1-门诊 2-急诊
|
|
|
- defaultOpen: [], // 默认展开的项
|
|
|
- },
|
|
|
- checkRent: { // 查核组页面数据
|
|
|
- list: [],
|
|
|
- checkedItem: {id: null}
|
|
|
- },
|
|
|
- checkMap: { // 查核地图数据
|
|
|
- list: [], // 列表数据
|
|
|
- actionItem: {id: '', pointList: []}, // 当前操作的列表项
|
|
|
- deptList: [], // 新增单位数据
|
|
|
- },
|
|
|
- checkPlan: { // 查核计划
|
|
|
- checkedItem: {id: 'month', value: 2, label: '每月', model: 30}, // 选中的取模方式对象
|
|
|
- dateObj: { // 保存开始日期结束日期的对象
|
|
|
- start: dateHandle.todayDate(),
|
|
|
- end: '',
|
|
|
- dayNum: 0 // 两个日期间隔的天数
|
|
|
- },
|
|
|
- checkList: [], // 核查计划数组
|
|
|
- },
|
|
|
- situationPreview: { // 预览
|
|
|
- sitName: null,
|
|
|
- description: null,
|
|
|
- preDay: null,
|
|
|
- preH: null,
|
|
|
- startDay: null
|
|
|
- },
|
|
|
- editConfig: null // 编辑时候的原始数据
|
|
|
- },
|
|
|
+ state: initState,
|
|
|
mutations: {
|
|
|
comChangeState(state, {key, data}) {
|
|
|
state[key] = data;
|
|
|
},
|
|
|
+ setInit(state) {
|
|
|
+ state = initState
|
|
|
+ }
|
|
|
},
|
|
|
actions: {
|
|
|
commActions({ commit, state }, { key, data }) {
|