...
|
...
|
@@ -38,12 +38,12 @@ export default { |
|
|
prop: 'days',
|
|
|
label: '日期',
|
|
|
align: 'center',
|
|
|
width:300
|
|
|
width: 300
|
|
|
}, {
|
|
|
prop: 'times',
|
|
|
label: '巡检时间',
|
|
|
align: 'center',
|
|
|
width:300
|
|
|
width: 300
|
|
|
}, {
|
|
|
prop: 'type',
|
|
|
label: '巡检类型',
|
...
|
...
|
@@ -60,7 +60,7 @@ export default { |
|
|
prop: 'createTime',
|
|
|
label: '创建时间',
|
|
|
align: 'center',
|
|
|
width:180
|
|
|
width: 180
|
|
|
}
|
|
|
]
|
|
|
})
|
...
|
...
|
@@ -88,8 +88,8 @@ export default { |
|
|
* 加载列表
|
|
|
*/
|
|
|
const getList = () => {
|
|
|
proxy.$http.get( '/api-web/inspectionExcelConfig/list', queryParams.value,res => {
|
|
|
if(res && res.success){
|
|
|
proxy.$http.get('/api-web/inspectionExcelConfig/list', queryParams.value, res => {
|
|
|
if (res && res.success) {
|
|
|
count.value = res.count;
|
|
|
tableData.value.dataList = res.data;
|
|
|
}
|
...
|
...
|
@@ -126,7 +126,7 @@ export default { |
|
|
type: '',
|
|
|
number: 0,
|
|
|
times: '',
|
|
|
id:-1
|
|
|
id: -1
|
|
|
};
|
|
|
configArr.value = [];
|
|
|
}
|
...
|
...
|
@@ -143,16 +143,18 @@ export default { |
|
|
*/
|
|
|
const saveConfig = () => {
|
|
|
let arr = configArr.value;
|
|
|
if(arr.length > 0){
|
|
|
if (arr.length > 0) {
|
|
|
let url = '/api-web/inspectionExcelConfig/update';
|
|
|
if(formParams.value.id === -1){
|
|
|
if (formParams.value.id === -1) {
|
|
|
url = '/api-web/inspectionExcelConfig/add';
|
|
|
}
|
|
|
proxy.$http.post(url,arr,res => {
|
|
|
if(res && res.success){
|
|
|
proxy.$http.post(url, arr, res => {
|
|
|
if (res && res.success) {
|
|
|
global.showMsg("操作成功!", "success");
|
|
|
closeDialog();
|
|
|
getList();
|
|
|
} else {
|
|
|
global.showMsg(res.msg, "error");
|
|
|
}
|
|
|
});
|
|
|
}
|
...
|
...
|
@@ -166,7 +168,7 @@ export default { |
|
|
title.value = '编辑'
|
|
|
showDialog.value = true;
|
|
|
formParams.value.id = row.id;
|
|
|
proxy.$http.get('/api-web/inspectionExcelConfig/info', {id:row.id},res => {
|
|
|
proxy.$http.get('/api-web/inspectionExcelConfig/info', {id: row.id}, res => {
|
|
|
configArr.value = [res.object]
|
|
|
});
|
|
|
}
|
...
|
...
|
@@ -177,7 +179,7 @@ export default { |
|
|
*/
|
|
|
const deleteByIds = (row) => {
|
|
|
let id = ids;
|
|
|
if(multiple.value){
|
|
|
if (multiple.value) {
|
|
|
id = [row.id];
|
|
|
}
|
|
|
|
...
|
...
|
@@ -187,7 +189,7 @@ export default { |
|
|
}
|
|
|
|
|
|
global.confirm("确认删除吗?", function () {
|
|
|
proxy.$http.get('/api-web/inspectionExcelConfig/delete?idList=' + id.join(','), {},(res) => {
|
|
|
proxy.$http.get('/api-web/inspectionExcelConfig/delete?idList=' + id.join(','), {}, (res) => {
|
|
|
if (res.success) {
|
|
|
global.showMsg("删除成功", "success");
|
|
|
closeDialog()
|
...
|
...
|
@@ -201,7 +203,7 @@ export default { |
|
|
|
|
|
|
|
|
const typeChange = (val) => {
|
|
|
if(typeof val === 'object'){
|
|
|
if (typeof val === 'object') {
|
|
|
let typeInfo = typeArr.find(e => e.value == val.type);
|
|
|
val.number = typeInfo.number
|
|
|
val.times = typeInfo.times
|
...
|
...
|
@@ -250,7 +252,7 @@ export default { |
|
|
}
|
|
|
formRef.value.resetFields();
|
|
|
formParams.value = {
|
|
|
id:-1
|
|
|
id: -1
|
|
|
}
|
|
|
})
|
|
|
}
|
...
|
...
|
@@ -261,7 +263,7 @@ export default { |
|
|
|
|
|
const getTypeLabel = (row) => {
|
|
|
let typeInfo = typeArr.find(e => e.value == row.type);
|
|
|
if(typeInfo){
|
|
|
if (typeInfo) {
|
|
|
return typeInfo.label;
|
|
|
}
|
|
|
return '';
|
...
|
...
|
|