diff --git a/src/store/modules/bigdata.js b/src/store/modules/bigdata.js index c029a32..969ac90 100644 --- a/src/store/modules/bigdata.js +++ b/src/store/modules/bigdata.js @@ -52,6 +52,11 @@ const actions = { key: "fenlei", op: "neq", value: 1 + }, + { + key: "department_id", + op: "eq", + value: state.is_auth == 1 ? 2 : '' } ], is_auth: state.is_auth @@ -65,6 +70,11 @@ const actions = { key: "fenlei", op: "neq", value: 1 + }, + { + key: "department_id", + op: "eq", + value: state.is_auth == 1 ? 2 : '' } ], is_auth: state.is_auth diff --git a/src/store/modules/user.js b/src/store/modules/user.js index b4a7e18..2e1b05f 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -18,6 +18,7 @@ const getDefaultState = () => { name: '', avatar: '', roles: [], + allowLevel: '', department: {} } } @@ -25,6 +26,9 @@ const getDefaultState = () => { const state = getDefaultState() const mutations = { + SET_ALLOW_LEVEL: (state, value) => { + state.allowLevel = value + }, RESET_STATE: (state) => { Object.assign(state, getDefaultState()) }, @@ -91,11 +95,11 @@ const actions = { roles, name, avatar, + minAllowLevel, department } = response - - + commit('SET_ALLOW_LEVEL', minAllowLevel) commit('SET_ROLES', roles) commit('SET_NAME', name) commit('SET_AVATAR', avatar) diff --git a/src/views/assets/component/addHandles.vue b/src/views/assets/component/addHandles.vue index 9322177..4a1c05c 100644 --- a/src/views/assets/component/addHandles.vue +++ b/src/views/assets/component/addHandles.vue @@ -2,6 +2,7 @@ import { save, show, index, destroy, imports } from "@/api/system/baseForm"; import { CreateDialog } from "@/utils/createDialog" import { deepCopy } from "@/utils"; +import { show as customFormFieldShow } from "@/api/system/customFormField"; import { resolveFormInfo } from '@/utils/createTable' export default { components: { @@ -195,6 +196,7 @@ export default { table-item={ [ { + prop: "selection", type: "selection", width: 56, align: "center", @@ -219,7 +221,7 @@ export default { "width": 0, "align": "center", "formatter": (data, row, value) => { - return this.wxAreas[value-1] + return this.wxAreas.get(value) } }, { @@ -319,6 +321,7 @@ export default { table-item={ [ { + prop: "selection", type: "selection", width: 56, align: "center", @@ -343,7 +346,7 @@ export default { "width": 0, "align": "center", "formatter": (data, row, value) => { - return this.wxAreas[value-1] + return this.wxAreas.get(value) } }, { @@ -424,15 +427,7 @@ export default { }, data() { return { - wxAreas: [ - "宜兴市", - "惠山区", - "新吴区", - "梁溪区", - "江阴市", - "滨湖区", - "锡山区", - ], + wxAreas: new Map(), customForm: { customFormId: "", tableName: "" @@ -464,6 +459,24 @@ export default { }; }, methods: { + async getWxAreas () { + try { + const res = await customFormFieldShow({ id: 120 }) + let keys = Object.keys(res.select_item) + if (keys.length > 0) { + this.wxAreas = new Map(keys.map((key) => { + return [ + /^\d*$/.test(res.select_item[key]) + ? Number(res.select_item[key]) + : res.select_item[key], + key + ] + })) + } + } catch (err) { + + } + }, index, setRow (row) { this.row = row @@ -681,6 +694,7 @@ export default { }, }, created() { + this.getWxAreas(); this.getTableParams(); this.id = this.$route.query.id; this.type = this.$route.query.type; diff --git a/src/views/assets/component/addLand.vue b/src/views/assets/component/addLand.vue index 593b236..b69a9e3 100644 --- a/src/views/assets/component/addLand.vue +++ b/src/views/assets/component/addLand.vue @@ -2,6 +2,7 @@ import { save, show, index, destroy } from "@/api/system/baseForm"; import { CreateDialog } from "@/utils/createDialog"; import { deepCopy } from "@/utils"; +import { show as customFormFieldShow } from '@/api/system/customFormField' export default { props: { formInfo: { @@ -169,16 +170,7 @@ export default { prop: "area", width: 80, formatter: (data, row, value) => { - let map = new Map([ - [1, "宜兴市"], - [2, "惠山区"], - [3, "新吴区"], - [4, "梁溪区"], - [5, "江阴市"], - [6, "滨湖区"], - [7, "锡山区"], - ]); - return map.get(value); + return this.wxAreas.get(value); }, }, { @@ -257,6 +249,7 @@ export default { }, data() { return { + wxAreas: new Map(), columns: 1, id: "", type: "add", @@ -271,6 +264,24 @@ export default { }; }, methods: { + async getWxAreas () { + try { + const res = await customFormFieldShow({ id: 120 }) + let keys = Object.keys(res.select_item) + if (keys.length > 0) { + this.wxAreas = new Map(keys.map((key) => { + return [ + /^\d*$/.test(res.select_item[key]) + ? Number(res.select_item[key]) + : res.select_item[key], + key + ] + })) + } + } catch (err) { + + } + }, init() { for (let key in this.form) { if (this.form[key] instanceof Array) { @@ -575,6 +586,9 @@ export default { } }, }, + created() { + this.getWxAreas() + } }; diff --git a/src/views/assets/fileList.vue b/src/views/assets/fileList.vue index 14c5ddb..63d5554 100644 --- a/src/views/assets/fileList.vue +++ b/src/views/assets/fileList.vue @@ -81,6 +81,7 @@ import add from "@/views/assets/component/addFiles.vue" import LxHeader from "@/components/LxHeader/index.vue"; import headerContent from "@/components/LxHeader/XyContent.vue"; import { download } from '@/utils/downloadRequest' +import { show as customFormFieldShow } from '@/api/system/customFormField' export default { components: { LxHeader, @@ -90,15 +91,7 @@ export default { mixins: [authMixin], data() { return { - wxAreas: [ - "宜兴市", - "惠山区", - "新吴区", - "梁溪区", - "江阴市", - "滨湖区", - "锡山区", - ], + wxAreas: new Map(), codeUri: "", showModal: false, table: [ @@ -184,6 +177,24 @@ export default { }; }, methods: { + async getWxAreas () { + try { + const res = await customFormFieldShow({ id: 120 }) + let keys = Object.keys(res.select_item) + if (keys.length > 0) { + this.wxAreas = new Map(keys.map((key) => { + return [ + /^\d*$/.test(res.select_item[key]) + ? Number(res.select_item[key]) + : res.select_item[key], + key + ] + })) + } + } catch (err) { + + } + }, getFiles, open(url) { @@ -202,6 +213,7 @@ export default { computed: { }, created() { + this.getWxAreas() }, }; diff --git a/src/views/assets/handleSign.vue b/src/views/assets/handleSign.vue index 17606e8..7df171a 100644 --- a/src/views/assets/handleSign.vue +++ b/src/views/assets/handleSign.vue @@ -3,6 +3,7 @@ import { save, show, index, destroy, imports } from "@/api/system/baseForm"; import { CreateDialog } from "@/utils/createDialog"; import { deepCopy } from "@/utils"; import { resolveFormInfo } from "@/utils/createTable"; +import { show as customFormFieldShow } from '@/api/system/customFormField' export default { components: {}, props: { @@ -268,7 +269,7 @@ export default { width: 0, align: "center", "formatter": (data, row, value) => { - return this.wxAreas[value] + return this.wxAreas.get(value) } }, { @@ -506,7 +507,7 @@ export default { width: 0, align: "center", "formatter": (data, row, value) => { - return this.wxAreas[value] + return this.wxAreas.get(value) } }, { @@ -644,15 +645,7 @@ export default { }, data() { return { - wxAreas: [ - "宜兴市", - "惠山区", - "新吴区", - "梁溪区", - "江阴市", - "滨湖区", - "锡山区", - ], + wxAreas: new Map(), customForm: { customFormId: "", tableName: "" @@ -683,6 +676,24 @@ export default { }; }, methods: { + async getWxAreas () { + try { + const res = await customFormFieldShow({ id: 120 }) + let keys = Object.keys(res.select_item) + if (keys.length > 0) { + this.wxAreas = new Map(keys.map((key) => { + return [ + /^\d*$/.test(res.select_item[key]) + ? Number(res.select_item[key]) + : res.select_item[key], + key + ] + })) + } + } catch (err) { + + } + }, index, setRow(row) { this.row = row; @@ -905,6 +916,7 @@ export default { }, }, created() { + this.getWxAreas() this.getTableParams(); this.id = this.$route.query.handleId; this.type = this.$route.query.type; diff --git a/src/views/component/imports.vue b/src/views/component/imports.vue index 99ac53c..8fba14a 100644 --- a/src/views/component/imports.vue +++ b/src/views/component/imports.vue @@ -145,11 +145,11 @@ export default { console.log(res) this.$message({ type: 'success', - message: `成功导入${res.total}条` + message: `总计${res.total},成功导入${res.total-res.fail}条` }) + this.hidden(); + this.$emit('refresh') }) - this.hidden(); - this.$emit('refresh') } }, computed: {}, diff --git a/src/views/component/map.vue b/src/views/component/map.vue index c624356..74c340b 100644 --- a/src/views/component/map.vue +++ b/src/views/component/map.vue @@ -29,18 +29,19 @@ placeholder="请选择区域" > 资产权属 - + @@ -62,9 +63,9 @@
- - - + + + @@ -76,11 +77,12 @@

{{ item.name }}

{{ item.hasOwnProperty('land_id') ? '房产' : '土地' }} - {{ wxAreas[item.area-1] }} + {{ wxAreas.get(item.area) }} {{ item.id_house_properties_land_id_relation ? '权属合一' : '权属分离' }} {{ jianzhuleixing(item.jianzhuleixing) }} {{ zichanleixing(item.zichanleixing) }} + {{ item.department.name }}
@@ -100,7 +102,7 @@
- + {{ contentFormat(item) }}{{ units.get(item.field) }} @@ -108,6 +110,9 @@ {{ shiyongzhuangtai }} + + {{ openData.department ? openData.department.name : '' }} + @@ -128,6 +133,7 @@ import { listdept } from "@/api/system/department"; import { getparameter } from "@/api/system/dictionary"; import { listCommondepartment } from '@/api/common' import { deepCopy } from '@/utils' +import { show as customFormFieldShow } from '@/api/system/customFormField' export default { name: "mapList", data() { @@ -212,15 +218,7 @@ export default { polygons: [], markerList: [], departments: [], - wxAreas: [ - "宜兴市", - "惠山区", - "新吴区", - "梁溪区", - "江阴市", - "滨湖区", - "锡山区", - ], + wxAreas: new Map(), units: new Map([ ["dengjimianji", "m²"], ["shijimianji", "m²"], @@ -231,9 +229,27 @@ export default { }; }, methods: { + async getWxAreas () { + try { + const res = await customFormFieldShow({ id: 120 }) + let keys = Object.keys(res.select_item) + if (keys.length > 0) { + this.wxAreas = new Map(keys.map((key) => { + return [ + /^\d*$/.test(res.select_item[key]) + ? Number(res.select_item[key]) + : res.select_item[key], + key + ] + })) + } + } catch (err) { + + } + }, index, areaPick(e) { - this.areaBG(this.wxAreas[this.select.filter[0].value - 1]); + this.areaBG(this.wxAreas.get(this.select.filter[0].value)); this.getList().then((res) => { this.setMapMarker(); }); @@ -743,12 +759,13 @@ export default { } }, created() { + this.getWxAreas(); this.getDepts(); this.getFormDetail(); }, async mounted() { let areaId = Number(this.$route.query.area) || '' - areaId ? (this.init(this.wxAreas[areaId - 1]),this.select.filter[0].value = areaId) : this.init(); + areaId ? (this.init(this.wxAreas.get(areaId)),this.select.filter[0].value = areaId) : this.init(); await this.getList(); this.setMapMarker(); @@ -1008,14 +1025,14 @@ $staticsHeight: 60px;