diff --git a/src/api/system/dictionary.js b/src/api/system/dictionary.js index 7c0bc47..3a9e4d7 100644 --- a/src/api/system/dictionary.js +++ b/src/api/system/dictionary.js @@ -24,6 +24,32 @@ export function getparameter(param,loading = true) { }) } +// function customParamsSerializers(params) { +// let result = ''; +// for (let key in params) { +// if (params.hasOwnProperty(key)) { +// if (Array.isArray(params[key])) { +// params[key].forEach((item,index) => { +// result += `${key}[${index}]=${item}&`; +// }); +// } else { +// result += `${key}=${params[key]}&`; +// } +// } +// } +// return result.slice(0, -1); +// } + +// export function getparameter(params,isLoading = false) { +// return request({ +// method: "get", +// url: "/api/admin/parameter/show", +// params, +// paramsSerializer: customParamsSerializers, +// isLoading +// }) +// } + export function getparameteritem(number) { return request({ diff --git a/src/styles/iconfont.css b/src/styles/iconfont.css index 9f6fdb2..620ac5d 100644 --- a/src/styles/iconfont.css +++ b/src/styles/iconfont.css @@ -1,8 +1,8 @@ @font-face { - font-family: "iconfont"; /* Project id 4052909 */ - src: url('iconfont.woff2?t=1683361610626') format('woff2'), - url('iconfont.woff?t=1683361610626') format('woff'), - url('iconfont.ttf?t=1683361610626') format('truetype'); + font-family: "iconfont"; /* Project id 4122597 */ + src: url('iconfont.woff2?t=1686734240029') format('woff2'), + url('iconfont.woff?t=1686734240029') format('woff'), + url('iconfont.ttf?t=1686734240029') format('truetype'); } .iconfont { @@ -13,107 +13,63 @@ -moz-osx-font-smoothing: grayscale; } -.icon-jurassic_process-list:before { - content: "\e6c4"; +.icon-yongyaojihua:before { + content: "\e803"; } -.icon-biaodan:before { - content: "\e663"; -} - -.icon-biaozhunhuaguizeguanli:before { - content: "\e60a"; -} - -.icon-a-zhidu6:before { - content: "\eb07"; -} - -.icon-dat:before { - content: "\e691"; -} - -.icon-audio:before { - content: "\e692"; -} - -.icon-video:before { - content: "\e693"; -} - -.icon-zip:before { - content: "\e694"; -} - -.icon-image:before { - content: "\e695"; -} - -.icon-pdf:before { - content: "\e696"; -} - -.icon-ppt:before { - content: "\e697"; -} - -.icon-21excel:before { - content: "\e698"; +.icon-oldpeopleshome:before { + content: "\e641"; } -.icon-21word:before { - content: "\e699"; +.icon-ertong:before { + content: "\e62b"; } -.icon-21move:before { - content: "\e69a"; +.icon-gongju:before { + content: "\e607"; } -.icon-21setting:before { - content: "\e69b"; +.icon-lunyi:before { + content: "\e613"; } -.icon-21upload:before { - content: "\e69c"; +.icon-shuidiangaizao:before { + content: "\e647"; } -.icon-21download:before { - content: "\e69d"; +.icon-xuesheng:before { + content: "\e61a"; } -.icon-21cancel:before { - content: "\e69e"; +.icon-tijian:before { + content: "\e71a"; } -.icon-21ok:before { - content: "\e69f"; +.icon-chuangyemingxi:before { + content: "\e60f"; } -.icon-21copy:before { - content: "\e6a0"; +.icon-kangfuxunlian:before { + content: "\e608"; } -.icon-21delete:before { - content: "\e6a1"; +.icon-yewu:before { + content: "\e62c"; } -.icon-21edit:before { - content: "\e6a2"; +.icon-changdizulin:before { + content: "\e610"; } -.icon-21new:before { - content: "\e6a3"; +.icon-jiaoyu:before { + content: "\e661"; } -.icon-21folder:before { - content: "\e6a4"; -} - -.icon-21mutil:before { - content: "\e6a5"; +.icon-shequ:before { + content: "\e663"; } -.icon-21file:before { - content: "\e6a6"; +.icon-qiyezhengshu:before { + content: "\e614"; } diff --git a/src/styles/iconfont.ttf b/src/styles/iconfont.ttf index 4e2970e..01c98f6 100644 Binary files a/src/styles/iconfont.ttf and b/src/styles/iconfont.ttf differ diff --git a/src/styles/iconfont.woff b/src/styles/iconfont.woff index b7c5531..44868fe 100644 Binary files a/src/styles/iconfont.woff and b/src/styles/iconfont.woff differ diff --git a/src/styles/iconfont.woff2 b/src/styles/iconfont.woff2 index 0c051c5..48d6c45 100644 Binary files a/src/styles/iconfont.woff2 and b/src/styles/iconfont.woff2 differ diff --git a/src/views/area/index.vue b/src/views/area/index.vue new file mode 100644 index 0000000..d733e3b --- /dev/null +++ b/src/views/area/index.vue @@ -0,0 +1,9 @@ + + + + + diff --git a/src/views/component/dialog.vue b/src/views/component/dialog.vue index 8c398fa..e0ff0cf 100644 --- a/src/views/component/dialog.vue +++ b/src/views/component/dialog.vue @@ -41,111 +41,108 @@ export default { }, (() => { let dom = []; - this.formInfo.forEach((i, index) => { - if (i.list_show) { - dom.push( - h( - "el-form-item", - { - ref: `elFormItem${i.field}`, - style: { - width: "100%", - }, - props: { - label: i.name, - prop: i.field, - required: - i.validation instanceof Array - ? !!i.validation.find((i) => i === "required") - : false, - }, + this.formInfo.filter(i => i.form_show).forEach((i, index) => { + dom.push( + h( + "el-form-item", + { + ref: `elFormItem${i.field}`, + style: { + width: "100%", }, - this.$scopedSlots[i.field] - ? this.$scopedSlots[i.field]({ fieldInfo: i, form: this.form }) - : [ - h( - domMap.get(i.edit_input), - { - ref: `elEdit_${i.field}`, - style: { - width: "100%", - }, - props: { - ...addPropsMap.get(i.edit_input), - ...this.extraProps(i), - placeholder: i.help, - value: this.form[i.field], - }, - attrs: { - placeholder: i.help || `请填写${i.name}`, - }, - on: { - [this.getEventType(i.edit_input)]: (e) => { - if (i.field) { - this.form[i.field] = e; - this.form = Object.assign({}, this.form); - } - }, - ['visible-change']:_ => i._params.set() - }, - scopedSlots: - i.edit_input === "file" || - i.edit_input === "files" - ? { - file: (scope) => { - let { file } = scope; - return [ - h("div", {}, [ - h("i", { - class: { - "el-icon-circle-check": - file.status === "success", - "el-icon-loading": - file.status === "uploading", - }, - style: { - color: - file.status === "success" - ? "green" - : "", - }, - }), - h( - "a", - { - attrs: { - href: file.url, - download: file.name, - }, - class: { - "uploaded-a": - file.status === "success", - }, - }, - file.name - ), - ]), - h("i", { - class: "el-icon-close", - on: { - ["click"]: () => - this.fileRemoveHandler( - file, - i.field - ), - }, - }), - ]; - }, - } - : "", + props: { + label: i.name, + prop: i.field, + required: + i.validation instanceof Array + ? !!i.validation.find((i) => i === "required") + : false, + }, + }, + this.$scopedSlots[i.field] + ? this.$scopedSlots[i.field]({ fieldInfo: i, form: this.form }) + : [ + h( + domMap.get(i.edit_input), + { + ref: `elEdit_${i.field}`, + style: { + width: "100%", + }, + props: { + ...addPropsMap.get(i.edit_input), + ...this.extraProps(i), + placeholder: i.help, + value: this.form[i.field], + }, + attrs: { + placeholder: i.help || `请填写${i.name}`, + }, + on: { + [this.getEventType(i.edit_input)]: (e) => { + if (i.field) { + this.form[i.field] = e; + this.form = Object.assign({}, this.form); + } }, - this.optionsRender(h, i) - ), - ] - ) - ); - } + }, + scopedSlots: + i.edit_input === "file" || + i.edit_input === "files" + ? { + file: (scope) => { + let { file } = scope; + return [ + h("div", {}, [ + h("i", { + class: { + "el-icon-circle-check": + file.status === "success", + "el-icon-loading": + file.status === "uploading", + }, + style: { + color: + file.status === "success" + ? "green" + : "", + }, + }), + h( + "a", + { + attrs: { + href: file.url, + download: file.name, + }, + class: { + "uploaded-a": + file.status === "success", + }, + }, + file.name + ), + ]), + h("i", { + class: "el-icon-close", + on: { + ["click"]: () => + this.fileRemoveHandler( + file, + i.field + ), + }, + }), + ]; + }, + } + : "", + }, + this.optionsRender(h, i) + ), + ] + ) + ); }); return dom; })() @@ -215,12 +212,12 @@ export default { //渲染一些组件内部需要选项等 optionsRender(h, info) { if (info.edit_input === "checkbox" || info.edit_input === "radio") { - return info._params.get() && info._params.get() instanceof Array - ? info._params.get().map((i) => + return info._params && info._params instanceof Array + ? info._params.map((i) => h("el-option", { props: { - label: i.name || i.no || i.value || i.id, - value: i[info._relations.foreign_key], + label: i.key || i.name || i.no || i.value || i.id, + value: info._relations ? i[info._relations.foreign_key] : i.value, }, }) ) diff --git a/src/views/component/table.vue b/src/views/component/table.vue index f8df830..32fc385 100644 --- a/src/views/component/table.vue +++ b/src/views/component/table.vue @@ -63,9 +63,9 @@ @@ -160,9 +160,9 @@ @@ -385,7 +385,13 @@ export default { let temp = target?.value.split(",")[0]; target.value = `${temp ? temp : ""},${e}`; }, - + handle(property){ + return function(a,b){ + const val1 = a[property]; + const val2 = b[property]; + return val1 - val2; + } + }, async getFormDetail() { if (this.$route.meta.params?.custom_form) { let decode = decodeURIComponent(this.$route.meta.params?.custom_form); @@ -414,28 +420,30 @@ export default { } fields.forEach((i, index) => { i._relations = relation.find((j) => j.local_key === i.field); - i._params = { - value: [], - load: false, - get: () => i._params.value, - set: () => { - if(i._params.load) return - i._relations.parameter_id - ? getparameter({ id: i._relations.parameter_id },false).then((res) => { - i._params.value = res.detail; - }) - : this.index({ - table_name: i._relations.link_table_name, - page: 1, - page_size: 9999, - }).then((res) => { - i._params.value = res.data; - }); - i._params.load = true - }, - }; + 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] + } + }) + } + if (i._relations) { + i._params = i._relations.parameter_id + ? getparameter({ id: i._relations.parameter_id },false).then((res) => { + i._params = res.detail; + }) + : this.index({ + table_name: i._relations.link_table_name, + page: 1, + page_size: 9999, + }).then((res) => { + i._params = res.data; + }); + } }); - this.form = fields; + this.form = fields.sort(this.handle('sort')); console.log(111, this.form); // if(res.fields && res.fields instanceof Array) { // res.fields.forEach(i => { @@ -464,11 +472,26 @@ export default { // }) // } // this.form = res.fields - this.table = this.form + this.table = this.form.sort(this.handle('sort')) ?.filter((i) => i.list_show) .map((i) => { let linkOb = {}; + if (i.select_item && typeof i.select_item === 'object') { + 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()) } + + ) + } + } if (i._relations) { let { link_relation, foreign_key, link_with_name } = i._relations if (link_relation === 'newHasOne' || link_relation === 'hasOne') { @@ -485,9 +508,9 @@ export default { } else { 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 } ); } @@ -520,6 +543,7 @@ export default { type: "index", width: 60, label: "序号", + fixed:'left' }); }, }, @@ -528,17 +552,24 @@ export default { columnArrTest() { return function (field) { return this.form.find((i) => i.field === field) - ? this.form.find((i) => i.field === field).search_input === "checkbox" + ? this.form.find((i) => i.field === field).search_input === "checkbox" || this.form.find((i) => i.field === field).search_input === "radio" : false; }; }, + getColumnField() { + return function (field) { + return this.form.find((i) => i.field === field) + ? this.form.find((i) => i.field === field) + : {}; + }; + }, getColumnParams() { return function (field) { return this.form.find((i) => i.field === field) - ? this.form.find((i) => i.field === field)._paramters + ? this.form.find((i) => i.field === field)._params : []; }; - }, + } }, created() { this.getFormDetail(); diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index 9c9d1f3..1b8c496 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -1,6 +1,6 @@ -
- 自定义1自定义1自定义1自定义1自定义1自定义1自定义1自定义1自定义1自定义1自定义1自定义1自定义1自定义1自定义1自定义1自定义1自定义1自定义1自定义1自定义1自定义1自定义1自定义1自定义1自定义1自定义1自定义1自定义1自定义1自定义1自定义1自定义1自定义1 +
+
@@ -28,13 +28,15 @@ "id": "all", "name": "人员", "left": 550, - "top": 320, + "top": 320, + "content":'
张三
' }, { "id": "person", "name": "个人信息", "left": 200, - "top": 160, + "top": 160, + "content":'

姓名:张三

性别:男

残疾类别:视力残疾

残疾等级:残疾一级

先居住地:常州市金坛区

' }, { "id": "business", @@ -119,5 +121,15 @@ /deep/ .jtk-droppable{ height: 300px!important; width: 250px!important; + } + /deep/ .avue-flow__node-body .persons{ + font-size: 26px; + text-align: center; + height: 150px; + width: 150px; + background: #ddd; + border-radius: 100%; + line-height: 150px; + margin: 35px auto; } diff --git a/src/views/reports/business.vue b/src/views/reports/business.vue new file mode 100644 index 0000000..af3389a --- /dev/null +++ b/src/views/reports/business.vue @@ -0,0 +1,46 @@ + + + + + diff --git a/src/views/reports/record.vue b/src/views/reports/record.vue new file mode 100644 index 0000000..1418e97 --- /dev/null +++ b/src/views/reports/record.vue @@ -0,0 +1,46 @@ + + + + + diff --git a/src/views/street/index.vue b/src/views/street/index.vue index 02409e3..d733e3b 100644 --- a/src/views/street/index.vue +++ b/src/views/street/index.vue @@ -1,8 +1,9 @@ \ No newline at end of file + diff --git a/src/views/viewrecords/components/addViewRecord.vue b/src/views/viewrecords/components/addViewRecord.vue index fc4a52b..3eef456 100644 --- a/src/views/viewrecords/components/addViewRecord.vue +++ b/src/views/viewrecords/components/addViewRecord.vue @@ -28,7 +28,7 @@
- +
@@ -41,7 +41,7 @@
- @@ -82,7 +82,7 @@
- +
@@ -137,7 +137,7 @@
- +
@@ -150,7 +150,7 @@
- +
@@ -210,7 +210,7 @@
- +
@@ -223,7 +223,7 @@
- +
@@ -312,7 +312,7 @@
- +
@@ -409,15 +409,17 @@ guardian_telephone: "", remark: "", }, - rules: {}, - sexList: [], - marryList: [], - disabilitytypeList: [], - disabilitylevelList: [], - educationList: [], - relationList: [], - viewstatusList: [], - viewsceneList: [] + rules: {}, + lists:{ + sexList: [], + marryList: [], + disabilitytypeList: [], + disabilitylevelList: [], + educationList: [], + relationList: [], + viewstatusList: [], + viewsceneList: [] + } } }, @@ -441,39 +443,20 @@ } }, methods: { - async getLabel() { - const sex = await getparameter({ - number: "sexList", - }); - this.sexList = sex?.detail; - const marry = await getparameter({ - number: "marryList", - }); - this.marryList = marry?.detail; - const disabilitylevel = await getparameter({ - number: "disabilitylevelList", - }); - this.disabilitylevelList = disabilitylevel?.detail; - const disabilitytype = await getparameter({ - number: "disabilitytypeList", - }); - this.disabilitytypeList = disabilitytype?.detail; - const education = await getparameter({ - number: "educationList", - }); - this.educationList = education?.detail; - const relation = await getparameter({ - number: "relationList", - }); - this.relationList = relation?.detail; - const viewscene = await getparameter({ - number: "viewsceneList", - }); - this.viewsceneList = viewscene?.detail; - const viewstatus = await getparameter({ - number: "viewstatusList", - }); - this.viewstatusList = viewstatus?.detail; + async getLabel() { + let numbers = { + number:['sexList','marryList','disabilitylevelList','disabilitytypeList','educationList','relationList','viewsceneList','viewstatusList'] + } + const res = await getparameter(numbers); + for(var k of res){ + console.log(k) + for(var m in this.lists){ + if(m==k.number){ + this.lists[m] = k.detail + } + } + } + }, async getRecordDetail() { const res = await show({