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/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/proxy/components/edit.vue b/src/views/rule/proxy/components/edit.vue
index dde692e..9a3f897 100644
--- a/src/views/rule/proxy/components/edit.vue
+++ b/src/views/rule/proxy/components/edit.vue
@@ -124,9 +124,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 update = () => {
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/proxy/components/edit.vue b/src/views/rule/proxy/components/edit.vue
index dde692e..9a3f897 100644
--- a/src/views/rule/proxy/components/edit.vue
+++ b/src/views/rule/proxy/components/edit.vue
@@ -124,9 +124,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 update = () => {
diff --git a/src/views/rule/proxy/index.vue b/src/views/rule/proxy/index.vue
index e1c21ce..c051a35 100644
--- a/src/views/rule/proxy/index.vue
+++ b/src/views/rule/proxy/index.vue
@@ -100,6 +100,12 @@
listQuery.limit = 20
search()
}
+// 表格被选中的行
+const selectList = ref([])
+// 表格多选
+const multiSelect = (row: any[]) => {
+ selectList.value = row
+}
// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写
const changePage = (val: { size: number; page: number }) => {
if (val && val.size) {
@@ -164,7 +170,7 @@
...listQuery,
offset: undefined,
limit: undefined,
- // ids: selectList.value.map(item => item.id),
+ ids: selectList.value.map(item => item.id).join(),
}
exportProxy(data).then((res) => {
exportFile(res.data, '考核指标')
@@ -213,12 +219,6 @@
})
}
}
-// 表格被选中的行
-const selectList = ref([])
-// 表格多选
-const multiSelect = (row: any[]) => {
- selectList.value = row
-}
// 批量删除
const BatchProxy = () => {
if (selectList.value.length) {
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/proxy/components/edit.vue b/src/views/rule/proxy/components/edit.vue
index dde692e..9a3f897 100644
--- a/src/views/rule/proxy/components/edit.vue
+++ b/src/views/rule/proxy/components/edit.vue
@@ -124,9 +124,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 update = () => {
diff --git a/src/views/rule/proxy/index.vue b/src/views/rule/proxy/index.vue
index e1c21ce..c051a35 100644
--- a/src/views/rule/proxy/index.vue
+++ b/src/views/rule/proxy/index.vue
@@ -100,6 +100,12 @@
listQuery.limit = 20
search()
}
+// 表格被选中的行
+const selectList = ref([])
+// 表格多选
+const multiSelect = (row: any[]) => {
+ selectList.value = row
+}
// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写
const changePage = (val: { size: number; page: number }) => {
if (val && val.size) {
@@ -164,7 +170,7 @@
...listQuery,
offset: undefined,
limit: undefined,
- // ids: selectList.value.map(item => item.id),
+ ids: selectList.value.map(item => item.id).join(),
}
exportProxy(data).then((res) => {
exportFile(res.data, '考核指标')
@@ -213,12 +219,6 @@
})
}
}
-// 表格被选中的行
-const selectList = ref([])
-// 表格多选
-const multiSelect = (row: any[]) => {
- selectList.value = row
-}
// 批量删除
const BatchProxy = () => {
if (selectList.value.length) {
diff --git a/src/views/system/dict/editDict.vue b/src/views/system/dict/editDict.vue
index 61077df..b321f45 100644
--- a/src/views/system/dict/editDict.vue
+++ b/src/views/system/dict/editDict.vue
@@ -37,7 +37,7 @@
const rules = reactive({
dictCode: [{ required: true, message: '字典编码不能为空', trigger: ['blur'] }],
dictName: [{ required: true, message: '字典名称不能为空', trigger: ['blur'] }],
- value: [{ required: true, message: '值不能为空', trigger: ['blur'] }],
+ value: [{ required: true, message: '字典值不能为空', trigger: ['blur'] }],
name: [{ required: true, message: '名称不能为空', trigger: ['blur'] }],
num: [{ required: true, message: '排序不能为空' }, { type: 'number', message: '必须为数字值' }],
})
@@ -97,6 +97,14 @@
if (!passFlag) {
ElMessage.warning('请将字典值和名称都填全后再进行保存')
}
+ if (Array.from(new Set(details.value.map(item => item.value))).length !== details.value.length) {
+ ElMessage.warning('字典值不能重复')
+ return false
+ }
+ if (Array.from(new Set(details.value.map(item => item.num))).length !== details.value.length) {
+ ElMessage.warning('字典排序不能重复')
+ return false
+ }
formData.dictValues = detailArray
return passFlag
}
@@ -232,12 +240,12 @@
-
+
-
+
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/proxy/components/edit.vue b/src/views/rule/proxy/components/edit.vue
index dde692e..9a3f897 100644
--- a/src/views/rule/proxy/components/edit.vue
+++ b/src/views/rule/proxy/components/edit.vue
@@ -124,9 +124,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 update = () => {
diff --git a/src/views/rule/proxy/index.vue b/src/views/rule/proxy/index.vue
index e1c21ce..c051a35 100644
--- a/src/views/rule/proxy/index.vue
+++ b/src/views/rule/proxy/index.vue
@@ -100,6 +100,12 @@
listQuery.limit = 20
search()
}
+// 表格被选中的行
+const selectList = ref([])
+// 表格多选
+const multiSelect = (row: any[]) => {
+ selectList.value = row
+}
// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写
const changePage = (val: { size: number; page: number }) => {
if (val && val.size) {
@@ -164,7 +170,7 @@
...listQuery,
offset: undefined,
limit: undefined,
- // ids: selectList.value.map(item => item.id),
+ ids: selectList.value.map(item => item.id).join(),
}
exportProxy(data).then((res) => {
exportFile(res.data, '考核指标')
@@ -213,12 +219,6 @@
})
}
}
-// 表格被选中的行
-const selectList = ref([])
-// 表格多选
-const multiSelect = (row: any[]) => {
- selectList.value = row
-}
// 批量删除
const BatchProxy = () => {
if (selectList.value.length) {
diff --git a/src/views/system/dict/editDict.vue b/src/views/system/dict/editDict.vue
index 61077df..b321f45 100644
--- a/src/views/system/dict/editDict.vue
+++ b/src/views/system/dict/editDict.vue
@@ -37,7 +37,7 @@
const rules = reactive({
dictCode: [{ required: true, message: '字典编码不能为空', trigger: ['blur'] }],
dictName: [{ required: true, message: '字典名称不能为空', trigger: ['blur'] }],
- value: [{ required: true, message: '值不能为空', trigger: ['blur'] }],
+ value: [{ required: true, message: '字典值不能为空', trigger: ['blur'] }],
name: [{ required: true, message: '名称不能为空', trigger: ['blur'] }],
num: [{ required: true, message: '排序不能为空' }, { type: 'number', message: '必须为数字值' }],
})
@@ -97,6 +97,14 @@
if (!passFlag) {
ElMessage.warning('请将字典值和名称都填全后再进行保存')
}
+ if (Array.from(new Set(details.value.map(item => item.value))).length !== details.value.length) {
+ ElMessage.warning('字典值不能重复')
+ return false
+ }
+ if (Array.from(new Set(details.value.map(item => item.num))).length !== details.value.length) {
+ ElMessage.warning('字典排序不能重复')
+ return false
+ }
formData.dictValues = detailArray
return passFlag
}
@@ -232,12 +240,12 @@
-
+
-
+
diff --git a/src/views/system/signature/autograph.vue b/src/views/system/signature/autograph.vue
index e5a32c8..a92bff4 100644
--- a/src/views/system/signature/autograph.vue
+++ b/src/views/system/signature/autograph.vue
@@ -23,14 +23,22 @@
ids: [],
}) // 查询参数
watch(() => createTime.value, (newVal) => {
- if (newVal) {
- searchQuery.createStartTime = `${newVal[0]} 00:00:00`
- searchQuery.createEndTime = `${newVal[1]} 23:59:59`
+ searchQuery.createStartTime = ''
+ searchQuery.createEndTime = ''
+ if (Array.isArray(newVal)) {
+ if (newVal.length) {
+ searchQuery.createStartTime = `${newVal[0]} 00:00:00`
+ searchQuery.createEndTime = `${newVal[1]} 23:59:59`
+ }
}
- else {
- searchQuery.createStartTime = ''
- searchQuery.createEndTime = ''
- }
+ // if (newVal) {
+ // searchQuery.createStartTime = `${newVal[0]} 00:00:00`
+ // searchQuery.createEndTime = `${newVal[1]} 23:59:59`
+ // }
+ // else {
+ // searchQuery.createStartTime = ''
+ // searchQuery.createEndTime = ''
+ // }
})
const loadingTable = ref(false) // 表格loading
const total = ref(0) // 数据总条数