diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d4c857a..30707bb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -66,7 +66,7 @@ specifier: ^6.2.1 version: 6.2.1 pdfjs-dist: - specifier: 2.0.943 + specifier: ^2.0.943 version: 2.0.943(webpack@4.47.0) pinia: specifier: ^2.0.23 @@ -4315,6 +4315,7 @@ /figgy-pudding@3.5.2: resolution: {integrity: sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw==} + deprecated: This module is no longer supported. dev: false /figures@3.2.0: diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d4c857a..30707bb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -66,7 +66,7 @@ specifier: ^6.2.1 version: 6.2.1 pdfjs-dist: - specifier: 2.0.943 + specifier: ^2.0.943 version: 2.0.943(webpack@4.47.0) pinia: specifier: ^2.0.23 @@ -4315,6 +4315,7 @@ /figgy-pudding@3.5.2: resolution: {integrity: sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw==} + deprecated: This module is no longer supported. dev: false /figures@3.2.0: diff --git a/src/views/tested/MeasurementBusiness/detection/index.vue b/src/views/tested/MeasurementBusiness/detection/index.vue index ffc8b7c..58aa0af 100644 --- a/src/views/tested/MeasurementBusiness/detection/index.vue +++ b/src/views/tested/MeasurementBusiness/detection/index.vue @@ -126,7 +126,7 @@ - + diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d4c857a..30707bb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -66,7 +66,7 @@ specifier: ^6.2.1 version: 6.2.1 pdfjs-dist: - specifier: 2.0.943 + specifier: ^2.0.943 version: 2.0.943(webpack@4.47.0) pinia: specifier: ^2.0.23 @@ -4315,6 +4315,7 @@ /figgy-pudding@3.5.2: resolution: {integrity: sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw==} + deprecated: This module is no longer supported. dev: false /figures@3.2.0: diff --git a/src/views/tested/MeasurementBusiness/detection/index.vue b/src/views/tested/MeasurementBusiness/detection/index.vue index ffc8b7c..58aa0af 100644 --- a/src/views/tested/MeasurementBusiness/detection/index.vue +++ b/src/views/tested/MeasurementBusiness/detection/index.vue @@ -126,7 +126,7 @@ - + diff --git a/src/views/tested/MeasurementBusiness/notice/index.vue b/src/views/tested/MeasurementBusiness/notice/index.vue index abf2930..de0cf86 100644 --- a/src/views/tested/MeasurementBusiness/notice/index.vue +++ b/src/views/tested/MeasurementBusiness/notice/index.vue @@ -63,7 +63,7 @@ // }, { - text: '申请时间', + text: '通知时间', value: 'createTime', align: 'center', }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d4c857a..30707bb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -66,7 +66,7 @@ specifier: ^6.2.1 version: 6.2.1 pdfjs-dist: - specifier: 2.0.943 + specifier: ^2.0.943 version: 2.0.943(webpack@4.47.0) pinia: specifier: ^2.0.23 @@ -4315,6 +4315,7 @@ /figgy-pudding@3.5.2: resolution: {integrity: sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw==} + deprecated: This module is no longer supported. dev: false /figures@3.2.0: diff --git a/src/views/tested/MeasurementBusiness/detection/index.vue b/src/views/tested/MeasurementBusiness/detection/index.vue index ffc8b7c..58aa0af 100644 --- a/src/views/tested/MeasurementBusiness/detection/index.vue +++ b/src/views/tested/MeasurementBusiness/detection/index.vue @@ -126,7 +126,7 @@ - + diff --git a/src/views/tested/MeasurementBusiness/notice/index.vue b/src/views/tested/MeasurementBusiness/notice/index.vue index abf2930..de0cf86 100644 --- a/src/views/tested/MeasurementBusiness/notice/index.vue +++ b/src/views/tested/MeasurementBusiness/notice/index.vue @@ -63,7 +63,7 @@ // }, { - text: '申请时间', + text: '通知时间', value: 'createTime', align: 'center', }, diff --git a/src/views/tested/MeasurementBusiness/review/index.vue b/src/views/tested/MeasurementBusiness/review/index.vue index 0a13174..192c9dd 100644 --- a/src/views/tested/MeasurementBusiness/review/index.vue +++ b/src/views/tested/MeasurementBusiness/review/index.vue @@ -19,7 +19,10 @@ limit: 20, }) // 证书有效期开始结束时间 -const datetimerange = ref() +const datetimerange = ref([ + `${new Date().getFullYear()}-01-01`, + `${(new Date().getFullYear()) + 1}-01-01`, +]) watch(() => datetimerange.value, (newVal) => { listQuery.createTimeStart = '' listQuery.createTimeEnd = '' @@ -29,6 +32,8 @@ listQuery.createTimeEnd = `${newVal[1]} 23:59:59` } } +}, { + deep: true, immediate: true, }) const columns = ref([ { @@ -67,7 +72,7 @@ // align: 'center', // }, { - text: '创建时间', + text: '发布时间', value: 'createTime', align: 'center', }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d4c857a..30707bb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -66,7 +66,7 @@ specifier: ^6.2.1 version: 6.2.1 pdfjs-dist: - specifier: 2.0.943 + specifier: ^2.0.943 version: 2.0.943(webpack@4.47.0) pinia: specifier: ^2.0.23 @@ -4315,6 +4315,7 @@ /figgy-pudding@3.5.2: resolution: {integrity: sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw==} + deprecated: This module is no longer supported. dev: false /figures@3.2.0: diff --git a/src/views/tested/MeasurementBusiness/detection/index.vue b/src/views/tested/MeasurementBusiness/detection/index.vue index ffc8b7c..58aa0af 100644 --- a/src/views/tested/MeasurementBusiness/detection/index.vue +++ b/src/views/tested/MeasurementBusiness/detection/index.vue @@ -126,7 +126,7 @@ - + diff --git a/src/views/tested/MeasurementBusiness/notice/index.vue b/src/views/tested/MeasurementBusiness/notice/index.vue index abf2930..de0cf86 100644 --- a/src/views/tested/MeasurementBusiness/notice/index.vue +++ b/src/views/tested/MeasurementBusiness/notice/index.vue @@ -63,7 +63,7 @@ // }, { - text: '申请时间', + text: '通知时间', value: 'createTime', align: 'center', }, diff --git a/src/views/tested/MeasurementBusiness/review/index.vue b/src/views/tested/MeasurementBusiness/review/index.vue index 0a13174..192c9dd 100644 --- a/src/views/tested/MeasurementBusiness/review/index.vue +++ b/src/views/tested/MeasurementBusiness/review/index.vue @@ -19,7 +19,10 @@ limit: 20, }) // 证书有效期开始结束时间 -const datetimerange = ref() +const datetimerange = ref([ + `${new Date().getFullYear()}-01-01`, + `${(new Date().getFullYear()) + 1}-01-01`, +]) watch(() => datetimerange.value, (newVal) => { listQuery.createTimeStart = '' listQuery.createTimeEnd = '' @@ -29,6 +32,8 @@ listQuery.createTimeEnd = `${newVal[1]} 23:59:59` } } +}, { + deep: true, immediate: true, }) const columns = ref([ { @@ -67,7 +72,7 @@ // align: 'center', // }, { - text: '创建时间', + text: '发布时间', value: 'createTime', align: 'center', }, diff --git a/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue b/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue index 8c135a9..d11bf97 100644 --- a/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue +++ b/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue @@ -23,6 +23,16 @@ type: Boolean, default: false, }, + limit: { + type: Number, + default: 5, + }, + // 不同设备状态 + // 主要用于 状态管理时 过滤不同的设备使用状态 + statusType: { + type: String, + default: '', + }, }) const emits = defineEmits(['add']) const userStore = useUserStore() @@ -126,9 +136,36 @@ ]) // 获取数据列表 const fetchData = () => { + fetchUseStatus() select.value = -1 loadingTable.value = true - getInfoListPage(listQuery.value, '全部').then((response) => { + const data = { + ...listQuery.value, + usageStatusList: [] as string[], + } + if ($props.needStatus) { + switch ($props.statusType) { + case '1': + data.usageStatusList = ['0', '1', '4'] + break + case '2': + data.usageStatusList = ['1', '3'] + break + case '3': + data.usageStatusList = ['0', '4'] + break + case '4': + data.usageStatusList = ['0', '1', '3', '4'] + break + case '5': + data.usageStatusList = ['0', '1'] + break + case 'custom': + data.usageStatusList = listQuery.value.usageStatusList + break + } + } + getInfoListPage(data, '全部').then((response) => { list.value = response.data.rows total.value = parseInt(response.data.total) loadingTable.value = false @@ -215,6 +252,7 @@ // reset() dialogFormVisible.value = true fetchData() // 获取人员列表 + console.log($props, '111') } defineExpose({ initDialog }) // 加载组织机构树形下拉 @@ -263,9 +301,9 @@ usePositionList.value = res.data }) - getDictByCode('eqptDeviceUseStatus').then((res) => { - usageStatusList.value = res.data - }) + // getDictByCode('eqptDeviceUseStatus').then((res) => { + // usageStatusList.value = res.data + // }) getUserDept().then((res) => { if (res.data.fullName === '顶级' || res.data.version === '1' || res.data.version === 1) { getAdminDept({}).then((res) => { @@ -283,6 +321,25 @@ } }) } +// 获取使用状态列表 +// const usageStatusList = ref() +const statusDict = ref<{ [key: string]: string[] }>({ + 1: ['在用', '禁用', '延用'], // 封存 + 2: ['禁用', '封存'], // 启封 + 3: ['在用', '延用'], // 禁用 + 4: ['在用', '禁用', '封存', '延用'], // 报废 + 5: ['在用', '禁用'], // 沿用 +}) +function fetchUseStatus() { + getDictByCode('eqptDeviceUseStatus').then((res) => { + if ($props.needStatus && $props.statusType !== 'custom') { + usageStatusList.value = res.data.filter((item: any) => statusDict.value[$props.statusType].includes(item.name)) + } + else { + usageStatusList.value = res.data + } + }) +} // 监听单位,修改部门 watch(() => listQuery.value.companyId, (newVal) => { listQuery.value.deptIds = '' diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d4c857a..30707bb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -66,7 +66,7 @@ specifier: ^6.2.1 version: 6.2.1 pdfjs-dist: - specifier: 2.0.943 + specifier: ^2.0.943 version: 2.0.943(webpack@4.47.0) pinia: specifier: ^2.0.23 @@ -4315,6 +4315,7 @@ /figgy-pudding@3.5.2: resolution: {integrity: sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw==} + deprecated: This module is no longer supported. dev: false /figures@3.2.0: diff --git a/src/views/tested/MeasurementBusiness/detection/index.vue b/src/views/tested/MeasurementBusiness/detection/index.vue index ffc8b7c..58aa0af 100644 --- a/src/views/tested/MeasurementBusiness/detection/index.vue +++ b/src/views/tested/MeasurementBusiness/detection/index.vue @@ -126,7 +126,7 @@ - + diff --git a/src/views/tested/MeasurementBusiness/notice/index.vue b/src/views/tested/MeasurementBusiness/notice/index.vue index abf2930..de0cf86 100644 --- a/src/views/tested/MeasurementBusiness/notice/index.vue +++ b/src/views/tested/MeasurementBusiness/notice/index.vue @@ -63,7 +63,7 @@ // }, { - text: '申请时间', + text: '通知时间', value: 'createTime', align: 'center', }, diff --git a/src/views/tested/MeasurementBusiness/review/index.vue b/src/views/tested/MeasurementBusiness/review/index.vue index 0a13174..192c9dd 100644 --- a/src/views/tested/MeasurementBusiness/review/index.vue +++ b/src/views/tested/MeasurementBusiness/review/index.vue @@ -19,7 +19,10 @@ limit: 20, }) // 证书有效期开始结束时间 -const datetimerange = ref() +const datetimerange = ref([ + `${new Date().getFullYear()}-01-01`, + `${(new Date().getFullYear()) + 1}-01-01`, +]) watch(() => datetimerange.value, (newVal) => { listQuery.createTimeStart = '' listQuery.createTimeEnd = '' @@ -29,6 +32,8 @@ listQuery.createTimeEnd = `${newVal[1]} 23:59:59` } } +}, { + deep: true, immediate: true, }) const columns = ref([ { @@ -67,7 +72,7 @@ // align: 'center', // }, { - text: '创建时间', + text: '发布时间', value: 'createTime', align: 'center', }, diff --git a/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue b/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue index 8c135a9..d11bf97 100644 --- a/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue +++ b/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue @@ -23,6 +23,16 @@ type: Boolean, default: false, }, + limit: { + type: Number, + default: 5, + }, + // 不同设备状态 + // 主要用于 状态管理时 过滤不同的设备使用状态 + statusType: { + type: String, + default: '', + }, }) const emits = defineEmits(['add']) const userStore = useUserStore() @@ -126,9 +136,36 @@ ]) // 获取数据列表 const fetchData = () => { + fetchUseStatus() select.value = -1 loadingTable.value = true - getInfoListPage(listQuery.value, '全部').then((response) => { + const data = { + ...listQuery.value, + usageStatusList: [] as string[], + } + if ($props.needStatus) { + switch ($props.statusType) { + case '1': + data.usageStatusList = ['0', '1', '4'] + break + case '2': + data.usageStatusList = ['1', '3'] + break + case '3': + data.usageStatusList = ['0', '4'] + break + case '4': + data.usageStatusList = ['0', '1', '3', '4'] + break + case '5': + data.usageStatusList = ['0', '1'] + break + case 'custom': + data.usageStatusList = listQuery.value.usageStatusList + break + } + } + getInfoListPage(data, '全部').then((response) => { list.value = response.data.rows total.value = parseInt(response.data.total) loadingTable.value = false @@ -215,6 +252,7 @@ // reset() dialogFormVisible.value = true fetchData() // 获取人员列表 + console.log($props, '111') } defineExpose({ initDialog }) // 加载组织机构树形下拉 @@ -263,9 +301,9 @@ usePositionList.value = res.data }) - getDictByCode('eqptDeviceUseStatus').then((res) => { - usageStatusList.value = res.data - }) + // getDictByCode('eqptDeviceUseStatus').then((res) => { + // usageStatusList.value = res.data + // }) getUserDept().then((res) => { if (res.data.fullName === '顶级' || res.data.version === '1' || res.data.version === 1) { getAdminDept({}).then((res) => { @@ -283,6 +321,25 @@ } }) } +// 获取使用状态列表 +// const usageStatusList = ref() +const statusDict = ref<{ [key: string]: string[] }>({ + 1: ['在用', '禁用', '延用'], // 封存 + 2: ['禁用', '封存'], // 启封 + 3: ['在用', '延用'], // 禁用 + 4: ['在用', '禁用', '封存', '延用'], // 报废 + 5: ['在用', '禁用'], // 沿用 +}) +function fetchUseStatus() { + getDictByCode('eqptDeviceUseStatus').then((res) => { + if ($props.needStatus && $props.statusType !== 'custom') { + usageStatusList.value = res.data.filter((item: any) => statusDict.value[$props.statusType].includes(item.name)) + } + else { + usageStatusList.value = res.data + } + }) +} // 监听单位,修改部门 watch(() => listQuery.value.companyId, (newVal) => { listQuery.value.deptIds = '' diff --git a/src/views/tested/document/list/index.vue b/src/views/tested/document/list/index.vue index 57a799a..e1ca1c4 100644 --- a/src/views/tested/document/list/index.vue +++ b/src/views/tested/document/list/index.vue @@ -210,7 +210,7 @@ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d4c857a..30707bb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -66,7 +66,7 @@ specifier: ^6.2.1 version: 6.2.1 pdfjs-dist: - specifier: 2.0.943 + specifier: ^2.0.943 version: 2.0.943(webpack@4.47.0) pinia: specifier: ^2.0.23 @@ -4315,6 +4315,7 @@ /figgy-pudding@3.5.2: resolution: {integrity: sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw==} + deprecated: This module is no longer supported. dev: false /figures@3.2.0: diff --git a/src/views/tested/MeasurementBusiness/detection/index.vue b/src/views/tested/MeasurementBusiness/detection/index.vue index ffc8b7c..58aa0af 100644 --- a/src/views/tested/MeasurementBusiness/detection/index.vue +++ b/src/views/tested/MeasurementBusiness/detection/index.vue @@ -126,7 +126,7 @@ - + diff --git a/src/views/tested/MeasurementBusiness/notice/index.vue b/src/views/tested/MeasurementBusiness/notice/index.vue index abf2930..de0cf86 100644 --- a/src/views/tested/MeasurementBusiness/notice/index.vue +++ b/src/views/tested/MeasurementBusiness/notice/index.vue @@ -63,7 +63,7 @@ // }, { - text: '申请时间', + text: '通知时间', value: 'createTime', align: 'center', }, diff --git a/src/views/tested/MeasurementBusiness/review/index.vue b/src/views/tested/MeasurementBusiness/review/index.vue index 0a13174..192c9dd 100644 --- a/src/views/tested/MeasurementBusiness/review/index.vue +++ b/src/views/tested/MeasurementBusiness/review/index.vue @@ -19,7 +19,10 @@ limit: 20, }) // 证书有效期开始结束时间 -const datetimerange = ref() +const datetimerange = ref([ + `${new Date().getFullYear()}-01-01`, + `${(new Date().getFullYear()) + 1}-01-01`, +]) watch(() => datetimerange.value, (newVal) => { listQuery.createTimeStart = '' listQuery.createTimeEnd = '' @@ -29,6 +32,8 @@ listQuery.createTimeEnd = `${newVal[1]} 23:59:59` } } +}, { + deep: true, immediate: true, }) const columns = ref([ { @@ -67,7 +72,7 @@ // align: 'center', // }, { - text: '创建时间', + text: '发布时间', value: 'createTime', align: 'center', }, diff --git a/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue b/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue index 8c135a9..d11bf97 100644 --- a/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue +++ b/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue @@ -23,6 +23,16 @@ type: Boolean, default: false, }, + limit: { + type: Number, + default: 5, + }, + // 不同设备状态 + // 主要用于 状态管理时 过滤不同的设备使用状态 + statusType: { + type: String, + default: '', + }, }) const emits = defineEmits(['add']) const userStore = useUserStore() @@ -126,9 +136,36 @@ ]) // 获取数据列表 const fetchData = () => { + fetchUseStatus() select.value = -1 loadingTable.value = true - getInfoListPage(listQuery.value, '全部').then((response) => { + const data = { + ...listQuery.value, + usageStatusList: [] as string[], + } + if ($props.needStatus) { + switch ($props.statusType) { + case '1': + data.usageStatusList = ['0', '1', '4'] + break + case '2': + data.usageStatusList = ['1', '3'] + break + case '3': + data.usageStatusList = ['0', '4'] + break + case '4': + data.usageStatusList = ['0', '1', '3', '4'] + break + case '5': + data.usageStatusList = ['0', '1'] + break + case 'custom': + data.usageStatusList = listQuery.value.usageStatusList + break + } + } + getInfoListPage(data, '全部').then((response) => { list.value = response.data.rows total.value = parseInt(response.data.total) loadingTable.value = false @@ -215,6 +252,7 @@ // reset() dialogFormVisible.value = true fetchData() // 获取人员列表 + console.log($props, '111') } defineExpose({ initDialog }) // 加载组织机构树形下拉 @@ -263,9 +301,9 @@ usePositionList.value = res.data }) - getDictByCode('eqptDeviceUseStatus').then((res) => { - usageStatusList.value = res.data - }) + // getDictByCode('eqptDeviceUseStatus').then((res) => { + // usageStatusList.value = res.data + // }) getUserDept().then((res) => { if (res.data.fullName === '顶级' || res.data.version === '1' || res.data.version === 1) { getAdminDept({}).then((res) => { @@ -283,6 +321,25 @@ } }) } +// 获取使用状态列表 +// const usageStatusList = ref() +const statusDict = ref<{ [key: string]: string[] }>({ + 1: ['在用', '禁用', '延用'], // 封存 + 2: ['禁用', '封存'], // 启封 + 3: ['在用', '延用'], // 禁用 + 4: ['在用', '禁用', '封存', '延用'], // 报废 + 5: ['在用', '禁用'], // 沿用 +}) +function fetchUseStatus() { + getDictByCode('eqptDeviceUseStatus').then((res) => { + if ($props.needStatus && $props.statusType !== 'custom') { + usageStatusList.value = res.data.filter((item: any) => statusDict.value[$props.statusType].includes(item.name)) + } + else { + usageStatusList.value = res.data + } + }) +} // 监听单位,修改部门 watch(() => listQuery.value.companyId, (newVal) => { listQuery.value.deptIds = '' diff --git a/src/views/tested/document/list/index.vue b/src/views/tested/document/list/index.vue index 57a799a..e1ca1c4 100644 --- a/src/views/tested/document/list/index.vue +++ b/src/views/tested/document/list/index.vue @@ -210,7 +210,7 @@ diff --git a/src/views/tested/status/delay/components/deviceList.vue b/src/views/tested/status/delay/components/deviceList.vue index 8a14181..09f6953 100644 --- a/src/views/tested/status/delay/components/deviceList.vue +++ b/src/views/tested/status/delay/components/deviceList.vue @@ -96,7 +96,7 @@