-
@@ -46,7 +46,7 @@
-
+ inputValue = e">
搜 索
@@ -81,18 +81,27 @@ export default {
data() {
return {
popoverShow: false,
- selectLabel: '搜索内部资料',
+ selectLabel: '',
selectValue: '',
inputValue: '',
+ typeList: [{label:'制度文件',value:5},{label:'工作流程',value:1},{label:'岗位工作及标准',value:3},{label:'表单中心',value:2},{label:'部门工作职责',value:4}]
}
},
methods: {
search () {
+ this.$store.commit('reception/SET_SELECTED',{ key: 'keyword', value: this.inputValue })
- this.$router.push(`/index/list${this.selectValue == 2 ? '2' : '1'}?leixing=${this.selectValue}&keyword=${this.inputValue}&t=${new Date().getTime()}`)
+ this.$router.push(`/index/list1?${this.$store.getters.select}`)
+ }
+ },
+ computed: {
+ selected () {
+ return this.selectLabel ? this.selectLabel : (this.typeList.find(i => i.value == this.$route.query.leixing)?.label || '搜索内部资料')
+ },
+ keyword () {
+ return this.inputValue ? this.inputValue : (this.$route.query.keyword || '')
}
},
- computed: {},
mounted() {
this.popoverShow = true
}
diff --git a/src/components/XyTable/index.vue b/src/components/XyTable/index.vue
index 7b4fd53..3954430 100644
--- a/src/components/XyTable/index.vue
+++ b/src/components/XyTable/index.vue
@@ -206,9 +206,8 @@ export default {
initLoad() {
let clientHeight = document.documentElement.clientHeight;
let lxheader = document
- .querySelector(".v-header")
- .getBoundingClientRect();
- let lxHeader_height = lxheader.height + 25; //查询 头部
+ .querySelector(".v-header")?.getBoundingClientRect();
+ let lxHeader_height = lxheader?.height + 25; //查询 头部
let paginationHeight = 37; //分页的高度
let topHeight = 50; //页面 头部
this.tableHeight =
diff --git a/src/router/index.js b/src/router/index.js
index 48f985b..a91b17a 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -62,6 +62,7 @@ export const constantRoutes = [
children: [
{
path: 'home',
+ name: 'Home',
component: () => import('@/views/reception/home'),
meta: { title: '内部质量保证体系资料汇编'}
},
@@ -79,11 +80,6 @@ export const constantRoutes = [
path: 'list1',
component: () => import('@/views/reception/list1'),
meta: { title: '内部质量保证体系资料汇编'}
- },
- {
- path: 'list2',
- component: () => import('@/views/reception/list2'),
- meta: { title: '内部质量保证体系资料汇编'}
}
],
hidden: true
diff --git a/src/store/getters.js b/src/store/getters.js
index a108508..c3f247c 100644
--- a/src/store/getters.js
+++ b/src/store/getters.js
@@ -5,6 +5,13 @@ const getters = {
avatar: state => state.user.avatar,
name: state => state.user.name,
roles: state => state.user.roles,
- permission_routes: state => state.permission.routes
+ permission_routes: state => state.permission.routes,
+ select: state => {
+ let res = ''
+ for(let key in state.reception.select) {
+ res += `${key}=${state.reception.select[key]}&`
+ }
+ return `${res}&t=${new Date().getTime()}`
+ }
}
export default getters
diff --git a/src/store/index.js b/src/store/index.js
index 461e409..2d02800 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -6,6 +6,7 @@ import permission from './modules/permission'
import settings from './modules/settings'
import user from './modules/user'
import form from './modules/form'
+import reception from './modules/reception'
Vue.use(Vuex)
@@ -15,7 +16,8 @@ const store = new Vuex.Store({
permission,
settings,
user,
- form
+ form,
+ reception
},
getters
})
diff --git a/src/store/modules/reception.js b/src/store/modules/reception.js
new file mode 100644
index 0000000..af6c645
--- /dev/null
+++ b/src/store/modules/reception.js
@@ -0,0 +1,33 @@
+const state = {
+ select: {
+ tag_id: '',
+ dept_id: '',
+ keyword: '',
+ leixing: ''
+ }
+}
+
+const mutations = {
+ SET_SELECTED: (state, { key, value, refresh = false }) => {
+ if (refresh) {
+ for(let key in state.select) {
+ state.select[key] = ''
+ }
+ }
+ if (state.select.hasOwnProperty(key)) {
+ state.select[key] = value
+ }
+ }
+}
+
+const actions = {
+
+}
+
+export default {
+ namespaced: true,
+ state,
+ mutations,
+ actions
+}
+
diff --git a/src/views/component/biaoqian.vue b/src/views/component/biaoqian.vue
index 250cdbd..198c35a 100644
--- a/src/views/component/biaoqian.vue
+++ b/src/views/component/biaoqian.vue
@@ -93,6 +93,9 @@ export default {
},
change(e) {
+ this.update();
+ },
+ update () {
let tagObjs = [];
this.value.forEach((i) => {
let tag = deepCopy(this.tags.find((tag) => tag.id === i));
@@ -103,7 +106,7 @@ export default {
});
});
this.$emit("update", tagObjs);
- },
+ }
},
computed: {
disabled() {
diff --git a/src/views/component/dialog.vue b/src/views/component/dialog.vue
index 998a462..2b2de51 100644
--- a/src/views/component/dialog.vue
+++ b/src/views/component/dialog.vue
@@ -1,5 +1,5 @@
+
+
diff --git a/src/views/component/table.vue b/src/views/component/table.vue
index fd4e367..b74e3e5 100644
--- a/src/views/component/table.vue
+++ b/src/views/component/table.vue
@@ -314,6 +314,7 @@
:field-info="fieldInfo"
:form="form"
:file="file"
+ @formDialog="$refs['formDialog'].setType('add'),$refs['formDialog'].show()"
@update="(val) => ($set(file, 'fujian', val))"
>
@@ -337,6 +338,8 @@
@refresh="$refs['xyTable'].getTableData()"
>
+
@@ -361,6 +364,7 @@ import imports from "./imports.vue";
import flow from "@/views/flow/flow.vue";
import biaoqian from "./biaoqian.vue";
import examine from "./examine.vue";
+import formDialog from "@/views/component/formDialog.vue";
export default {
components: {
LxHeader,
@@ -372,6 +376,7 @@ export default {
flow,
biaoqian,
+ formDialog
},
mixins: [authMixin],
provide: {
@@ -463,8 +468,10 @@ export default {
//权限操作
submit(scope, setType) {
+ let row = deepCopy(scope.row)
+ row.id_material_shenhebumen_depts_material_id_relation = [row.id_material_shenhebumen_depts_material_id_relation]
save(
- Object.assign(deepCopy(scope.row), {
+ Object.assign(row, {
zhuangtai: setType,
table_name: this.customForm.tableName,
})
diff --git a/src/views/component/tableExamine.vue b/src/views/component/tableExamine.vue
index 74f74a4..2284715 100644
--- a/src/views/component/tableExamine.vue
+++ b/src/views/component/tableExamine.vue
@@ -426,7 +426,9 @@ export default {
//权限操作
submit (scope, setType) {
- save(Object.assign( deepCopy(scope.row), { 'zhuangtai': setType,'table_name': this.customForm.tableName })).then(res => {
+ let row = deepCopy(scope.row)
+ row.id_material_shenhebumen_depts_material_id_relation = [row.id_material_shenhebumen_depts_material_id_relation]
+ save(Object.assign(row , { 'zhuangtai': setType,'table_name': this.customForm.tableName })).then(res => {
this.$message({
type: 'success',
message: '操作成功'
@@ -441,7 +443,7 @@ export default {
async getFormDetail() {
this.select.filter[0] = {
key: "zhuangtai",
- op: "range",
+ op: this.$route.meta.params?.zhuangtai?.length === 1 ? "eq" : 'range',
value: this.$route.meta.params?.zhuangtai,
};
if (this.$route.meta.params?.custom_form) {
@@ -461,13 +463,26 @@ export default {
//字段处理
//初始表
let baseTable = new Map([
- ['departments', async () => {
- const res = await listdept()
- return res
- }],
- ['admins',[]]
- ])
+ [
+ "material_shenhebumen_depts",
+ async () => {
+ const res = await listdept();
+ return res;
+ },
+ ],
+ ["admins", []],
+ ]);
let { fields, relation } = res;
+ let fieldRes = await fieldIndex(
+ {
+ page: 1,
+ page_size: 999,
+ custom_form_id: this.customForm.customFormId,
+ sort_name: "sort",
+ sort_type: "asc",
+ },
+ false
+ );
if (
!fields ||
!relation ||
@@ -476,28 +491,32 @@ export default {
) {
throw new Error("fields或relation格式错误");
}
- fields.forEach((i, index) => {
- i._relations = relation.find((j) => j.local_key === i.field);
- if (i.select_item && typeof i.select_item === 'object') {
- let keys = Object.keys(i.select_item)
- i._params = keys.map(key => {
+ fieldRes?.data?.forEach((i, index) => {
+ i._relations = relation.find((j) => j.link_table_name.split('_')[1] === i.field);
+ if (i.select_item && typeof i.select_item === "object") {
+ let keys = Object.keys(i.select_item);
+ i._params = keys.map((key) => {
return {
key,
- value: i.select_item[key]
- }
- })
+ value: i.select_item[key],
+ };
+ });
}
- if (i.edit_input === 'file' || i.edit_input === 'files') {
- return
+ if (i.edit_input === "file" || i.edit_input === "files") {
+ return;
}
if (i._relations) {
if (baseTable.get(i._relations.link_table_name)) {
- baseTable.get(i._relations.link_table_name)().then(res => i._params = res)
+ baseTable
+ .get(i._relations.link_table_name)()
+ .then((res) => (i._params = res));
} else {
i._params = i._relations.parameter_id
- ? getparameter({ id: i._relations.parameter_id },false).then((res) => {
- i._params = res.detail;
- })
+ ? getparameter({ id: i._relations.parameter_id }, false).then(
+ (res) => {
+ i._params = res.detail;
+ }
+ )
: this.index({
table_name: i._relations.link_table_name,
page: 1,
@@ -508,48 +527,43 @@ export default {
}
}
});
- let fieldRes = await fieldIndex({
- page: 1,
- page_size: 999,
- custom_form_id: this.customForm.customFormId,
- sort_name: 'sort',
- sort_type: 'asc'
- },false)
this.form = fieldRes?.data || [];
this.table = this.form
?.filter((i) => i.list_show)
.map((i) => {
let linkOb = {};
- if (i.edit_input === 'richtext') {
- linkOb.customFn = row => {
+ if (i.edit_input === "richtext") {
+ linkOb.customFn = (row) => {
return (
-
+
- )
- }
+ );
+ };
}
- if (i.select_item && typeof i.select_item === 'object' && !(i.select_item instanceof Array)) {
-
- let keys = Object.keys(i.select_item)
- linkOb.customFn = row => {
- let paramMap = new Map()
- keys.forEach(key => {
- paramMap.set(i.select_item[key],key)
- })
+ if (
+ i.select_item &&
+ typeof i.select_item === "object" &&
+ !(i.select_item instanceof Array)
+ ) {
+ let keys = Object.keys(i.select_item);
+ linkOb.customFn = (row) => {
+ let paramMap = new Map();
+ keys.forEach((key) => {
+ paramMap.set(i.select_item[key], key);
+ });
- return (
-
- { paramMap.get(row[i.field]?.toString()) }
-
- )
- }
+ return
{paramMap.get(row[i.field]?.toString())};
+ };
}
if (i._relations) {
- let { link_relation, foreign_key, link_with_name } = i._relations
- if (link_relation === 'newHasOne' || link_relation === 'hasOne') {
- linkOb.customFn = row => {
+ let { link_relation, foreign_key, link_with_name } = i._relations;
+ if (link_relation === "newHasOne" || link_relation === "hasOne") {
+ linkOb.customFn = (row) => {
if (i.edit_input === "file") {
return (
- { row[link_with_name]?.name ||
+ {row[link_with_name]?.name ||
row[link_with_name]?.no ||
- row[link_with_name]?.value }
+ row[link_with_name]?.value}
);
}
- }
+ };
}
- if (link_relation === "hasMany" || link_relation === 'newHasMany') {
+ if (link_relation === "hasMany" || link_relation === "newHasMany") {
linkOb.customFn = (row) => {
return (
{row[link_with_name]?.map((o) => (
-
{o?.name || o?.no || o?.value}
+
{ o?.name || o?.no || o?.value || o?.biaoti || o?.mingcheng }
))}
);
@@ -599,7 +613,6 @@ export default {
label: "序号",
});
- console.log(111,this.form)
},
},
diff --git a/src/views/dashboard/components/BarChart.vue b/src/views/dashboard/components/BarChart.vue
deleted file mode 100644
index 199f14c..0000000
--- a/src/views/dashboard/components/BarChart.vue
+++ /dev/null
@@ -1,146 +0,0 @@
-
-
-
-
-
-
diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue
deleted file mode 100644
index ffc9509..0000000
--- a/src/views/dashboard/components/PanelGroup.vue
+++ /dev/null
@@ -1,448 +0,0 @@
-
-
-
-
-
- 营业统计
-
-
-
-
服务金额
-
-
-
- {{totaldata.business.server_money_total}}
-
-
-
- {{totaldata.business.nurse_money_total}}
- 护工金额
-
-
- {{totaldata.business.remain_money_total}}
- 留存金额
-
-
-
-
-
-
-
-
-
- 人效统计
-
-
-
-
总服务时长
-
-
-
- {{totaldata.person_efficiency.server_time_total}}
- 分钟
-
-
-
-
- {{totaldata.person_efficiency.expect}}
- 照护人员数
-
-
- {{totaldata.person_efficiency.act}}
- 天数
-
-
-
-
-
-
-
-
- 客户统计
-
-
-
-
活跃客户
-
-
-
- {{totaldata.customer.active}}人
-
-
-
- {{totaldata.customer.add}}
- 新增
-
-
- {{totaldata.customer.wash}}
- 流失
-
-
-
-
-
-
-
-
-
- 订单统计
-
-
-
-
服务订单
-
-
-
{{totaldata.order.server_total}}单
-
-
-
- {{totaldata.order.cycle_total}}
- 周期性订单
-
-
- {{totaldata.order.unit_total}}
- 单次订单
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/dashboard/components/mixins/resize.js b/src/views/dashboard/components/mixins/resize.js
deleted file mode 100644
index 234953b..0000000
--- a/src/views/dashboard/components/mixins/resize.js
+++ /dev/null
@@ -1,55 +0,0 @@
-import { debounce } from '@/utils'
-
-export default {
- data() {
- return {
- $_sidebarElm: null,
- $_resizeHandler: null
- }
- },
- mounted() {
- this.$_resizeHandler = debounce(() => {
- if (this.chart) {
- this.chart.resize()
- }
- }, 100)
- this.$_initResizeEvent()
- this.$_initSidebarResizeEvent()
- },
- beforeDestroy() {
- this.$_destroyResizeEvent()
- this.$_destroySidebarResizeEvent()
- },
- // to fixed bug when cached by keep-alive
- // https://github.com/PanJiaChen/vue-element-admin/issues/2116
- activated() {
- this.$_initResizeEvent()
- this.$_initSidebarResizeEvent()
- },
- deactivated() {
- this.$_destroyResizeEvent()
- this.$_destroySidebarResizeEvent()
- },
- methods: {
- // use $_ for mixins properties
- // https://vuejs.org/v2/style-guide/index.html#Private-property-names-essential
- $_initResizeEvent() {
- window.addEventListener('resize', this.$_resizeHandler)
- },
- $_destroyResizeEvent() {
- window.removeEventListener('resize', this.$_resizeHandler)
- },
- $_sidebarResizeHandler(e) {
- if (e.propertyName === 'width') {
- this.$_resizeHandler()
- }
- },
- $_initSidebarResizeEvent() {
- this.$_sidebarElm = document.getElementsByClassName('sidebar-container')[0]
- this.$_sidebarElm && this.$_sidebarElm.addEventListener('transitionend', this.$_sidebarResizeHandler)
- },
- $_destroySidebarResizeEvent() {
- this.$_sidebarElm && this.$_sidebarElm.removeEventListener('transitionend', this.$_sidebarResizeHandler)
- }
- }
-}
diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue
index 3e3f399..8b062ed 100644
--- a/src/views/dashboard/index.vue
+++ b/src/views/dashboard/index.vue
@@ -1,298 +1,134 @@
diff --git a/src/views/flow/flow.vue b/src/views/flow/flow.vue
index 3750221..9554444 100644
--- a/src/views/flow/flow.vue
+++ b/src/views/flow/flow.vue
@@ -2,7 +2,7 @@
表单中心选择
-
表单新增
+
表单新增
-
+
{{ i.name }}
@@ -53,6 +53,12 @@ export default {
})
this.departments = res.department
this.loading = false
+ },
+
+
+ toList (i) {
+ this.$store.commit('reception/SET_SELECTED', { key: 'dept_id', value: i.id})
+ this.$router.push(`/index/list1?${this.$store.getters.select}`)
}
},
computed: {},
diff --git a/src/views/reception/home/index.vue b/src/views/reception/home/index.vue
index 962f045..5ac98d7 100644
--- a/src/views/reception/home/index.vue
+++ b/src/views/reception/home/index.vue
@@ -74,7 +74,7 @@
-
+
@@ -130,6 +130,7 @@
:class="
index % 2 ? 'single-item label-item' : 'complex-item label-item'
"
+ @click="toList({ tag:item })"
>
{{ item.mingcheng }}
@@ -139,6 +140,7 @@
class="label-group__right label-item"
:style="{ background: labelColor(index + 3) }"
v-if="group.right"
+ @click="toList({ tag:item })"
>
{{ group.right.mingcheng }}
@@ -197,6 +199,13 @@ export default {
}
console.log(this.labelGroup);
},
+
+ toList ({ tag, dept }) {
+ tag?.id ? this.$store.commit('reception/SET_SELECTED',{ key: 'tag_id', value: tag.id }) : ''
+ dept?.id ? this.$store.commit('reception/SET_SELECTED',{ key: 'dept_id', value: dept.id }) : ''
+
+ this.$router.push(`/index/list1?${this.$store.getters.select}`)
+ }
},
computed: {
labelColor() {
diff --git a/src/views/reception/index.vue b/src/views/reception/index.vue
index ae05b30..1f5a7bb 100644
--- a/src/views/reception/index.vue
+++ b/src/views/reception/index.vue
@@ -10,7 +10,7 @@
enter-active-class="fade-in"
leave-to-class="fade-out"
>
-
+
diff --git a/src/views/reception/label/index.vue b/src/views/reception/label/index.vue
index e5e570f..cebe8cf 100644
--- a/src/views/reception/label/index.vue
+++ b/src/views/reception/label/index.vue
@@ -31,7 +31,7 @@
-
+