diff --git a/src/api/home/rule/proxy.ts b/src/api/home/rule/proxy.ts index 44a90c2..da5934a 100644 --- a/src/api/home/rule/proxy.ts +++ b/src/api/home/rule/proxy.ts @@ -1,6 +1,7 @@ /** * 考核指标管理相关接口 */ +import qs from 'qs' import request from '@/api/index' // 分页列表 @@ -42,6 +43,9 @@ method: 'get', params, responseType: 'blob', + paramsSerializer: { + serialize: params => qs.stringify(params, { arrayFormat: 'repeat' }), + }, }) } // 导入 diff --git a/src/api/home/rule/proxy.ts b/src/api/home/rule/proxy.ts index 44a90c2..da5934a 100644 --- a/src/api/home/rule/proxy.ts +++ b/src/api/home/rule/proxy.ts @@ -1,6 +1,7 @@ /** * 考核指标管理相关接口 */ +import qs from 'qs' import request from '@/api/index' // 分页列表 @@ -42,6 +43,9 @@ method: 'get', params, responseType: 'blob', + paramsSerializer: { + serialize: params => qs.stringify(params, { arrayFormat: 'repeat' }), + }, }) } // 导入 diff --git a/src/views/alarm/alarmList.vue b/src/views/alarm/alarmList.vue index 4afdf2e..2ff7102 100644 --- a/src/views/alarm/alarmList.vue +++ b/src/views/alarm/alarmList.vue @@ -65,14 +65,22 @@ // 开始结束时间 const datetimerange = ref() watch(() => datetimerange.value, (newVal) => { - if (newVal.length) { - listQuery.startTime = `${newVal[0]} 00:00:00` - listQuery.endTime = `${newVal[1]} 23:59:59` + listQuery.startTime = '' + listQuery.endTime = '' + if (Array.isArray(newVal)) { + if (newVal.length) { + listQuery.startTime = `${newVal[0]} 00:00:00` + listQuery.endTime = `${newVal[1]} 23:59:59` + } } - else { - listQuery.startTime = '' - listQuery.endTime = '' - } + // if (newVal.length) { + // listQuery.startTime = `${newVal[0]} 00:00:00` + // listQuery.endTime = `${newVal[1]} 23:59:59` + // } + // else { + // listQuery.startTime = '' + // listQuery.endTime = '' + // } }) // 获取数据 diff --git a/src/api/home/rule/proxy.ts b/src/api/home/rule/proxy.ts index 44a90c2..da5934a 100644 --- a/src/api/home/rule/proxy.ts +++ b/src/api/home/rule/proxy.ts @@ -1,6 +1,7 @@ /** * 考核指标管理相关接口 */ +import qs from 'qs' import request from '@/api/index' // 分页列表 @@ -42,6 +43,9 @@ method: 'get', params, responseType: 'blob', + paramsSerializer: { + serialize: params => qs.stringify(params, { arrayFormat: 'repeat' }), + }, }) } // 导入 diff --git a/src/views/alarm/alarmList.vue b/src/views/alarm/alarmList.vue index 4afdf2e..2ff7102 100644 --- a/src/views/alarm/alarmList.vue +++ b/src/views/alarm/alarmList.vue @@ -65,14 +65,22 @@ // 开始结束时间 const datetimerange = ref() watch(() => datetimerange.value, (newVal) => { - if (newVal.length) { - listQuery.startTime = `${newVal[0]} 00:00:00` - listQuery.endTime = `${newVal[1]} 23:59:59` + listQuery.startTime = '' + listQuery.endTime = '' + if (Array.isArray(newVal)) { + if (newVal.length) { + listQuery.startTime = `${newVal[0]} 00:00:00` + listQuery.endTime = `${newVal[1]} 23:59:59` + } } - else { - listQuery.startTime = '' - listQuery.endTime = '' - } + // if (newVal.length) { + // listQuery.startTime = `${newVal[0]} 00:00:00` + // listQuery.endTime = `${newVal[1]} 23:59:59` + // } + // else { + // listQuery.startTime = '' + // listQuery.endTime = '' + // } }) // 获取数据 diff --git a/src/views/flling/treat/index.vue b/src/views/flling/treat/index.vue index 548b3d1..fd8ce76 100644 --- a/src/views/flling/treat/index.vue +++ b/src/views/flling/treat/index.vue @@ -129,14 +129,22 @@ // 开始结束时间 const datetimerange = ref() watch(() => datetimerange.value, (newVal) => { - if (newVal.length) { - listQuery.startTime = `${newVal[0]} 00:00:00` - listQuery.endTime = `${newVal[1]} 23:59:59` + listQuery.startTime = '' + listQuery.endTime = '' + if (Array.isArray(newVal)) { + if (newVal.length) { + listQuery.startTime = `${newVal[0]} 00:00:00` + listQuery.endTime = `${newVal[1]} 23:59:59` + } } - else { - listQuery.startTime = '' - listQuery.endTime = '' - } + // if (newVal.length) { + // listQuery.startTime = `${newVal[0]} 00:00:00` + // listQuery.endTime = `${newVal[1]} 23:59:59` + // } + // else { + // listQuery.startTime = '' + // listQuery.endTime = '' + // } }) // 重置 const reset = () => { diff --git a/src/api/home/rule/proxy.ts b/src/api/home/rule/proxy.ts index 44a90c2..da5934a 100644 --- a/src/api/home/rule/proxy.ts +++ b/src/api/home/rule/proxy.ts @@ -1,6 +1,7 @@ /** * 考核指标管理相关接口 */ +import qs from 'qs' import request from '@/api/index' // 分页列表 @@ -42,6 +43,9 @@ method: 'get', params, responseType: 'blob', + paramsSerializer: { + serialize: params => qs.stringify(params, { arrayFormat: 'repeat' }), + }, }) } // 导入 diff --git a/src/views/alarm/alarmList.vue b/src/views/alarm/alarmList.vue index 4afdf2e..2ff7102 100644 --- a/src/views/alarm/alarmList.vue +++ b/src/views/alarm/alarmList.vue @@ -65,14 +65,22 @@ // 开始结束时间 const datetimerange = ref() watch(() => datetimerange.value, (newVal) => { - if (newVal.length) { - listQuery.startTime = `${newVal[0]} 00:00:00` - listQuery.endTime = `${newVal[1]} 23:59:59` + listQuery.startTime = '' + listQuery.endTime = '' + if (Array.isArray(newVal)) { + if (newVal.length) { + listQuery.startTime = `${newVal[0]} 00:00:00` + listQuery.endTime = `${newVal[1]} 23:59:59` + } } - else { - listQuery.startTime = '' - listQuery.endTime = '' - } + // if (newVal.length) { + // listQuery.startTime = `${newVal[0]} 00:00:00` + // listQuery.endTime = `${newVal[1]} 23:59:59` + // } + // else { + // listQuery.startTime = '' + // listQuery.endTime = '' + // } }) // 获取数据 diff --git a/src/views/flling/treat/index.vue b/src/views/flling/treat/index.vue index 548b3d1..fd8ce76 100644 --- a/src/views/flling/treat/index.vue +++ b/src/views/flling/treat/index.vue @@ -129,14 +129,22 @@ // 开始结束时间 const datetimerange = ref() watch(() => datetimerange.value, (newVal) => { - if (newVal.length) { - listQuery.startTime = `${newVal[0]} 00:00:00` - listQuery.endTime = `${newVal[1]} 23:59:59` + listQuery.startTime = '' + listQuery.endTime = '' + if (Array.isArray(newVal)) { + if (newVal.length) { + listQuery.startTime = `${newVal[0]} 00:00:00` + listQuery.endTime = `${newVal[1]} 23:59:59` + } } - else { - listQuery.startTime = '' - listQuery.endTime = '' - } + // if (newVal.length) { + // listQuery.startTime = `${newVal[0]} 00:00:00` + // listQuery.endTime = `${newVal[1]} 23:59:59` + // } + // else { + // listQuery.startTime = '' + // listQuery.endTime = '' + // } }) // 重置 const reset = () => { diff --git a/src/views/result/dept/index.vue b/src/views/result/dept/index.vue index cd5166f..5c5f367 100644 --- a/src/views/result/dept/index.vue +++ b/src/views/result/dept/index.vue @@ -90,14 +90,22 @@ // 开始结束时间 const datetimerange = ref() watch(() => datetimerange.value, (newVal) => { - if (newVal.length) { - listQuery.startTime = `${newVal[0]} 00:00:00` - listQuery.endTime = `${newVal[1]} 23:59:59` + listQuery.startTime = '' + listQuery.endTime = '' + if (Array.isArray(newVal)) { + if (newVal.length) { + listQuery.startTime = `${newVal[0]} 00:00:00` + listQuery.endTime = `${newVal[1]} 23:59:59` + } } - else { - listQuery.startTime = '' - listQuery.endTime = '' - } + // if (newVal.length) { + // listQuery.startTime = `${newVal[0]} 00:00:00` + // listQuery.endTime = `${newVal[1]} 23:59:59` + // } + // else { + // listQuery.startTime = '' + // listQuery.endTime = '' + // } }) // 获取数据 @@ -270,7 +278,7 @@ 详情 - + 编辑 diff --git a/src/api/home/rule/proxy.ts b/src/api/home/rule/proxy.ts index 44a90c2..da5934a 100644 --- a/src/api/home/rule/proxy.ts +++ b/src/api/home/rule/proxy.ts @@ -1,6 +1,7 @@ /** * 考核指标管理相关接口 */ +import qs from 'qs' import request from '@/api/index' // 分页列表 @@ -42,6 +43,9 @@ method: 'get', params, responseType: 'blob', + paramsSerializer: { + serialize: params => qs.stringify(params, { arrayFormat: 'repeat' }), + }, }) } // 导入 diff --git a/src/views/alarm/alarmList.vue b/src/views/alarm/alarmList.vue index 4afdf2e..2ff7102 100644 --- a/src/views/alarm/alarmList.vue +++ b/src/views/alarm/alarmList.vue @@ -65,14 +65,22 @@ // 开始结束时间 const datetimerange = ref() watch(() => datetimerange.value, (newVal) => { - if (newVal.length) { - listQuery.startTime = `${newVal[0]} 00:00:00` - listQuery.endTime = `${newVal[1]} 23:59:59` + listQuery.startTime = '' + listQuery.endTime = '' + if (Array.isArray(newVal)) { + if (newVal.length) { + listQuery.startTime = `${newVal[0]} 00:00:00` + listQuery.endTime = `${newVal[1]} 23:59:59` + } } - else { - listQuery.startTime = '' - listQuery.endTime = '' - } + // if (newVal.length) { + // listQuery.startTime = `${newVal[0]} 00:00:00` + // listQuery.endTime = `${newVal[1]} 23:59:59` + // } + // else { + // listQuery.startTime = '' + // listQuery.endTime = '' + // } }) // 获取数据 diff --git a/src/views/flling/treat/index.vue b/src/views/flling/treat/index.vue index 548b3d1..fd8ce76 100644 --- a/src/views/flling/treat/index.vue +++ b/src/views/flling/treat/index.vue @@ -129,14 +129,22 @@ // 开始结束时间 const datetimerange = ref() watch(() => datetimerange.value, (newVal) => { - if (newVal.length) { - listQuery.startTime = `${newVal[0]} 00:00:00` - listQuery.endTime = `${newVal[1]} 23:59:59` + listQuery.startTime = '' + listQuery.endTime = '' + if (Array.isArray(newVal)) { + if (newVal.length) { + listQuery.startTime = `${newVal[0]} 00:00:00` + listQuery.endTime = `${newVal[1]} 23:59:59` + } } - else { - listQuery.startTime = '' - listQuery.endTime = '' - } + // if (newVal.length) { + // listQuery.startTime = `${newVal[0]} 00:00:00` + // listQuery.endTime = `${newVal[1]} 23:59:59` + // } + // else { + // listQuery.startTime = '' + // listQuery.endTime = '' + // } }) // 重置 const reset = () => { diff --git a/src/views/result/dept/index.vue b/src/views/result/dept/index.vue index cd5166f..5c5f367 100644 --- a/src/views/result/dept/index.vue +++ b/src/views/result/dept/index.vue @@ -90,14 +90,22 @@ // 开始结束时间 const datetimerange = ref() watch(() => datetimerange.value, (newVal) => { - if (newVal.length) { - listQuery.startTime = `${newVal[0]} 00:00:00` - listQuery.endTime = `${newVal[1]} 23:59:59` + listQuery.startTime = '' + listQuery.endTime = '' + if (Array.isArray(newVal)) { + if (newVal.length) { + listQuery.startTime = `${newVal[0]} 00:00:00` + listQuery.endTime = `${newVal[1]} 23:59:59` + } } - else { - listQuery.startTime = '' - listQuery.endTime = '' - } + // if (newVal.length) { + // listQuery.startTime = `${newVal[0]} 00:00:00` + // listQuery.endTime = `${newVal[1]} 23:59:59` + // } + // else { + // listQuery.startTime = '' + // listQuery.endTime = '' + // } }) // 获取数据 @@ -270,7 +278,7 @@ 详情 - + 编辑 diff --git a/src/views/rule/programme/components/edit.vue b/src/views/rule/programme/components/edit.vue index dcdbf54..2608f04 100644 --- a/src/views/rule/programme/components/edit.vue +++ b/src/views/rule/programme/components/edit.vue @@ -88,9 +88,14 @@ } // 删除上传的文件 const deleteFile = (fileName: string) => { - const data = ruleForm.value.fileId.split(',') + const data = ruleForm.value.fileName.split(',') const filterData = data.filter(item => item !== fileName) - ruleForm.value.fileId = filterData.length ? filterData.join(',') : '' + const index = ruleForm.value.fileName.indexOf(fileName) + const filterIds = ruleForm.value.fileId.split(',').filter((item: any, cindex: number) => index! == cindex) + // console.log(index, 'index') + ruleForm.value.fileName = filterData.length ? filterData.join(',') : '' + ruleForm.value.fileId = filterIds.length ? filterIds.join(',') : '' + console.log(ruleForm.value.fileName, ruleForm.value.fileId) } // 考核对象下拉列表 const objectList = ref<{ id: string; value: string; name: string }[]>() @@ -338,6 +343,9 @@ 上传 + diff --git a/src/api/home/rule/proxy.ts b/src/api/home/rule/proxy.ts index 44a90c2..da5934a 100644 --- a/src/api/home/rule/proxy.ts +++ b/src/api/home/rule/proxy.ts @@ -1,6 +1,7 @@ /** * 考核指标管理相关接口 */ +import qs from 'qs' import request from '@/api/index' // 分页列表 @@ -42,6 +43,9 @@ method: 'get', params, responseType: 'blob', + paramsSerializer: { + serialize: params => qs.stringify(params, { arrayFormat: 'repeat' }), + }, }) } // 导入 diff --git a/src/views/alarm/alarmList.vue b/src/views/alarm/alarmList.vue index 4afdf2e..2ff7102 100644 --- a/src/views/alarm/alarmList.vue +++ b/src/views/alarm/alarmList.vue @@ -65,14 +65,22 @@ // 开始结束时间 const datetimerange = ref() watch(() => datetimerange.value, (newVal) => { - if (newVal.length) { - listQuery.startTime = `${newVal[0]} 00:00:00` - listQuery.endTime = `${newVal[1]} 23:59:59` + listQuery.startTime = '' + listQuery.endTime = '' + if (Array.isArray(newVal)) { + if (newVal.length) { + listQuery.startTime = `${newVal[0]} 00:00:00` + listQuery.endTime = `${newVal[1]} 23:59:59` + } } - else { - listQuery.startTime = '' - listQuery.endTime = '' - } + // if (newVal.length) { + // listQuery.startTime = `${newVal[0]} 00:00:00` + // listQuery.endTime = `${newVal[1]} 23:59:59` + // } + // else { + // listQuery.startTime = '' + // listQuery.endTime = '' + // } }) // 获取数据 diff --git a/src/views/flling/treat/index.vue b/src/views/flling/treat/index.vue index 548b3d1..fd8ce76 100644 --- a/src/views/flling/treat/index.vue +++ b/src/views/flling/treat/index.vue @@ -129,14 +129,22 @@ // 开始结束时间 const datetimerange = ref() watch(() => datetimerange.value, (newVal) => { - if (newVal.length) { - listQuery.startTime = `${newVal[0]} 00:00:00` - listQuery.endTime = `${newVal[1]} 23:59:59` + listQuery.startTime = '' + listQuery.endTime = '' + if (Array.isArray(newVal)) { + if (newVal.length) { + listQuery.startTime = `${newVal[0]} 00:00:00` + listQuery.endTime = `${newVal[1]} 23:59:59` + } } - else { - listQuery.startTime = '' - listQuery.endTime = '' - } + // if (newVal.length) { + // listQuery.startTime = `${newVal[0]} 00:00:00` + // listQuery.endTime = `${newVal[1]} 23:59:59` + // } + // else { + // listQuery.startTime = '' + // listQuery.endTime = '' + // } }) // 重置 const reset = () => { diff --git a/src/views/result/dept/index.vue b/src/views/result/dept/index.vue index cd5166f..5c5f367 100644 --- a/src/views/result/dept/index.vue +++ b/src/views/result/dept/index.vue @@ -90,14 +90,22 @@ // 开始结束时间 const datetimerange = ref() watch(() => datetimerange.value, (newVal) => { - if (newVal.length) { - listQuery.startTime = `${newVal[0]} 00:00:00` - listQuery.endTime = `${newVal[1]} 23:59:59` + listQuery.startTime = '' + listQuery.endTime = '' + if (Array.isArray(newVal)) { + if (newVal.length) { + listQuery.startTime = `${newVal[0]} 00:00:00` + listQuery.endTime = `${newVal[1]} 23:59:59` + } } - else { - listQuery.startTime = '' - listQuery.endTime = '' - } + // if (newVal.length) { + // listQuery.startTime = `${newVal[0]} 00:00:00` + // listQuery.endTime = `${newVal[1]} 23:59:59` + // } + // else { + // listQuery.startTime = '' + // listQuery.endTime = '' + // } }) // 获取数据 @@ -270,7 +278,7 @@ 详情 - + 编辑 diff --git a/src/views/rule/programme/components/edit.vue b/src/views/rule/programme/components/edit.vue index dcdbf54..2608f04 100644 --- a/src/views/rule/programme/components/edit.vue +++ b/src/views/rule/programme/components/edit.vue @@ -88,9 +88,14 @@ } // 删除上传的文件 const deleteFile = (fileName: string) => { - const data = ruleForm.value.fileId.split(',') + const data = ruleForm.value.fileName.split(',') const filterData = data.filter(item => item !== fileName) - ruleForm.value.fileId = filterData.length ? filterData.join(',') : '' + const index = ruleForm.value.fileName.indexOf(fileName) + const filterIds = ruleForm.value.fileId.split(',').filter((item: any, cindex: number) => index! == cindex) + // console.log(index, 'index') + ruleForm.value.fileName = filterData.length ? filterData.join(',') : '' + ruleForm.value.fileId = filterIds.length ? filterIds.join(',') : '' + console.log(ruleForm.value.fileName, ruleForm.value.fileId) } // 考核对象下拉列表 const objectList = ref<{ id: string; value: string; name: string }[]>() @@ -338,6 +343,9 @@ 上传 + diff --git a/src/views/rule/programme/components/proxyTable.vue b/src/views/rule/programme/components/proxyTable.vue index 55ddd41..5f80d8c 100644 --- a/src/views/rule/programme/components/proxyTable.vue +++ b/src/views/rule/programme/components/proxyTable.vue @@ -116,7 +116,7 @@ }) const name = ref('') const search = () => { - list.value = backList.value.filter((item: any) => item.quotaProjectName.includes(name.value)) + list.value = backList.value.filter((item: any) => item.quotaNo.includes(name.value)) } const reset = () => { name.value = '' @@ -128,7 +128,7 @@ diff --git a/src/views/rule/programme/components/edit.vue b/src/views/rule/programme/components/edit.vue index dcdbf54..2608f04 100644 --- a/src/views/rule/programme/components/edit.vue +++ b/src/views/rule/programme/components/edit.vue @@ -88,9 +88,14 @@ } // 删除上传的文件 const deleteFile = (fileName: string) => { - const data = ruleForm.value.fileId.split(',') + const data = ruleForm.value.fileName.split(',') const filterData = data.filter(item => item !== fileName) - ruleForm.value.fileId = filterData.length ? filterData.join(',') : '' + const index = ruleForm.value.fileName.indexOf(fileName) + const filterIds = ruleForm.value.fileId.split(',').filter((item: any, cindex: number) => index! == cindex) + // console.log(index, 'index') + ruleForm.value.fileName = filterData.length ? filterData.join(',') : '' + ruleForm.value.fileId = filterIds.length ? filterIds.join(',') : '' + console.log(ruleForm.value.fileName, ruleForm.value.fileId) } // 考核对象下拉列表 const objectList = ref<{ id: string; value: string; name: string }[]>() @@ -338,6 +343,9 @@ 上传 + diff --git a/src/views/rule/programme/components/proxyTable.vue b/src/views/rule/programme/components/proxyTable.vue index 55ddd41..5f80d8c 100644 --- a/src/views/rule/programme/components/proxyTable.vue +++ b/src/views/rule/programme/components/proxyTable.vue @@ -116,7 +116,7 @@ }) const name = ref('') const search = () => { - list.value = backList.value.filter((item: any) => item.quotaProjectName.includes(name.value)) + list.value = backList.value.filter((item: any) => item.quotaNo.includes(name.value)) } const reset = () => { name.value = '' @@ -128,7 +128,7 @@ diff --git a/src/views/rule/programme/components/edit.vue b/src/views/rule/programme/components/edit.vue index dcdbf54..2608f04 100644 --- a/src/views/rule/programme/components/edit.vue +++ b/src/views/rule/programme/components/edit.vue @@ -88,9 +88,14 @@ } // 删除上传的文件 const deleteFile = (fileName: string) => { - const data = ruleForm.value.fileId.split(',') + const data = ruleForm.value.fileName.split(',') const filterData = data.filter(item => item !== fileName) - ruleForm.value.fileId = filterData.length ? filterData.join(',') : '' + const index = ruleForm.value.fileName.indexOf(fileName) + const filterIds = ruleForm.value.fileId.split(',').filter((item: any, cindex: number) => index! == cindex) + // console.log(index, 'index') + ruleForm.value.fileName = filterData.length ? filterData.join(',') : '' + ruleForm.value.fileId = filterIds.length ? filterIds.join(',') : '' + console.log(ruleForm.value.fileName, ruleForm.value.fileId) } // 考核对象下拉列表 const objectList = ref<{ id: string; value: string; name: string }[]>() @@ -338,6 +343,9 @@ 上传 + diff --git a/src/views/rule/programme/components/proxyTable.vue b/src/views/rule/programme/components/proxyTable.vue index 55ddd41..5f80d8c 100644 --- a/src/views/rule/programme/components/proxyTable.vue +++ b/src/views/rule/programme/components/proxyTable.vue @@ -116,7 +116,7 @@ }) const name = ref('') const search = () => { - list.value = backList.value.filter((item: any) => item.quotaProjectName.includes(name.value)) + list.value = backList.value.filter((item: any) => item.quotaNo.includes(name.value)) } const reset = () => { name.value = '' @@ -128,7 +128,7 @@ diff --git a/src/views/rule/programme/components/edit.vue b/src/views/rule/programme/components/edit.vue index dcdbf54..2608f04 100644 --- a/src/views/rule/programme/components/edit.vue +++ b/src/views/rule/programme/components/edit.vue @@ -88,9 +88,14 @@ } // 删除上传的文件 const deleteFile = (fileName: string) => { - const data = ruleForm.value.fileId.split(',') + const data = ruleForm.value.fileName.split(',') const filterData = data.filter(item => item !== fileName) - ruleForm.value.fileId = filterData.length ? filterData.join(',') : '' + const index = ruleForm.value.fileName.indexOf(fileName) + const filterIds = ruleForm.value.fileId.split(',').filter((item: any, cindex: number) => index! == cindex) + // console.log(index, 'index') + ruleForm.value.fileName = filterData.length ? filterData.join(',') : '' + ruleForm.value.fileId = filterIds.length ? filterIds.join(',') : '' + console.log(ruleForm.value.fileName, ruleForm.value.fileId) } // 考核对象下拉列表 const objectList = ref<{ id: string; value: string; name: string }[]>() @@ -338,6 +343,9 @@ 上传 + diff --git a/src/views/rule/programme/components/proxyTable.vue b/src/views/rule/programme/components/proxyTable.vue index 55ddd41..5f80d8c 100644 --- a/src/views/rule/programme/components/proxyTable.vue +++ b/src/views/rule/programme/components/proxyTable.vue @@ -116,7 +116,7 @@ }) const name = ref('') const search = () => { - list.value = backList.value.filter((item: any) => item.quotaProjectName.includes(name.value)) + list.value = backList.value.filter((item: any) => item.quotaNo.includes(name.value)) } const reset = () => { name.value = '' @@ -128,7 +128,7 @@ diff --git a/src/views/rule/programme/components/edit.vue b/src/views/rule/programme/components/edit.vue index dcdbf54..2608f04 100644 --- a/src/views/rule/programme/components/edit.vue +++ b/src/views/rule/programme/components/edit.vue @@ -88,9 +88,14 @@ } // 删除上传的文件 const deleteFile = (fileName: string) => { - const data = ruleForm.value.fileId.split(',') + const data = ruleForm.value.fileName.split(',') const filterData = data.filter(item => item !== fileName) - ruleForm.value.fileId = filterData.length ? filterData.join(',') : '' + const index = ruleForm.value.fileName.indexOf(fileName) + const filterIds = ruleForm.value.fileId.split(',').filter((item: any, cindex: number) => index! == cindex) + // console.log(index, 'index') + ruleForm.value.fileName = filterData.length ? filterData.join(',') : '' + ruleForm.value.fileId = filterIds.length ? filterIds.join(',') : '' + console.log(ruleForm.value.fileName, ruleForm.value.fileId) } // 考核对象下拉列表 const objectList = ref<{ id: string; value: string; name: string }[]>() @@ -338,6 +343,9 @@ 上传 + diff --git a/src/views/rule/programme/components/proxyTable.vue b/src/views/rule/programme/components/proxyTable.vue index 55ddd41..5f80d8c 100644 --- a/src/views/rule/programme/components/proxyTable.vue +++ b/src/views/rule/programme/components/proxyTable.vue @@ -116,7 +116,7 @@ }) const name = ref('') const search = () => { - list.value = backList.value.filter((item: any) => item.quotaProjectName.includes(name.value)) + list.value = backList.value.filter((item: any) => item.quotaNo.includes(name.value)) } const reset = () => { name.value = '' @@ -128,7 +128,7 @@