@@ -103,16 +103,22 @@
width: 120,
prop: 'name',
align: 'center'
+ },
+ {
+ label: "所属街道",
+ width: 120,
+ prop: 'street',
+ align: 'center'
},
{
label: "身份证",
- width: 120,
+ width: 180,
prop: 'idcard',
align: 'center'
},
{
label: "残疾证",
- width: 120,
+ width: 180,
prop: 'number',
align: 'center'
},
diff --git a/src/views/component/dialog.vue b/src/views/component/dialog.vue
index 1ae2cd0..a43bd2a 100644
--- a/src/views/component/dialog.vue
+++ b/src/views/component/dialog.vue
@@ -42,6 +42,7 @@ export default {
(() => {
let dom = [];
this.formInfo.filter(i => i.form_show).forEach((i, index) => {
+ console.log("i",i)
dom.push(
h(
"el-form-item",
@@ -73,8 +74,9 @@ export default {
...addPropsMap.get(i.edit_input),
...this.extraProps(i),
placeholder: i.help,
- value: this.form[i.field],
+ value: this.form[i.field]
},
+ // i.select_item && typeof i.select_item === 'object' && (toString.call(i.select_item) !== "[object Array]") ? this.findKey(i.select_item,this.form[i.field]) :
attrs: {
placeholder: i.help || `请填写${i.name}`,
},
@@ -197,6 +199,10 @@ export default {
};
},
methods: {
+ findKey(obj, value, compare = (a, b) => a === b) {
+ return Object.keys(obj).find(k => compare(parseInt(obj[k]), parseInt(value)))
+ },
+
fileRemoveHandler(file, field) {
this.file[field] = this.file[field].filter((item) => item !== file);
this.file = Object.assign({}, this.file);
@@ -408,6 +414,10 @@ export default {
{ required: true, message: `请填写${i.name}` },
];
}
+ if (i.edit_input === "text" && typeof i.select_item === 'object' && Object.prototype.toString.call(i.select_item) !== '[object Array]') {
+
+ i.edit_input = 'radio';
+ }
if (i.edit_input === "files") {
this.form[i.field] = [];
}
diff --git a/src/views/component/table.vue b/src/views/component/table.vue
index ac83c45..8f90246 100644
--- a/src/views/component/table.vue
+++ b/src/views/component/table.vue
@@ -276,7 +276,7 @@
>
@@ -326,6 +326,8 @@ export default {
],
},
form: [],
+ importForm:[],
+ exportForm:[],
table: [],
customForm: {
customFormId: "",
@@ -351,7 +353,7 @@ export default {
Object.assign(this.select, { page: 1, page_size: 9999 })
);
if (res.data) {
- let headers = this.form.map((i) => {
+ let headers = this.exportForm.map((i) => {
return {
key: i.field,
title: i.name,
@@ -444,6 +446,8 @@ export default {
}
});
this.form = fields.sort(this.handle('sort'));
+
+ console.log("this.form",this.form)
// if(res.fields && res.fields instanceof Array) {
// res.fields.forEach(i => {
// if (i.field) {
@@ -471,11 +475,22 @@ export default {
// })
// }
// this.form = res.fields
+ this.importForm = this.form
+ ?.filter((i) => i.form_show&&i.list_show)
+ .map((i)=>{
+ return i
+ })
+ this.exportForm = this.form
+ ?.filter((i) => i.list_show)
+ .map((i)=>{
+ return i
+ })
this.table = this.form
?.filter((i) => i.list_show)
.map((i) => {
let linkOb = {};
- if (i.select_item && typeof i.select_item === 'object' && (toString.call(i.select_item) !== "[object Array]")) {
+ if (i.edit_input==='radio'||i.edit_input==='checkbox' && i.select_item && typeof i.select_item === 'object' && Object.prototype.toString.call(i.select_item) !== '[object Array]') {
+ console.log("i",i.select_item)
let keys = Object.keys(i.select_item)
linkOb.customFn = row => {
let paramMap = new Map()
@@ -531,13 +546,13 @@ export default {
{
prop: i.field,
label: i.name,
- width: i.width,
+ width: i.width==0?120:i.width,
fixed: i.is_fixed,
+ align: i.width==240?'left':'center'
},
linkOb
);
});
- console.log(this.table)
this.table.unshift({
type: "index",
width: 60,
diff --git a/src/views/record/components/addRecord.vue b/src/views/record/components/addRecord.vue
index 5f5ff85..b948942 100644
--- a/src/views/record/components/addRecord.vue
+++ b/src/views/record/components/addRecord.vue
@@ -12,7 +12,7 @@
- 所属街道:
+ *所属街道:
@@ -277,7 +277,7 @@
- *关系:
+ 关系:
diff --git a/src/views/record/index.vue b/src/views/record/index.vue
index cbf1aae..6fb8404 100644
--- a/src/views/record/index.vue
+++ b/src/views/record/index.vue
@@ -37,7 +37,7 @@
-
+
@@ -79,7 +79,9 @@
customFormId: 1,
tableName: "records"
},
- form: [],
+ form: [],
+ importForm:[],
+ exportForm:[],
total: 0,
list: [],
table: [{
@@ -109,7 +111,7 @@
},
{
label: "身份证号",
- width: 120,
+ width: 180,
prop: 'idcard',
align: 'center'
},
@@ -127,7 +129,7 @@
},
{
label: "残疾证号",
- width: 120,
+ width: 180,
prop: 'number',
align: 'center'
},
@@ -172,7 +174,8 @@
const res = await index({
page_size: this.select.pageSize,
page: this.select.pageIndex,
- table_name: this.customForm.tableName,
+ table_name: this.customForm.tableName,
+ show_relation:['admin','department'],
filter: [{
"key": "name",
"op": "like",
@@ -261,12 +264,22 @@
}
})
}
- this.form = res.data
+ this.form = res.data
+ this.importForm = this.form
+ ?.filter((i) => i.form_show&&i.list_show)
+ .map((i)=>{
+ return i
+ })
+ this.exportForm = this.form
+ ?.filter((i) => i.list_show)
+ .map((i)=>{
+ return i
+ })
},
async exportExcel(sheetName) {
const res = await index(Object.assign(this.select,{ page: 1,page_size: 99999,table_name: this.customForm.tableName}))
if(res.data){
- let headers = this.form.map(i => {
+ let headers = this.exportForm.map(i => {
return {
key: i.field,
title: i.name
diff --git a/src/views/record/personinfo.vue b/src/views/record/personinfo.vue
index 5efb3f0..0d51c72 100644
--- a/src/views/record/personinfo.vue
+++ b/src/views/record/personinfo.vue
@@ -104,16 +104,25 @@
let names = `
${res.name}
`
let contents = `
姓名:${res.name}
性别:${res.sex}
残疾类别:${res.disabilitytype}
残疾等级:${res?.disabilitylevel}
现居住地:${res.reside}
`
let views = ''
+ let workflows = ''
if(res.idcard_viewrecords_idcard_relation.length>0){
for(var k of res.idcard_viewrecords_idcard_relation){
if(k.checkstatus=='通过'){
- views+=`
${k.viewtime}/${k.viewscene}
`
+ views+=`
${k.viewtime?.substring(0,10)}/${k.viewscene}
`
+ }
+ }
+ }
+ if(res.idcard_workflows_idcard_relation.length>0){
+ for(var k of res.idcard_workflows_idcard_relation){
+ if(k.work_status=='通过'){
+ workflows+=`
${k.created_at?.substring(0,10)}/${k.guanlianbiaoming}
`
}
}
}
this.option['nodeList'][0]['content'] = names
this.option['nodeList'][1]['content'] = contents
+ this.option['nodeList'][2]['content'] = workflows
this.option['nodeList'][3]['content'] = views
}
diff --git a/src/views/viewrecords/components/addViewRecord.vue b/src/views/viewrecords/components/addViewRecord.vue
index f94e97a..3eb52e4 100644
--- a/src/views/viewrecords/components/addViewRecord.vue
+++ b/src/views/viewrecords/components/addViewRecord.vue
@@ -58,7 +58,7 @@
- 所属街道:
+ *所属街道:
@@ -101,6 +101,19 @@
+
+
+
+
+ 婚姻状况:
+
+
+
+
+
+
+
+
@@ -144,19 +157,7 @@
-
-
-
- 婚姻状况:
-
-
-
-
-
-
-
-
-
+
@@ -193,10 +194,11 @@
- 现居住地:
+ *现居住地:
-
@@ -322,7 +324,7 @@
- *关系:
+ 关系:
@@ -380,15 +382,23 @@
} from "@/api/system/baseForm.js"
import {
Message
- } from 'element-ui'
- export default {
+ } from 'element-ui'
+ import AvueMap from 'avue-plugin-map'
+ export default {
+ components: {
+ AvueMap
+ },
data() {
return {
isShow: false,
id: '',
person_id: '',
type: 'add',
- tableName: 'viewrecords',
+ tableName: 'viewrecords',
+ mapparams: {
+ zoom: 11,
+ },
+ mapform: [],
form: {
viewtext: '',
viewtime: "",
@@ -456,6 +466,13 @@
this.person_id = ''
this.$refs['dialog'].reset()
}
+ },
+ mapform(newVal){
+ if(newVal){
+ this.form.longitude = newVal[0]
+ this.form.latitude = newVal[1]
+ this.form.reside = newVal[2]
+ }
}
},
methods: {
@@ -496,7 +513,9 @@
education: res?.education,
household: res?.household,
address: res?.address,
- reside: res?.reside,
+ reside: res?.reside,
+ longitude: res?.longitude,
+ latitude:res?.latitude,
disabilitytext: '',
number: res?.number,
disabilitytype: res?.disabilitytype,
@@ -512,7 +531,8 @@
guardian_mobile: res?.guardian_mobile,
guardian_telephone: res?.guardian_telephone,
remark: res?.remark,
- }
+ }
+ this.mapform = [res.longitude,res.latitude,res.reside]
},
async getViewDetail() {
const res = await show({
@@ -539,7 +559,9 @@
education: res?.education,
household: res?.household,
address: res?.address,
- reside: res?.reside,
+ reside: res?.reside,
+ longitude: res?.longitude,
+ latitude:res?.latitude,
disabilitytext: '',
number: res?.number,
disabilitytype: res?.disabilitytype,
@@ -555,7 +577,8 @@
guardian_mobile: res?.guardian_mobile,
guardian_telephone: res?.guardian_telephone,
remark: res?.remark,
- }
+ }
+ this.mapform = [res.longitude,res.latitude,res.reside]
},
diff --git a/src/views/viewrecords/index.vue b/src/views/viewrecords/index.vue
index 164868d..f8916d7 100644
--- a/src/views/viewrecords/index.vue
+++ b/src/views/viewrecords/index.vue
@@ -35,7 +35,7 @@
-
+
@@ -71,12 +71,15 @@
pageSize: 10,
pageIndex: 1,
keyword: ""
- },
+ },
+ importForm:[],
rukuType: '',
customForm: {
customFormId: 2,
tableName: "viewrecords"
- },
+ },
+ importForm:[],
+ exportForm:[],
form: [],
total: 0,
list: [],
@@ -91,7 +94,10 @@
width: 120,
prop: 'viewtime',
align: 'center',
- fixed: 'left'
+ fixed: 'left',
+ formatter:(cell,data,value)=>{
+ return value?value.substring(0,10):''
+ }
},
{
label: "访视情景",
@@ -131,7 +137,7 @@
},
{
label: "身份证号",
- width: 120,
+ width: 180,
prop: 'idcard',
align: 'center'
},
@@ -149,7 +155,7 @@
},
{
label: "残疾证号",
- width: 120,
+ width: 180,
prop: 'number',
align: 'center'
},
@@ -279,11 +285,22 @@
})
}
this.form = res.data
+ this.importForm = this.form
+ ?.filter((i) => i.form_show&&i.list_show)
+ .map((i)=>{
+ return i
+ })
+ this.exportForm = this.form
+ ?.filter((i) => i.list_show)
+ .map((i)=>{
+ return i
+ })
+
},
async exportExcel(sheetName) {
const res = await index(Object.assign(this.select,{ page: 1,page_size: 99999,table_name: this.customForm.tableName}))
if(res.data){
- let headers = this.form.map(i => {
+ let headers = this.exportForm.map(i => {
return {
key: i.field,
title: i.name
diff --git a/vue.config.js b/vue.config.js
index 028943a..1bc8b0d 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -25,7 +25,7 @@ module.exports = {
* Detail: https://cli.vuejs.org/config/#publicpath
*/
publicPath: '/admin/',
- outputDir: '/Users/mac/Documents/朗业/2023/j-金坛残联/jintan-canlian-web/public/admin',
+ outputDir: '/Users/mac/Documents/朗业/2023/j-金坛残联/jintancanlian-test/public/admin',
assetsDir: 'static',
css: {
loaderOptions: { // 向 CSS 相关的 loader 传递选项