|
|
|
@ -136,7 +136,6 @@
|
|
|
|
|
|
|
|
|
|
<!-- 列表配置显示 --> |
|
|
|
|
<edittablehead |
|
|
|
|
@setcolum="setnewcolum" |
|
|
|
|
@closce="showdrawer" |
|
|
|
|
:drawerShow="drawerShow" |
|
|
|
|
v-model="details.columnList" |
|
|
|
@ -158,6 +157,9 @@ import {
|
|
|
|
|
deepClone, |
|
|
|
|
handleClearTableQuery, |
|
|
|
|
getObjType, |
|
|
|
|
handleSelectQuery, |
|
|
|
|
handleInputQuery, |
|
|
|
|
handleTranslationDataSeclect, |
|
|
|
|
} from '@/utils/util'; |
|
|
|
|
import { columnList } from '@/option/distribution/abnormalList'; |
|
|
|
|
import { useRouter } from 'vue-router'; |
|
|
|
@ -297,19 +299,7 @@ const onLoad = async (page?: any, params = {}) => {
|
|
|
|
|
if (code !== 200) return; |
|
|
|
|
details.data = data.records; |
|
|
|
|
|
|
|
|
|
const valueArr = details.columnList.filter(val => val.type === 3); |
|
|
|
|
|
|
|
|
|
for (let i = 0; i < details.data.length; i++) { |
|
|
|
|
const value = details.data[i]; |
|
|
|
|
|
|
|
|
|
for (let index = 0; index < valueArr.length; index++) { |
|
|
|
|
const item = valueArr[index]; |
|
|
|
|
const label = item.prop.replace('Name', ''); |
|
|
|
|
value[item.prop] = |
|
|
|
|
(item.checkarr.find(val => Number(val.value) === Number(value[label])) || {}).label || |
|
|
|
|
value[label]; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
handleTranslationDataSeclect(details.data, details.columnList); |
|
|
|
|
|
|
|
|
|
details.page.total = data.total; |
|
|
|
|
} catch (error) { |
|
|
|
@ -349,7 +339,7 @@ const searchHide = () => {
|
|
|
|
|
|
|
|
|
|
/** 表格表头输入框搜索 */ |
|
|
|
|
const inputsc = (index, row) => { |
|
|
|
|
details.query[row.prop] = index; |
|
|
|
|
handleInputQuery(index, row, details.query); |
|
|
|
|
onLoad(details.page); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
@ -368,12 +358,7 @@ const timesc = (index, row) => {
|
|
|
|
|
|
|
|
|
|
/** 表格表头下拉框选择 */ |
|
|
|
|
const selectsc = (index, row) => { |
|
|
|
|
details.query[row.prop] = index; |
|
|
|
|
if (!index && index !== 0) delete details.query[row.prop]; |
|
|
|
|
if (row.prop === 'certificateTypeName') { |
|
|
|
|
details.query['certificateType'] = index; |
|
|
|
|
if (!index) delete details.query['certificateType']; |
|
|
|
|
} |
|
|
|
|
handleSelectQuery(index, row, details.query); |
|
|
|
|
onLoad(details.page); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
@ -394,24 +379,6 @@ const currentChange = current => {
|
|
|
|
|
onLoad(); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 设置列表 -- 固定函数 |
|
|
|
|
* 弹窗的勾选回调,用于更改头部数组 |
|
|
|
|
* 固定搭配,只需要更换 columnList |
|
|
|
|
* */ |
|
|
|
|
const setnewcolum = (newarr, headarr, type) => { |
|
|
|
|
if (type == 1) { |
|
|
|
|
details.columnList = newarr; |
|
|
|
|
functions.setStorage(window.location.pathname + 'checkList', headarr); |
|
|
|
|
} else if (type == 2) { |
|
|
|
|
details.columnList = newarr; |
|
|
|
|
functions.setStorage(window.location.pathname + 'flexList', headarr); |
|
|
|
|
} else if (type == 3) { |
|
|
|
|
details.columnList = newarr; |
|
|
|
|
functions.setStorage(window.location.pathname + 'sortlist', headarr); |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
/** 弹出层开启前清除数据 */ |
|
|
|
|
const beforeClose = done => { |
|
|
|
|
done(); |
|
|
|
|