diff --git a/src/api/home/1 b/src/api/home/1 deleted file mode 100644 index e69de29..0000000 --- a/src/api/home/1 +++ /dev/null diff --git a/src/api/home/1 b/src/api/home/1 deleted file mode 100644 index e69de29..0000000 --- a/src/api/home/1 +++ /dev/null diff --git a/src/api/home/filling/filling.ts b/src/api/home/filling/filling.ts new file mode 100644 index 0000000..47914e0 --- /dev/null +++ b/src/api/home/filling/filling.ts @@ -0,0 +1,29 @@ +/** + * 填报相关接口 + */ +import request from '@/api/index' + +// 分页列表 +export function getListPage(params: object) { + return request({ + url: '/planQuotaRep/listPage', + method: 'get', + params, + }) +} +// 填报 +export function filling(data: object) { + return request({ + url: '/planQuotaRep/updateRep', + method: 'post', + data, + }) +} +// 提交 +export function batchSubmitApi(data: object) { + return request({ + url: '/planQuotaRep/batchSubmit', + method: 'post', + data, + }) +} diff --git a/src/api/home/1 b/src/api/home/1 deleted file mode 100644 index e69de29..0000000 --- a/src/api/home/1 +++ /dev/null diff --git a/src/api/home/filling/filling.ts b/src/api/home/filling/filling.ts new file mode 100644 index 0000000..47914e0 --- /dev/null +++ b/src/api/home/filling/filling.ts @@ -0,0 +1,29 @@ +/** + * 填报相关接口 + */ +import request from '@/api/index' + +// 分页列表 +export function getListPage(params: object) { + return request({ + url: '/planQuotaRep/listPage', + method: 'get', + params, + }) +} +// 填报 +export function filling(data: object) { + return request({ + url: '/planQuotaRep/updateRep', + method: 'post', + data, + }) +} +// 提交 +export function batchSubmitApi(data: object) { + return request({ + url: '/planQuotaRep/batchSubmit', + method: 'post', + data, + }) +} diff --git a/src/api/home/rule/programme.ts b/src/api/home/rule/programme.ts index cbf5585..91e1dbe 100644 --- a/src/api/home/rule/programme.ts +++ b/src/api/home/rule/programme.ts @@ -51,4 +51,26 @@ data, }) } - +// 方案指标列表 +export function ProxyList(params: object) { + return request({ + url: '/assessmentPlan/planQuotaListPage', + method: 'get', + params, + }) +} +// 考核方案等级下拉 /assessmentLevel/list +export function getGradeSelectList() { + return request({ + url: '/assessmentLevel/list', + method: 'get', + }) +} +// 启用考核计划方案 +export function updatePlanEnabled(data: object) { + return request({ + url: '/assessmentPlan/updatePlanEnabled', + method: 'post', + data, + }) +} diff --git a/src/api/home/1 b/src/api/home/1 deleted file mode 100644 index e69de29..0000000 --- a/src/api/home/1 +++ /dev/null diff --git a/src/api/home/filling/filling.ts b/src/api/home/filling/filling.ts new file mode 100644 index 0000000..47914e0 --- /dev/null +++ b/src/api/home/filling/filling.ts @@ -0,0 +1,29 @@ +/** + * 填报相关接口 + */ +import request from '@/api/index' + +// 分页列表 +export function getListPage(params: object) { + return request({ + url: '/planQuotaRep/listPage', + method: 'get', + params, + }) +} +// 填报 +export function filling(data: object) { + return request({ + url: '/planQuotaRep/updateRep', + method: 'post', + data, + }) +} +// 提交 +export function batchSubmitApi(data: object) { + return request({ + url: '/planQuotaRep/batchSubmit', + method: 'post', + data, + }) +} diff --git a/src/api/home/rule/programme.ts b/src/api/home/rule/programme.ts index cbf5585..91e1dbe 100644 --- a/src/api/home/rule/programme.ts +++ b/src/api/home/rule/programme.ts @@ -51,4 +51,26 @@ data, }) } - +// 方案指标列表 +export function ProxyList(params: object) { + return request({ + url: '/assessmentPlan/planQuotaListPage', + method: 'get', + params, + }) +} +// 考核方案等级下拉 /assessmentLevel/list +export function getGradeSelectList() { + return request({ + url: '/assessmentLevel/list', + method: 'get', + }) +} +// 启用考核计划方案 +export function updatePlanEnabled(data: object) { + return request({ + url: '/assessmentPlan/updatePlanEnabled', + method: 'post', + data, + }) +} diff --git a/src/components/showPhoto/index.vue b/src/components/showPhoto/index.vue index 5c765ed..a221af2 100644 --- a/src/components/showPhoto/index.vue +++ b/src/components/showPhoto/index.vue @@ -6,6 +6,10 @@ type: String, required: true, }, + minioFileId: { + type: String, + required: true, + }, height: { type: String, default: '100px', @@ -24,17 +28,20 @@ // url.value = res.data // }) const arr = props.minioFileName.split(',') - urlList.value = arr.map((item) => { + const ids = props.minioFileId.split(',') + console.log(ids, 'ids') + urlList.value = arr.map((item, index) => { + console.log(`${import.meta.env.VITE_APP_API_BASEURL}${ids[index]}`) return { minioFileName: item, - url: '', + url: `${import.meta.env.VITE_APP_API_BASEURL}/static/${ids[index]}`, } }) - urlList.value.forEach((item: any) => { - getFileUrl(item.minioFileName).then((res) => { - item.url = res.data - }) - }) + // urlList.value.forEach((item: any) => { + // getFileUrl(item.minioFileName).then((res) => { + // item.url = res.data + // }) + // }) } else { urlList.value = [] diff --git a/src/api/home/1 b/src/api/home/1 deleted file mode 100644 index e69de29..0000000 --- a/src/api/home/1 +++ /dev/null diff --git a/src/api/home/filling/filling.ts b/src/api/home/filling/filling.ts new file mode 100644 index 0000000..47914e0 --- /dev/null +++ b/src/api/home/filling/filling.ts @@ -0,0 +1,29 @@ +/** + * 填报相关接口 + */ +import request from '@/api/index' + +// 分页列表 +export function getListPage(params: object) { + return request({ + url: '/planQuotaRep/listPage', + method: 'get', + params, + }) +} +// 填报 +export function filling(data: object) { + return request({ + url: '/planQuotaRep/updateRep', + method: 'post', + data, + }) +} +// 提交 +export function batchSubmitApi(data: object) { + return request({ + url: '/planQuotaRep/batchSubmit', + method: 'post', + data, + }) +} diff --git a/src/api/home/rule/programme.ts b/src/api/home/rule/programme.ts index cbf5585..91e1dbe 100644 --- a/src/api/home/rule/programme.ts +++ b/src/api/home/rule/programme.ts @@ -51,4 +51,26 @@ data, }) } - +// 方案指标列表 +export function ProxyList(params: object) { + return request({ + url: '/assessmentPlan/planQuotaListPage', + method: 'get', + params, + }) +} +// 考核方案等级下拉 /assessmentLevel/list +export function getGradeSelectList() { + return request({ + url: '/assessmentLevel/list', + method: 'get', + }) +} +// 启用考核计划方案 +export function updatePlanEnabled(data: object) { + return request({ + url: '/assessmentPlan/updatePlanEnabled', + method: 'post', + data, + }) +} diff --git a/src/components/showPhoto/index.vue b/src/components/showPhoto/index.vue index 5c765ed..a221af2 100644 --- a/src/components/showPhoto/index.vue +++ b/src/components/showPhoto/index.vue @@ -6,6 +6,10 @@ type: String, required: true, }, + minioFileId: { + type: String, + required: true, + }, height: { type: String, default: '100px', @@ -24,17 +28,20 @@ // url.value = res.data // }) const arr = props.minioFileName.split(',') - urlList.value = arr.map((item) => { + const ids = props.minioFileId.split(',') + console.log(ids, 'ids') + urlList.value = arr.map((item, index) => { + console.log(`${import.meta.env.VITE_APP_API_BASEURL}${ids[index]}`) return { minioFileName: item, - url: '', + url: `${import.meta.env.VITE_APP_API_BASEURL}/static/${ids[index]}`, } }) - urlList.value.forEach((item: any) => { - getFileUrl(item.minioFileName).then((res) => { - item.url = res.data - }) - }) + // urlList.value.forEach((item: any) => { + // getFileUrl(item.minioFileName).then((res) => { + // item.url = res.data + // }) + // }) } else { urlList.value = [] diff --git a/src/views/flling/already/index copy.vue b/src/views/flling/already/index copy.vue new file mode 100644 index 0000000..8ee5ca4 --- /dev/null +++ b/src/views/flling/already/index copy.vue @@ -0,0 +1,199 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + 导出 + + + + + + + + + + diff --git a/src/api/home/1 b/src/api/home/1 deleted file mode 100644 index e69de29..0000000 --- a/src/api/home/1 +++ /dev/null diff --git a/src/api/home/filling/filling.ts b/src/api/home/filling/filling.ts new file mode 100644 index 0000000..47914e0 --- /dev/null +++ b/src/api/home/filling/filling.ts @@ -0,0 +1,29 @@ +/** + * 填报相关接口 + */ +import request from '@/api/index' + +// 分页列表 +export function getListPage(params: object) { + return request({ + url: '/planQuotaRep/listPage', + method: 'get', + params, + }) +} +// 填报 +export function filling(data: object) { + return request({ + url: '/planQuotaRep/updateRep', + method: 'post', + data, + }) +} +// 提交 +export function batchSubmitApi(data: object) { + return request({ + url: '/planQuotaRep/batchSubmit', + method: 'post', + data, + }) +} diff --git a/src/api/home/rule/programme.ts b/src/api/home/rule/programme.ts index cbf5585..91e1dbe 100644 --- a/src/api/home/rule/programme.ts +++ b/src/api/home/rule/programme.ts @@ -51,4 +51,26 @@ data, }) } - +// 方案指标列表 +export function ProxyList(params: object) { + return request({ + url: '/assessmentPlan/planQuotaListPage', + method: 'get', + params, + }) +} +// 考核方案等级下拉 /assessmentLevel/list +export function getGradeSelectList() { + return request({ + url: '/assessmentLevel/list', + method: 'get', + }) +} +// 启用考核计划方案 +export function updatePlanEnabled(data: object) { + return request({ + url: '/assessmentPlan/updatePlanEnabled', + method: 'post', + data, + }) +} diff --git a/src/components/showPhoto/index.vue b/src/components/showPhoto/index.vue index 5c765ed..a221af2 100644 --- a/src/components/showPhoto/index.vue +++ b/src/components/showPhoto/index.vue @@ -6,6 +6,10 @@ type: String, required: true, }, + minioFileId: { + type: String, + required: true, + }, height: { type: String, default: '100px', @@ -24,17 +28,20 @@ // url.value = res.data // }) const arr = props.minioFileName.split(',') - urlList.value = arr.map((item) => { + const ids = props.minioFileId.split(',') + console.log(ids, 'ids') + urlList.value = arr.map((item, index) => { + console.log(`${import.meta.env.VITE_APP_API_BASEURL}${ids[index]}`) return { minioFileName: item, - url: '', + url: `${import.meta.env.VITE_APP_API_BASEURL}/static/${ids[index]}`, } }) - urlList.value.forEach((item: any) => { - getFileUrl(item.minioFileName).then((res) => { - item.url = res.data - }) - }) + // urlList.value.forEach((item: any) => { + // getFileUrl(item.minioFileName).then((res) => { + // item.url = res.data + // }) + // }) } else { urlList.value = [] diff --git a/src/views/flling/already/index copy.vue b/src/views/flling/already/index copy.vue new file mode 100644 index 0000000..8ee5ca4 --- /dev/null +++ b/src/views/flling/already/index copy.vue @@ -0,0 +1,199 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + 导出 + + + + + + + + + + diff --git a/src/views/flling/already/index.vue b/src/views/flling/already/index.vue index 8ee5ca4..ca7731c 100644 --- a/src/views/flling/already/index.vue +++ b/src/views/flling/already/index.vue @@ -4,196 +4,10 @@ * @Date: 2023-09-14 --> - - - - - - - - - - - - - - - - - - - - - - - 导出 - - - - - - - - + diff --git a/src/api/home/1 b/src/api/home/1 deleted file mode 100644 index e69de29..0000000 --- a/src/api/home/1 +++ /dev/null diff --git a/src/api/home/filling/filling.ts b/src/api/home/filling/filling.ts new file mode 100644 index 0000000..47914e0 --- /dev/null +++ b/src/api/home/filling/filling.ts @@ -0,0 +1,29 @@ +/** + * 填报相关接口 + */ +import request from '@/api/index' + +// 分页列表 +export function getListPage(params: object) { + return request({ + url: '/planQuotaRep/listPage', + method: 'get', + params, + }) +} +// 填报 +export function filling(data: object) { + return request({ + url: '/planQuotaRep/updateRep', + method: 'post', + data, + }) +} +// 提交 +export function batchSubmitApi(data: object) { + return request({ + url: '/planQuotaRep/batchSubmit', + method: 'post', + data, + }) +} diff --git a/src/api/home/rule/programme.ts b/src/api/home/rule/programme.ts index cbf5585..91e1dbe 100644 --- a/src/api/home/rule/programme.ts +++ b/src/api/home/rule/programme.ts @@ -51,4 +51,26 @@ data, }) } - +// 方案指标列表 +export function ProxyList(params: object) { + return request({ + url: '/assessmentPlan/planQuotaListPage', + method: 'get', + params, + }) +} +// 考核方案等级下拉 /assessmentLevel/list +export function getGradeSelectList() { + return request({ + url: '/assessmentLevel/list', + method: 'get', + }) +} +// 启用考核计划方案 +export function updatePlanEnabled(data: object) { + return request({ + url: '/assessmentPlan/updatePlanEnabled', + method: 'post', + data, + }) +} diff --git a/src/components/showPhoto/index.vue b/src/components/showPhoto/index.vue index 5c765ed..a221af2 100644 --- a/src/components/showPhoto/index.vue +++ b/src/components/showPhoto/index.vue @@ -6,6 +6,10 @@ type: String, required: true, }, + minioFileId: { + type: String, + required: true, + }, height: { type: String, default: '100px', @@ -24,17 +28,20 @@ // url.value = res.data // }) const arr = props.minioFileName.split(',') - urlList.value = arr.map((item) => { + const ids = props.minioFileId.split(',') + console.log(ids, 'ids') + urlList.value = arr.map((item, index) => { + console.log(`${import.meta.env.VITE_APP_API_BASEURL}${ids[index]}`) return { minioFileName: item, - url: '', + url: `${import.meta.env.VITE_APP_API_BASEURL}/static/${ids[index]}`, } }) - urlList.value.forEach((item: any) => { - getFileUrl(item.minioFileName).then((res) => { - item.url = res.data - }) - }) + // urlList.value.forEach((item: any) => { + // getFileUrl(item.minioFileName).then((res) => { + // item.url = res.data + // }) + // }) } else { urlList.value = [] diff --git a/src/views/flling/already/index copy.vue b/src/views/flling/already/index copy.vue new file mode 100644 index 0000000..8ee5ca4 --- /dev/null +++ b/src/views/flling/already/index copy.vue @@ -0,0 +1,199 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + 导出 + + + + + + + + + + diff --git a/src/views/flling/already/index.vue b/src/views/flling/already/index.vue index 8ee5ca4..ca7731c 100644 --- a/src/views/flling/already/index.vue +++ b/src/views/flling/already/index.vue @@ -4,196 +4,10 @@ * @Date: 2023-09-14 --> - - - - - - - - - - - - - - - - - - - - - - - 导出 - - - - - - - - + diff --git a/src/views/flling/treat/fillingDialog.vue b/src/views/flling/treat/fillingDialog.vue new file mode 100644 index 0000000..d3b0e54 --- /dev/null +++ b/src/views/flling/treat/fillingDialog.vue @@ -0,0 +1,179 @@ + + + + + + + + + + + + + + + + + + + + + + + 上传 + + + + + + + + + + + + diff --git a/src/api/home/1 b/src/api/home/1 deleted file mode 100644 index e69de29..0000000 --- a/src/api/home/1 +++ /dev/null diff --git a/src/api/home/filling/filling.ts b/src/api/home/filling/filling.ts new file mode 100644 index 0000000..47914e0 --- /dev/null +++ b/src/api/home/filling/filling.ts @@ -0,0 +1,29 @@ +/** + * 填报相关接口 + */ +import request from '@/api/index' + +// 分页列表 +export function getListPage(params: object) { + return request({ + url: '/planQuotaRep/listPage', + method: 'get', + params, + }) +} +// 填报 +export function filling(data: object) { + return request({ + url: '/planQuotaRep/updateRep', + method: 'post', + data, + }) +} +// 提交 +export function batchSubmitApi(data: object) { + return request({ + url: '/planQuotaRep/batchSubmit', + method: 'post', + data, + }) +} diff --git a/src/api/home/rule/programme.ts b/src/api/home/rule/programme.ts index cbf5585..91e1dbe 100644 --- a/src/api/home/rule/programme.ts +++ b/src/api/home/rule/programme.ts @@ -51,4 +51,26 @@ data, }) } - +// 方案指标列表 +export function ProxyList(params: object) { + return request({ + url: '/assessmentPlan/planQuotaListPage', + method: 'get', + params, + }) +} +// 考核方案等级下拉 /assessmentLevel/list +export function getGradeSelectList() { + return request({ + url: '/assessmentLevel/list', + method: 'get', + }) +} +// 启用考核计划方案 +export function updatePlanEnabled(data: object) { + return request({ + url: '/assessmentPlan/updatePlanEnabled', + method: 'post', + data, + }) +} diff --git a/src/components/showPhoto/index.vue b/src/components/showPhoto/index.vue index 5c765ed..a221af2 100644 --- a/src/components/showPhoto/index.vue +++ b/src/components/showPhoto/index.vue @@ -6,6 +6,10 @@ type: String, required: true, }, + minioFileId: { + type: String, + required: true, + }, height: { type: String, default: '100px', @@ -24,17 +28,20 @@ // url.value = res.data // }) const arr = props.minioFileName.split(',') - urlList.value = arr.map((item) => { + const ids = props.minioFileId.split(',') + console.log(ids, 'ids') + urlList.value = arr.map((item, index) => { + console.log(`${import.meta.env.VITE_APP_API_BASEURL}${ids[index]}`) return { minioFileName: item, - url: '', + url: `${import.meta.env.VITE_APP_API_BASEURL}/static/${ids[index]}`, } }) - urlList.value.forEach((item: any) => { - getFileUrl(item.minioFileName).then((res) => { - item.url = res.data - }) - }) + // urlList.value.forEach((item: any) => { + // getFileUrl(item.minioFileName).then((res) => { + // item.url = res.data + // }) + // }) } else { urlList.value = [] diff --git a/src/views/flling/already/index copy.vue b/src/views/flling/already/index copy.vue new file mode 100644 index 0000000..8ee5ca4 --- /dev/null +++ b/src/views/flling/already/index copy.vue @@ -0,0 +1,199 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + 导出 + + + + + + + + + + diff --git a/src/views/flling/already/index.vue b/src/views/flling/already/index.vue index 8ee5ca4..ca7731c 100644 --- a/src/views/flling/already/index.vue +++ b/src/views/flling/already/index.vue @@ -4,196 +4,10 @@ * @Date: 2023-09-14 --> - - - - - - - - - - - - - - - - - - - - - - - 导出 - - - - - - - - + diff --git a/src/views/flling/treat/fillingDialog.vue b/src/views/flling/treat/fillingDialog.vue new file mode 100644 index 0000000..d3b0e54 --- /dev/null +++ b/src/views/flling/treat/fillingDialog.vue @@ -0,0 +1,179 @@ + + + + + + + + + + + + + + + + + + + + + + + 上传 + + + + + + + + + + + + diff --git a/src/views/flling/treat/index.vue b/src/views/flling/treat/index.vue index d08184a..44e356d 100644 --- a/src/views/flling/treat/index.vue +++ b/src/views/flling/treat/index.vue @@ -5,71 +5,102 @@ --> + - + - + - + + + - + + + - + 提交 + + 导出 + - - + + - + 填报 - + 提交 + + + diff --git a/src/api/home/1 b/src/api/home/1 deleted file mode 100644 index e69de29..0000000 --- a/src/api/home/1 +++ /dev/null diff --git a/src/api/home/filling/filling.ts b/src/api/home/filling/filling.ts new file mode 100644 index 0000000..47914e0 --- /dev/null +++ b/src/api/home/filling/filling.ts @@ -0,0 +1,29 @@ +/** + * 填报相关接口 + */ +import request from '@/api/index' + +// 分页列表 +export function getListPage(params: object) { + return request({ + url: '/planQuotaRep/listPage', + method: 'get', + params, + }) +} +// 填报 +export function filling(data: object) { + return request({ + url: '/planQuotaRep/updateRep', + method: 'post', + data, + }) +} +// 提交 +export function batchSubmitApi(data: object) { + return request({ + url: '/planQuotaRep/batchSubmit', + method: 'post', + data, + }) +} diff --git a/src/api/home/rule/programme.ts b/src/api/home/rule/programme.ts index cbf5585..91e1dbe 100644 --- a/src/api/home/rule/programme.ts +++ b/src/api/home/rule/programme.ts @@ -51,4 +51,26 @@ data, }) } - +// 方案指标列表 +export function ProxyList(params: object) { + return request({ + url: '/assessmentPlan/planQuotaListPage', + method: 'get', + params, + }) +} +// 考核方案等级下拉 /assessmentLevel/list +export function getGradeSelectList() { + return request({ + url: '/assessmentLevel/list', + method: 'get', + }) +} +// 启用考核计划方案 +export function updatePlanEnabled(data: object) { + return request({ + url: '/assessmentPlan/updatePlanEnabled', + method: 'post', + data, + }) +} diff --git a/src/components/showPhoto/index.vue b/src/components/showPhoto/index.vue index 5c765ed..a221af2 100644 --- a/src/components/showPhoto/index.vue +++ b/src/components/showPhoto/index.vue @@ -6,6 +6,10 @@ type: String, required: true, }, + minioFileId: { + type: String, + required: true, + }, height: { type: String, default: '100px', @@ -24,17 +28,20 @@ // url.value = res.data // }) const arr = props.minioFileName.split(',') - urlList.value = arr.map((item) => { + const ids = props.minioFileId.split(',') + console.log(ids, 'ids') + urlList.value = arr.map((item, index) => { + console.log(`${import.meta.env.VITE_APP_API_BASEURL}${ids[index]}`) return { minioFileName: item, - url: '', + url: `${import.meta.env.VITE_APP_API_BASEURL}/static/${ids[index]}`, } }) - urlList.value.forEach((item: any) => { - getFileUrl(item.minioFileName).then((res) => { - item.url = res.data - }) - }) + // urlList.value.forEach((item: any) => { + // getFileUrl(item.minioFileName).then((res) => { + // item.url = res.data + // }) + // }) } else { urlList.value = [] diff --git a/src/views/flling/already/index copy.vue b/src/views/flling/already/index copy.vue new file mode 100644 index 0000000..8ee5ca4 --- /dev/null +++ b/src/views/flling/already/index copy.vue @@ -0,0 +1,199 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + 导出 + + + + + + + + + + diff --git a/src/views/flling/already/index.vue b/src/views/flling/already/index.vue index 8ee5ca4..ca7731c 100644 --- a/src/views/flling/already/index.vue +++ b/src/views/flling/already/index.vue @@ -4,196 +4,10 @@ * @Date: 2023-09-14 --> - - - - - - - - - - - - - - - - - - - - - - - 导出 - - - - - - - - + diff --git a/src/views/flling/treat/fillingDialog.vue b/src/views/flling/treat/fillingDialog.vue new file mode 100644 index 0000000..d3b0e54 --- /dev/null +++ b/src/views/flling/treat/fillingDialog.vue @@ -0,0 +1,179 @@ + + + + + + + + + + + + + + + + + + + + + + + 上传 + + + + + + + + + + + + diff --git a/src/views/flling/treat/index.vue b/src/views/flling/treat/index.vue index d08184a..44e356d 100644 --- a/src/views/flling/treat/index.vue +++ b/src/views/flling/treat/index.vue @@ -5,71 +5,102 @@ --> + - + - + - + + + - + + + - + 提交 + + 导出 + - - + + - + 填报 - + 提交 + + + diff --git a/src/views/rule/programme/components/edit.vue b/src/views/rule/programme/components/edit.vue index 1c1cfba..903c65e 100644 --- a/src/views/rule/programme/components/edit.vue +++ b/src/views/rule/programme/components/edit.vue @@ -9,7 +9,7 @@ import proxyTable from './proxyTable.vue' import { getDictByCode } from '@/api/system/dict' import { uploadApi } from '@/api/common' -import { addProgramme, addProxyList, editProgramme, getDetail } from '@/api/home/rule/programme' +import { ProxyList, addProgramme, addProxyList, editProgramme, getDetail, getGradeSelectList, updatePlanEnabled } from '@/api/home/rule/programme' const $route = useRoute() const $router = useRouter() // 对话框类型:create,update @@ -27,6 +27,7 @@ cycle: '', // 考核周期 endTime: '', fileId: '', + fileName: '', id: '', isEnable: '', levelId: '', @@ -37,6 +38,7 @@ score: '', startTime: '', }) +const proxyList = ref([]) // 表单验证规则 const rules = ref({ assObject: [{ required: true, message: '考核对象必选', trigger: ['blur', 'change'] }], @@ -61,11 +63,11 @@ lock: true, background: 'rgba(255, 255, 255, 0.8)', }) - console.log(event.target.files) fd.append('file', event.target.files[0]) uploadApi(fd).then((res) => { if (res.code === 200) { - ruleForm.value.fileId = ruleForm.value.fileId ? `${ruleForm.value.fileId},${res.data.fileName}` : res.data.fileName + ruleForm.value.fileId = ruleForm.value.fileId ? `${ruleForm.value.fileId},${res.data.fileId}` : res.data.fileId + ruleForm.value.fileName = ruleForm.value.fileName ? `${ruleForm.value.fileName},${res.data.fileName}` : res.data.fileName // 重置当前验证 ruleFormRef.value?.clearValidate('minioFileName') ElMessage.success('文件上传成功') @@ -96,7 +98,7 @@ // 考核周期下拉框 const cycleList = ref<{ id: string; value: string; name: string }[]>() // 考核等级下拉框 -const levelList = ref<{ id: string; value: string; name: string }[]>() +const levelList = ref() // 获取字典 const fetchSelectList = () => { getDictByCode('ass_object').then((res) => { @@ -108,12 +110,24 @@ getDictByCode('cycle_code').then((res) => { cycleList.value = res.data }) - getDictByCode('level_code').then((res) => { + // getDictByCode('level_code').then((res) => { + // levelList.value = res.data + // }) + getGradeSelectList().then((res) => { levelList.value = res.data }) } fetchSelectList() const radio = ref('基本信息') +// 获取方案指标列表 +const fetchProxyList = () => { + // if ($route.path.includes('create')) { + // return + // } + ProxyList({ planId: ruleForm.value.id, limit: 9999, offset: 1 }).then((res) => { + proxyList.value = res.data.rows + }) +} onMounted(() => { dialogStatus.value = $route.params.type as string if (!$route.path.includes('create')) { @@ -125,6 +139,7 @@ // getDetail({ id: data.id }).then((res) => { // console.log(res.data) // }) + fetchProxyList() } }) // 编辑 @@ -132,22 +147,39 @@ editProgramme({ ...ruleForm.value }).then((res) => { addProxyList({ planId: ruleForm.value.id, - quotaIds: proxyRef.value.list.map((item: any) => item.id), + quotaIds: proxyList.value.map((item: any) => item.id), }).then((res) => { + // if (ruleForm.value.isEnable === '1' && proxyList.value.length) { + // updatePlanEnabled({ ...ruleForm.value }).then(() => { + // ElMessage.success('操作成功') + // $router.go(-1) + // }) + // } + // else { ElMessage.success('操作成功') $router.go(-1) + // } }) }) } // 新增 const create = () => { - addProgramme({ ...ruleForm.value }).then((res) => { - console.log() - // addProxyList({ - - // }) - ElMessage.success('操作成功') - $router.go(-1) + addProgramme({ ...ruleForm.value }).then((response) => { + addProxyList({ + planId: response.data, + quotaIds: proxyList.value.map((item: any) => item.id), + }).then((res) => { + if (ruleForm.value.isEnable === '1' && proxyList.value.length) { + updatePlanEnabled({ id: response.data, isEnable: '1' }).then(() => { + ElMessage.success('操作成功') + $router.go(-1) + }) + } + else { + ElMessage.success('操作成功') + $router.go(-1) + } + }) }) } // 保存 @@ -163,6 +195,7 @@ type: 'warning', }, ).then((res) => { + proxyList.value = proxyRef.value?.list if ($route.path.includes('update')) { update() } @@ -172,6 +205,11 @@ }) }) } +// watch(() => proxyRef.value?.list, (newVal) => { +// proxyList.value = newVal +// }, { +// deep: true, +// }) @@ -214,9 +252,9 @@ - + @@ -230,7 +268,7 @@ - + @@ -286,7 +324,7 @@ - + 上传 @@ -297,7 +335,7 @@ - + diff --git a/src/api/home/1 b/src/api/home/1 deleted file mode 100644 index e69de29..0000000 --- a/src/api/home/1 +++ /dev/null diff --git a/src/api/home/filling/filling.ts b/src/api/home/filling/filling.ts new file mode 100644 index 0000000..47914e0 --- /dev/null +++ b/src/api/home/filling/filling.ts @@ -0,0 +1,29 @@ +/** + * 填报相关接口 + */ +import request from '@/api/index' + +// 分页列表 +export function getListPage(params: object) { + return request({ + url: '/planQuotaRep/listPage', + method: 'get', + params, + }) +} +// 填报 +export function filling(data: object) { + return request({ + url: '/planQuotaRep/updateRep', + method: 'post', + data, + }) +} +// 提交 +export function batchSubmitApi(data: object) { + return request({ + url: '/planQuotaRep/batchSubmit', + method: 'post', + data, + }) +} diff --git a/src/api/home/rule/programme.ts b/src/api/home/rule/programme.ts index cbf5585..91e1dbe 100644 --- a/src/api/home/rule/programme.ts +++ b/src/api/home/rule/programme.ts @@ -51,4 +51,26 @@ data, }) } - +// 方案指标列表 +export function ProxyList(params: object) { + return request({ + url: '/assessmentPlan/planQuotaListPage', + method: 'get', + params, + }) +} +// 考核方案等级下拉 /assessmentLevel/list +export function getGradeSelectList() { + return request({ + url: '/assessmentLevel/list', + method: 'get', + }) +} +// 启用考核计划方案 +export function updatePlanEnabled(data: object) { + return request({ + url: '/assessmentPlan/updatePlanEnabled', + method: 'post', + data, + }) +} diff --git a/src/components/showPhoto/index.vue b/src/components/showPhoto/index.vue index 5c765ed..a221af2 100644 --- a/src/components/showPhoto/index.vue +++ b/src/components/showPhoto/index.vue @@ -6,6 +6,10 @@ type: String, required: true, }, + minioFileId: { + type: String, + required: true, + }, height: { type: String, default: '100px', @@ -24,17 +28,20 @@ // url.value = res.data // }) const arr = props.minioFileName.split(',') - urlList.value = arr.map((item) => { + const ids = props.minioFileId.split(',') + console.log(ids, 'ids') + urlList.value = arr.map((item, index) => { + console.log(`${import.meta.env.VITE_APP_API_BASEURL}${ids[index]}`) return { minioFileName: item, - url: '', + url: `${import.meta.env.VITE_APP_API_BASEURL}/static/${ids[index]}`, } }) - urlList.value.forEach((item: any) => { - getFileUrl(item.minioFileName).then((res) => { - item.url = res.data - }) - }) + // urlList.value.forEach((item: any) => { + // getFileUrl(item.minioFileName).then((res) => { + // item.url = res.data + // }) + // }) } else { urlList.value = [] diff --git a/src/views/flling/already/index copy.vue b/src/views/flling/already/index copy.vue new file mode 100644 index 0000000..8ee5ca4 --- /dev/null +++ b/src/views/flling/already/index copy.vue @@ -0,0 +1,199 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + 导出 + + + + + + + + + + diff --git a/src/views/flling/already/index.vue b/src/views/flling/already/index.vue index 8ee5ca4..ca7731c 100644 --- a/src/views/flling/already/index.vue +++ b/src/views/flling/already/index.vue @@ -4,196 +4,10 @@ * @Date: 2023-09-14 --> - - - - - - - - - - - - - - - - - - - - - - - 导出 - - - - - - - - + diff --git a/src/views/flling/treat/fillingDialog.vue b/src/views/flling/treat/fillingDialog.vue new file mode 100644 index 0000000..d3b0e54 --- /dev/null +++ b/src/views/flling/treat/fillingDialog.vue @@ -0,0 +1,179 @@ + + + + + + + + + + + + + + + + + + + + + + + 上传 + + + + + + + + + + + + diff --git a/src/views/flling/treat/index.vue b/src/views/flling/treat/index.vue index d08184a..44e356d 100644 --- a/src/views/flling/treat/index.vue +++ b/src/views/flling/treat/index.vue @@ -5,71 +5,102 @@ --> + - + - + - + + + - + + + - + 提交 + + 导出 + - - + + - + 填报 - + 提交 + + + diff --git a/src/views/rule/programme/components/edit.vue b/src/views/rule/programme/components/edit.vue index 1c1cfba..903c65e 100644 --- a/src/views/rule/programme/components/edit.vue +++ b/src/views/rule/programme/components/edit.vue @@ -9,7 +9,7 @@ import proxyTable from './proxyTable.vue' import { getDictByCode } from '@/api/system/dict' import { uploadApi } from '@/api/common' -import { addProgramme, addProxyList, editProgramme, getDetail } from '@/api/home/rule/programme' +import { ProxyList, addProgramme, addProxyList, editProgramme, getDetail, getGradeSelectList, updatePlanEnabled } from '@/api/home/rule/programme' const $route = useRoute() const $router = useRouter() // 对话框类型:create,update @@ -27,6 +27,7 @@ cycle: '', // 考核周期 endTime: '', fileId: '', + fileName: '', id: '', isEnable: '', levelId: '', @@ -37,6 +38,7 @@ score: '', startTime: '', }) +const proxyList = ref([]) // 表单验证规则 const rules = ref({ assObject: [{ required: true, message: '考核对象必选', trigger: ['blur', 'change'] }], @@ -61,11 +63,11 @@ lock: true, background: 'rgba(255, 255, 255, 0.8)', }) - console.log(event.target.files) fd.append('file', event.target.files[0]) uploadApi(fd).then((res) => { if (res.code === 200) { - ruleForm.value.fileId = ruleForm.value.fileId ? `${ruleForm.value.fileId},${res.data.fileName}` : res.data.fileName + ruleForm.value.fileId = ruleForm.value.fileId ? `${ruleForm.value.fileId},${res.data.fileId}` : res.data.fileId + ruleForm.value.fileName = ruleForm.value.fileName ? `${ruleForm.value.fileName},${res.data.fileName}` : res.data.fileName // 重置当前验证 ruleFormRef.value?.clearValidate('minioFileName') ElMessage.success('文件上传成功') @@ -96,7 +98,7 @@ // 考核周期下拉框 const cycleList = ref<{ id: string; value: string; name: string }[]>() // 考核等级下拉框 -const levelList = ref<{ id: string; value: string; name: string }[]>() +const levelList = ref() // 获取字典 const fetchSelectList = () => { getDictByCode('ass_object').then((res) => { @@ -108,12 +110,24 @@ getDictByCode('cycle_code').then((res) => { cycleList.value = res.data }) - getDictByCode('level_code').then((res) => { + // getDictByCode('level_code').then((res) => { + // levelList.value = res.data + // }) + getGradeSelectList().then((res) => { levelList.value = res.data }) } fetchSelectList() const radio = ref('基本信息') +// 获取方案指标列表 +const fetchProxyList = () => { + // if ($route.path.includes('create')) { + // return + // } + ProxyList({ planId: ruleForm.value.id, limit: 9999, offset: 1 }).then((res) => { + proxyList.value = res.data.rows + }) +} onMounted(() => { dialogStatus.value = $route.params.type as string if (!$route.path.includes('create')) { @@ -125,6 +139,7 @@ // getDetail({ id: data.id }).then((res) => { // console.log(res.data) // }) + fetchProxyList() } }) // 编辑 @@ -132,22 +147,39 @@ editProgramme({ ...ruleForm.value }).then((res) => { addProxyList({ planId: ruleForm.value.id, - quotaIds: proxyRef.value.list.map((item: any) => item.id), + quotaIds: proxyList.value.map((item: any) => item.id), }).then((res) => { + // if (ruleForm.value.isEnable === '1' && proxyList.value.length) { + // updatePlanEnabled({ ...ruleForm.value }).then(() => { + // ElMessage.success('操作成功') + // $router.go(-1) + // }) + // } + // else { ElMessage.success('操作成功') $router.go(-1) + // } }) }) } // 新增 const create = () => { - addProgramme({ ...ruleForm.value }).then((res) => { - console.log() - // addProxyList({ - - // }) - ElMessage.success('操作成功') - $router.go(-1) + addProgramme({ ...ruleForm.value }).then((response) => { + addProxyList({ + planId: response.data, + quotaIds: proxyList.value.map((item: any) => item.id), + }).then((res) => { + if (ruleForm.value.isEnable === '1' && proxyList.value.length) { + updatePlanEnabled({ id: response.data, isEnable: '1' }).then(() => { + ElMessage.success('操作成功') + $router.go(-1) + }) + } + else { + ElMessage.success('操作成功') + $router.go(-1) + } + }) }) } // 保存 @@ -163,6 +195,7 @@ type: 'warning', }, ).then((res) => { + proxyList.value = proxyRef.value?.list if ($route.path.includes('update')) { update() } @@ -172,6 +205,11 @@ }) }) } +// watch(() => proxyRef.value?.list, (newVal) => { +// proxyList.value = newVal +// }, { +// deep: true, +// }) @@ -214,9 +252,9 @@ - + @@ -230,7 +268,7 @@ - + @@ -286,7 +324,7 @@ - + 上传 @@ -297,7 +335,7 @@ - + diff --git a/src/views/rule/programme/components/proxyTable.vue b/src/views/rule/programme/components/proxyTable.vue index c2fd143..55ddd41 100644 --- a/src/views/rule/programme/components/proxyTable.vue +++ b/src/views/rule/programme/components/proxyTable.vue @@ -58,6 +58,7 @@ }, ]) const list = ref([]) +const backList = ref([]) // 检查数据列表 function checkCertificateList() { return useCheckList(list.value, columns.value, '一级考核指标列表') @@ -87,6 +88,7 @@ // 去掉重复选择 if (!list.value.filter((ele: any) => ele.id === item.id).length) { list.value.push(item) + backList.value.push(item) } }) } @@ -98,33 +100,47 @@ } watch(() => $props.data, (newVal) => { if (newVal) { - list.value = newVal + list.value = JSON.parse(JSON.stringify(newVal)) + backList.value = JSON.parse(JSON.stringify(newVal)) } +}, { + deep: true, }) -const initDialog = () => { - list.value = $props.data -} -initDialog() +// const initDialog = () => { +// list.value = JSON.parse(JSON.stringify($props.data)) +// } +// initDialog() defineExpose({ list, checkCertificateList, }) +const name = ref('') +const search = () => { + list.value = backList.value.filter((item: any) => item.quotaProjectName.includes(name.value)) +} +const reset = () => { + name.value = '' + list.value = backList.value +} - + - - + + 查询 - + + 重置 + + 删除 - + 增加 diff --git a/src/api/home/1 b/src/api/home/1 deleted file mode 100644 index e69de29..0000000 --- a/src/api/home/1 +++ /dev/null diff --git a/src/api/home/filling/filling.ts b/src/api/home/filling/filling.ts new file mode 100644 index 0000000..47914e0 --- /dev/null +++ b/src/api/home/filling/filling.ts @@ -0,0 +1,29 @@ +/** + * 填报相关接口 + */ +import request from '@/api/index' + +// 分页列表 +export function getListPage(params: object) { + return request({ + url: '/planQuotaRep/listPage', + method: 'get', + params, + }) +} +// 填报 +export function filling(data: object) { + return request({ + url: '/planQuotaRep/updateRep', + method: 'post', + data, + }) +} +// 提交 +export function batchSubmitApi(data: object) { + return request({ + url: '/planQuotaRep/batchSubmit', + method: 'post', + data, + }) +} diff --git a/src/api/home/rule/programme.ts b/src/api/home/rule/programme.ts index cbf5585..91e1dbe 100644 --- a/src/api/home/rule/programme.ts +++ b/src/api/home/rule/programme.ts @@ -51,4 +51,26 @@ data, }) } - +// 方案指标列表 +export function ProxyList(params: object) { + return request({ + url: '/assessmentPlan/planQuotaListPage', + method: 'get', + params, + }) +} +// 考核方案等级下拉 /assessmentLevel/list +export function getGradeSelectList() { + return request({ + url: '/assessmentLevel/list', + method: 'get', + }) +} +// 启用考核计划方案 +export function updatePlanEnabled(data: object) { + return request({ + url: '/assessmentPlan/updatePlanEnabled', + method: 'post', + data, + }) +} diff --git a/src/components/showPhoto/index.vue b/src/components/showPhoto/index.vue index 5c765ed..a221af2 100644 --- a/src/components/showPhoto/index.vue +++ b/src/components/showPhoto/index.vue @@ -6,6 +6,10 @@ type: String, required: true, }, + minioFileId: { + type: String, + required: true, + }, height: { type: String, default: '100px', @@ -24,17 +28,20 @@ // url.value = res.data // }) const arr = props.minioFileName.split(',') - urlList.value = arr.map((item) => { + const ids = props.minioFileId.split(',') + console.log(ids, 'ids') + urlList.value = arr.map((item, index) => { + console.log(`${import.meta.env.VITE_APP_API_BASEURL}${ids[index]}`) return { minioFileName: item, - url: '', + url: `${import.meta.env.VITE_APP_API_BASEURL}/static/${ids[index]}`, } }) - urlList.value.forEach((item: any) => { - getFileUrl(item.minioFileName).then((res) => { - item.url = res.data - }) - }) + // urlList.value.forEach((item: any) => { + // getFileUrl(item.minioFileName).then((res) => { + // item.url = res.data + // }) + // }) } else { urlList.value = [] diff --git a/src/views/flling/already/index copy.vue b/src/views/flling/already/index copy.vue new file mode 100644 index 0000000..8ee5ca4 --- /dev/null +++ b/src/views/flling/already/index copy.vue @@ -0,0 +1,199 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + 导出 + + + + + + + + + + diff --git a/src/views/flling/already/index.vue b/src/views/flling/already/index.vue index 8ee5ca4..ca7731c 100644 --- a/src/views/flling/already/index.vue +++ b/src/views/flling/already/index.vue @@ -4,196 +4,10 @@ * @Date: 2023-09-14 --> - - - - - - - - - - - - - - - - - - - - - - - 导出 - - - - - - - - + diff --git a/src/views/flling/treat/fillingDialog.vue b/src/views/flling/treat/fillingDialog.vue new file mode 100644 index 0000000..d3b0e54 --- /dev/null +++ b/src/views/flling/treat/fillingDialog.vue @@ -0,0 +1,179 @@ + + + + + + + + + + + + + + + + + + + + + + + 上传 + + + + + + + + + + + + diff --git a/src/views/flling/treat/index.vue b/src/views/flling/treat/index.vue index d08184a..44e356d 100644 --- a/src/views/flling/treat/index.vue +++ b/src/views/flling/treat/index.vue @@ -5,71 +5,102 @@ --> + - + - + - + + + - + + + - + 提交 + + 导出 + - - + + - + 填报 - + 提交 + + + diff --git a/src/views/rule/programme/components/edit.vue b/src/views/rule/programme/components/edit.vue index 1c1cfba..903c65e 100644 --- a/src/views/rule/programme/components/edit.vue +++ b/src/views/rule/programme/components/edit.vue @@ -9,7 +9,7 @@ import proxyTable from './proxyTable.vue' import { getDictByCode } from '@/api/system/dict' import { uploadApi } from '@/api/common' -import { addProgramme, addProxyList, editProgramme, getDetail } from '@/api/home/rule/programme' +import { ProxyList, addProgramme, addProxyList, editProgramme, getDetail, getGradeSelectList, updatePlanEnabled } from '@/api/home/rule/programme' const $route = useRoute() const $router = useRouter() // 对话框类型:create,update @@ -27,6 +27,7 @@ cycle: '', // 考核周期 endTime: '', fileId: '', + fileName: '', id: '', isEnable: '', levelId: '', @@ -37,6 +38,7 @@ score: '', startTime: '', }) +const proxyList = ref([]) // 表单验证规则 const rules = ref({ assObject: [{ required: true, message: '考核对象必选', trigger: ['blur', 'change'] }], @@ -61,11 +63,11 @@ lock: true, background: 'rgba(255, 255, 255, 0.8)', }) - console.log(event.target.files) fd.append('file', event.target.files[0]) uploadApi(fd).then((res) => { if (res.code === 200) { - ruleForm.value.fileId = ruleForm.value.fileId ? `${ruleForm.value.fileId},${res.data.fileName}` : res.data.fileName + ruleForm.value.fileId = ruleForm.value.fileId ? `${ruleForm.value.fileId},${res.data.fileId}` : res.data.fileId + ruleForm.value.fileName = ruleForm.value.fileName ? `${ruleForm.value.fileName},${res.data.fileName}` : res.data.fileName // 重置当前验证 ruleFormRef.value?.clearValidate('minioFileName') ElMessage.success('文件上传成功') @@ -96,7 +98,7 @@ // 考核周期下拉框 const cycleList = ref<{ id: string; value: string; name: string }[]>() // 考核等级下拉框 -const levelList = ref<{ id: string; value: string; name: string }[]>() +const levelList = ref() // 获取字典 const fetchSelectList = () => { getDictByCode('ass_object').then((res) => { @@ -108,12 +110,24 @@ getDictByCode('cycle_code').then((res) => { cycleList.value = res.data }) - getDictByCode('level_code').then((res) => { + // getDictByCode('level_code').then((res) => { + // levelList.value = res.data + // }) + getGradeSelectList().then((res) => { levelList.value = res.data }) } fetchSelectList() const radio = ref('基本信息') +// 获取方案指标列表 +const fetchProxyList = () => { + // if ($route.path.includes('create')) { + // return + // } + ProxyList({ planId: ruleForm.value.id, limit: 9999, offset: 1 }).then((res) => { + proxyList.value = res.data.rows + }) +} onMounted(() => { dialogStatus.value = $route.params.type as string if (!$route.path.includes('create')) { @@ -125,6 +139,7 @@ // getDetail({ id: data.id }).then((res) => { // console.log(res.data) // }) + fetchProxyList() } }) // 编辑 @@ -132,22 +147,39 @@ editProgramme({ ...ruleForm.value }).then((res) => { addProxyList({ planId: ruleForm.value.id, - quotaIds: proxyRef.value.list.map((item: any) => item.id), + quotaIds: proxyList.value.map((item: any) => item.id), }).then((res) => { + // if (ruleForm.value.isEnable === '1' && proxyList.value.length) { + // updatePlanEnabled({ ...ruleForm.value }).then(() => { + // ElMessage.success('操作成功') + // $router.go(-1) + // }) + // } + // else { ElMessage.success('操作成功') $router.go(-1) + // } }) }) } // 新增 const create = () => { - addProgramme({ ...ruleForm.value }).then((res) => { - console.log() - // addProxyList({ - - // }) - ElMessage.success('操作成功') - $router.go(-1) + addProgramme({ ...ruleForm.value }).then((response) => { + addProxyList({ + planId: response.data, + quotaIds: proxyList.value.map((item: any) => item.id), + }).then((res) => { + if (ruleForm.value.isEnable === '1' && proxyList.value.length) { + updatePlanEnabled({ id: response.data, isEnable: '1' }).then(() => { + ElMessage.success('操作成功') + $router.go(-1) + }) + } + else { + ElMessage.success('操作成功') + $router.go(-1) + } + }) }) } // 保存 @@ -163,6 +195,7 @@ type: 'warning', }, ).then((res) => { + proxyList.value = proxyRef.value?.list if ($route.path.includes('update')) { update() } @@ -172,6 +205,11 @@ }) }) } +// watch(() => proxyRef.value?.list, (newVal) => { +// proxyList.value = newVal +// }, { +// deep: true, +// }) @@ -214,9 +252,9 @@ - + @@ -230,7 +268,7 @@ - + @@ -286,7 +324,7 @@ - + 上传 @@ -297,7 +335,7 @@ - + diff --git a/src/views/rule/programme/components/proxyTable.vue b/src/views/rule/programme/components/proxyTable.vue index c2fd143..55ddd41 100644 --- a/src/views/rule/programme/components/proxyTable.vue +++ b/src/views/rule/programme/components/proxyTable.vue @@ -58,6 +58,7 @@ }, ]) const list = ref([]) +const backList = ref([]) // 检查数据列表 function checkCertificateList() { return useCheckList(list.value, columns.value, '一级考核指标列表') @@ -87,6 +88,7 @@ // 去掉重复选择 if (!list.value.filter((ele: any) => ele.id === item.id).length) { list.value.push(item) + backList.value.push(item) } }) } @@ -98,33 +100,47 @@ } watch(() => $props.data, (newVal) => { if (newVal) { - list.value = newVal + list.value = JSON.parse(JSON.stringify(newVal)) + backList.value = JSON.parse(JSON.stringify(newVal)) } +}, { + deep: true, }) -const initDialog = () => { - list.value = $props.data -} -initDialog() +// const initDialog = () => { +// list.value = JSON.parse(JSON.stringify($props.data)) +// } +// initDialog() defineExpose({ list, checkCertificateList, }) +const name = ref('') +const search = () => { + list.value = backList.value.filter((item: any) => item.quotaProjectName.includes(name.value)) +} +const reset = () => { + name.value = '' + list.value = backList.value +} - + - - + + 查询 - + + 重置 + + 删除 - + 增加 diff --git a/src/views/rule/programme/index.vue b/src/views/rule/programme/index.vue index dd485b4..e55a91c 100644 --- a/src/views/rule/programme/index.vue +++ b/src/views/rule/programme/index.vue @@ -29,7 +29,7 @@ }, { text: '具体考核部门', - value: '', + value: 'assDept', align: 'center', }, { @@ -47,21 +47,6 @@ value: 'recoRatingName', align: 'center', }, - // { - // text: '考核指标项目', - // value: 'remark', - // align: 'center', - // }, - // { - // text: '考核指标类型', - // value: 'remark', - // align: 'center', - // }, - { - text: '考核方案得分', - value: 'score', - align: 'center', - }, ]) const list = ref([]) const total = ref(0) @@ -75,7 +60,12 @@ listQuery.offset = 1 } getListPage(listQuery).then((response) => { - list.value = response.data.rows + list.value = response.data.rows.map((item: any) => { + return { + ...item, + assDept: item.depts.map((child: any) => child.fullName).join(','), + } + }) total.value = parseInt(response.data.total) listLoading.value = false }) @@ -126,7 +116,7 @@ type: 'warning', }, ).then(() => { - delProgramme(row.id).then((res) => { + delProgramme({ id: row.id }).then((res) => { ElMessage.success('操作成功') search() }) @@ -190,6 +180,29 @@ :is-showmulti-select="true" @change="changePage" > + + + + + {{ item.quotaProjectName }} + + + + + + + + + {{ item.priIndicators }} + + + + + + + {{ scope.row.score }} + + @@ -209,3 +222,17 @@ + + diff --git a/src/api/home/1 b/src/api/home/1 deleted file mode 100644 index e69de29..0000000 --- a/src/api/home/1 +++ /dev/null diff --git a/src/api/home/filling/filling.ts b/src/api/home/filling/filling.ts new file mode 100644 index 0000000..47914e0 --- /dev/null +++ b/src/api/home/filling/filling.ts @@ -0,0 +1,29 @@ +/** + * 填报相关接口 + */ +import request from '@/api/index' + +// 分页列表 +export function getListPage(params: object) { + return request({ + url: '/planQuotaRep/listPage', + method: 'get', + params, + }) +} +// 填报 +export function filling(data: object) { + return request({ + url: '/planQuotaRep/updateRep', + method: 'post', + data, + }) +} +// 提交 +export function batchSubmitApi(data: object) { + return request({ + url: '/planQuotaRep/batchSubmit', + method: 'post', + data, + }) +} diff --git a/src/api/home/rule/programme.ts b/src/api/home/rule/programme.ts index cbf5585..91e1dbe 100644 --- a/src/api/home/rule/programme.ts +++ b/src/api/home/rule/programme.ts @@ -51,4 +51,26 @@ data, }) } - +// 方案指标列表 +export function ProxyList(params: object) { + return request({ + url: '/assessmentPlan/planQuotaListPage', + method: 'get', + params, + }) +} +// 考核方案等级下拉 /assessmentLevel/list +export function getGradeSelectList() { + return request({ + url: '/assessmentLevel/list', + method: 'get', + }) +} +// 启用考核计划方案 +export function updatePlanEnabled(data: object) { + return request({ + url: '/assessmentPlan/updatePlanEnabled', + method: 'post', + data, + }) +} diff --git a/src/components/showPhoto/index.vue b/src/components/showPhoto/index.vue index 5c765ed..a221af2 100644 --- a/src/components/showPhoto/index.vue +++ b/src/components/showPhoto/index.vue @@ -6,6 +6,10 @@ type: String, required: true, }, + minioFileId: { + type: String, + required: true, + }, height: { type: String, default: '100px', @@ -24,17 +28,20 @@ // url.value = res.data // }) const arr = props.minioFileName.split(',') - urlList.value = arr.map((item) => { + const ids = props.minioFileId.split(',') + console.log(ids, 'ids') + urlList.value = arr.map((item, index) => { + console.log(`${import.meta.env.VITE_APP_API_BASEURL}${ids[index]}`) return { minioFileName: item, - url: '', + url: `${import.meta.env.VITE_APP_API_BASEURL}/static/${ids[index]}`, } }) - urlList.value.forEach((item: any) => { - getFileUrl(item.minioFileName).then((res) => { - item.url = res.data - }) - }) + // urlList.value.forEach((item: any) => { + // getFileUrl(item.minioFileName).then((res) => { + // item.url = res.data + // }) + // }) } else { urlList.value = [] diff --git a/src/views/flling/already/index copy.vue b/src/views/flling/already/index copy.vue new file mode 100644 index 0000000..8ee5ca4 --- /dev/null +++ b/src/views/flling/already/index copy.vue @@ -0,0 +1,199 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + 导出 + + + + + + + + + + diff --git a/src/views/flling/already/index.vue b/src/views/flling/already/index.vue index 8ee5ca4..ca7731c 100644 --- a/src/views/flling/already/index.vue +++ b/src/views/flling/already/index.vue @@ -4,196 +4,10 @@ * @Date: 2023-09-14 --> - - - - - - - - - - - - - - - - - - - - - - - 导出 - - - - - - - - + diff --git a/src/views/flling/treat/fillingDialog.vue b/src/views/flling/treat/fillingDialog.vue new file mode 100644 index 0000000..d3b0e54 --- /dev/null +++ b/src/views/flling/treat/fillingDialog.vue @@ -0,0 +1,179 @@ + + + + + + + + + + + + + + + + + + + + + + + 上传 + + + + + + + + + + + + diff --git a/src/views/flling/treat/index.vue b/src/views/flling/treat/index.vue index d08184a..44e356d 100644 --- a/src/views/flling/treat/index.vue +++ b/src/views/flling/treat/index.vue @@ -5,71 +5,102 @@ --> + - + - + - + + + - + + + - + 提交 + + 导出 + - - + + - + 填报 - + 提交 + + + diff --git a/src/views/rule/programme/components/edit.vue b/src/views/rule/programme/components/edit.vue index 1c1cfba..903c65e 100644 --- a/src/views/rule/programme/components/edit.vue +++ b/src/views/rule/programme/components/edit.vue @@ -9,7 +9,7 @@ import proxyTable from './proxyTable.vue' import { getDictByCode } from '@/api/system/dict' import { uploadApi } from '@/api/common' -import { addProgramme, addProxyList, editProgramme, getDetail } from '@/api/home/rule/programme' +import { ProxyList, addProgramme, addProxyList, editProgramme, getDetail, getGradeSelectList, updatePlanEnabled } from '@/api/home/rule/programme' const $route = useRoute() const $router = useRouter() // 对话框类型:create,update @@ -27,6 +27,7 @@ cycle: '', // 考核周期 endTime: '', fileId: '', + fileName: '', id: '', isEnable: '', levelId: '', @@ -37,6 +38,7 @@ score: '', startTime: '', }) +const proxyList = ref([]) // 表单验证规则 const rules = ref({ assObject: [{ required: true, message: '考核对象必选', trigger: ['blur', 'change'] }], @@ -61,11 +63,11 @@ lock: true, background: 'rgba(255, 255, 255, 0.8)', }) - console.log(event.target.files) fd.append('file', event.target.files[0]) uploadApi(fd).then((res) => { if (res.code === 200) { - ruleForm.value.fileId = ruleForm.value.fileId ? `${ruleForm.value.fileId},${res.data.fileName}` : res.data.fileName + ruleForm.value.fileId = ruleForm.value.fileId ? `${ruleForm.value.fileId},${res.data.fileId}` : res.data.fileId + ruleForm.value.fileName = ruleForm.value.fileName ? `${ruleForm.value.fileName},${res.data.fileName}` : res.data.fileName // 重置当前验证 ruleFormRef.value?.clearValidate('minioFileName') ElMessage.success('文件上传成功') @@ -96,7 +98,7 @@ // 考核周期下拉框 const cycleList = ref<{ id: string; value: string; name: string }[]>() // 考核等级下拉框 -const levelList = ref<{ id: string; value: string; name: string }[]>() +const levelList = ref() // 获取字典 const fetchSelectList = () => { getDictByCode('ass_object').then((res) => { @@ -108,12 +110,24 @@ getDictByCode('cycle_code').then((res) => { cycleList.value = res.data }) - getDictByCode('level_code').then((res) => { + // getDictByCode('level_code').then((res) => { + // levelList.value = res.data + // }) + getGradeSelectList().then((res) => { levelList.value = res.data }) } fetchSelectList() const radio = ref('基本信息') +// 获取方案指标列表 +const fetchProxyList = () => { + // if ($route.path.includes('create')) { + // return + // } + ProxyList({ planId: ruleForm.value.id, limit: 9999, offset: 1 }).then((res) => { + proxyList.value = res.data.rows + }) +} onMounted(() => { dialogStatus.value = $route.params.type as string if (!$route.path.includes('create')) { @@ -125,6 +139,7 @@ // getDetail({ id: data.id }).then((res) => { // console.log(res.data) // }) + fetchProxyList() } }) // 编辑 @@ -132,22 +147,39 @@ editProgramme({ ...ruleForm.value }).then((res) => { addProxyList({ planId: ruleForm.value.id, - quotaIds: proxyRef.value.list.map((item: any) => item.id), + quotaIds: proxyList.value.map((item: any) => item.id), }).then((res) => { + // if (ruleForm.value.isEnable === '1' && proxyList.value.length) { + // updatePlanEnabled({ ...ruleForm.value }).then(() => { + // ElMessage.success('操作成功') + // $router.go(-1) + // }) + // } + // else { ElMessage.success('操作成功') $router.go(-1) + // } }) }) } // 新增 const create = () => { - addProgramme({ ...ruleForm.value }).then((res) => { - console.log() - // addProxyList({ - - // }) - ElMessage.success('操作成功') - $router.go(-1) + addProgramme({ ...ruleForm.value }).then((response) => { + addProxyList({ + planId: response.data, + quotaIds: proxyList.value.map((item: any) => item.id), + }).then((res) => { + if (ruleForm.value.isEnable === '1' && proxyList.value.length) { + updatePlanEnabled({ id: response.data, isEnable: '1' }).then(() => { + ElMessage.success('操作成功') + $router.go(-1) + }) + } + else { + ElMessage.success('操作成功') + $router.go(-1) + } + }) }) } // 保存 @@ -163,6 +195,7 @@ type: 'warning', }, ).then((res) => { + proxyList.value = proxyRef.value?.list if ($route.path.includes('update')) { update() } @@ -172,6 +205,11 @@ }) }) } +// watch(() => proxyRef.value?.list, (newVal) => { +// proxyList.value = newVal +// }, { +// deep: true, +// }) @@ -214,9 +252,9 @@ - + @@ -230,7 +268,7 @@ - + @@ -286,7 +324,7 @@ - + 上传 @@ -297,7 +335,7 @@ - + diff --git a/src/views/rule/programme/components/proxyTable.vue b/src/views/rule/programme/components/proxyTable.vue index c2fd143..55ddd41 100644 --- a/src/views/rule/programme/components/proxyTable.vue +++ b/src/views/rule/programme/components/proxyTable.vue @@ -58,6 +58,7 @@ }, ]) const list = ref([]) +const backList = ref([]) // 检查数据列表 function checkCertificateList() { return useCheckList(list.value, columns.value, '一级考核指标列表') @@ -87,6 +88,7 @@ // 去掉重复选择 if (!list.value.filter((ele: any) => ele.id === item.id).length) { list.value.push(item) + backList.value.push(item) } }) } @@ -98,33 +100,47 @@ } watch(() => $props.data, (newVal) => { if (newVal) { - list.value = newVal + list.value = JSON.parse(JSON.stringify(newVal)) + backList.value = JSON.parse(JSON.stringify(newVal)) } +}, { + deep: true, }) -const initDialog = () => { - list.value = $props.data -} -initDialog() +// const initDialog = () => { +// list.value = JSON.parse(JSON.stringify($props.data)) +// } +// initDialog() defineExpose({ list, checkCertificateList, }) +const name = ref('') +const search = () => { + list.value = backList.value.filter((item: any) => item.quotaProjectName.includes(name.value)) +} +const reset = () => { + name.value = '' + list.value = backList.value +} - + - - + + 查询 - + + 重置 + + 删除 - + 增加 diff --git a/src/views/rule/programme/index.vue b/src/views/rule/programme/index.vue index dd485b4..e55a91c 100644 --- a/src/views/rule/programme/index.vue +++ b/src/views/rule/programme/index.vue @@ -29,7 +29,7 @@ }, { text: '具体考核部门', - value: '', + value: 'assDept', align: 'center', }, { @@ -47,21 +47,6 @@ value: 'recoRatingName', align: 'center', }, - // { - // text: '考核指标项目', - // value: 'remark', - // align: 'center', - // }, - // { - // text: '考核指标类型', - // value: 'remark', - // align: 'center', - // }, - { - text: '考核方案得分', - value: 'score', - align: 'center', - }, ]) const list = ref([]) const total = ref(0) @@ -75,7 +60,12 @@ listQuery.offset = 1 } getListPage(listQuery).then((response) => { - list.value = response.data.rows + list.value = response.data.rows.map((item: any) => { + return { + ...item, + assDept: item.depts.map((child: any) => child.fullName).join(','), + } + }) total.value = parseInt(response.data.total) listLoading.value = false }) @@ -126,7 +116,7 @@ type: 'warning', }, ).then(() => { - delProgramme(row.id).then((res) => { + delProgramme({ id: row.id }).then((res) => { ElMessage.success('操作成功') search() }) @@ -190,6 +180,29 @@ :is-showmulti-select="true" @change="changePage" > + + + + + {{ item.quotaProjectName }} + + + + + + + + + {{ item.priIndicators }} + + + + + + + {{ scope.row.score }} + + @@ -209,3 +222,17 @@ + + diff --git a/src/views/rule/proxy/components/edit.vue b/src/views/rule/proxy/components/edit.vue index 17ec00f..5d745ca 100644 --- a/src/views/rule/proxy/components/edit.vue +++ b/src/views/rule/proxy/components/edit.vue @@ -37,6 +37,7 @@ fileId: '', // 上传文件 id: '', ruleDesc: '', + fileName: '', }) // 表单验证规则 const rules = ref({ @@ -80,7 +81,8 @@ fd.append('file', event.target.files[0]) uploadApi(fd).then((res) => { if (res.code === 200) { - ruleForm.value.fileId = ruleForm.value.fileId ? `${ruleForm.value.fileId},${res.data.fileName}` : res.data.fileName + ruleForm.value.fileId = ruleForm.value.fileId ? `${ruleForm.value.fileId},${res.data.fileId}` : res.data.fileId + ruleForm.value.fileName = ruleForm.value.fileName ? `${ruleForm.value.fileName},${res.data.fileName}` : res.data.fileName // 重置当前验证 ruleFormRef.value?.clearValidate('fileId') ElMessage.success('文件上传成功') @@ -191,6 +193,18 @@ }) } fetchDeptTree() +// 指标值类型是否可选择区间 +const scopeFlag = ref(false) +watch(() => ruleForm.value.quotaProject, (newVal) => { + if (newVal === '4') { + scopeFlag.value = false + ruleForm.value.valType = '2' + } + else { + scopeFlag.value = true + ruleForm.value.valType = '1' + } +}) @@ -264,7 +278,7 @@ - + {{ item.name }} @@ -299,7 +313,7 @@ - + 上传