- 测量标准装置
+ {{ `测量标准装置-${textMap[pageType]}` }}
- {{ buttonType === '详情' ? '打印' : '提交' }}
+ {{ pageType === 'detail' ? '打印' : '提交' }}
关闭
@@ -125,7 +133,7 @@
-
+
diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts
index 4f0d99c..fd3d518 100644
--- a/src/api/device/standard.ts
+++ b/src/api/device/standard.ts
@@ -55,3 +55,12 @@
})
}
+// 获取申请列表
+export function getstandardEquipmentApplyList(data: object) {
+ return request({
+ url: '/standard/standardEquipmentApplyList',
+ method: 'post',
+ data,
+ })
+}
+
diff --git a/src/api/system/plan.ts b/src/api/system/plan.ts
index 8b448cd..33b384f 100644
--- a/src/api/system/plan.ts
+++ b/src/api/system/plan.ts
@@ -82,6 +82,15 @@
})
}
+// 培训记录修改
+export function getListLogupdate(data: object) {
+ return request({
+ url: `${prefix}/train/log/update`,
+ method: 'post',
+ data,
+ })
+}
+
// 培训记录详情
export function getListLogDetail(data: object) {
return request({
diff --git a/src/router/modules/device.ts b/src/router/modules/device.ts
index dfd8e27..7a93fa9 100644
--- a/src/router/modules/device.ts
+++ b/src/router/modules/device.ts
@@ -138,6 +138,18 @@
},
},
{
+ path: ':type/:id?',
+ name: 'fixedAssetsDetail',
+ component: () => import('@/views/device/standardEquipment/components/standardListAdd.vue'),
+ meta: {
+ title: '标准装置列表',
+ icon: 'ep:key',
+ sidebar: false,
+ breadcrumb: true,
+ activeMenu: '/standard/list',
+ },
+ },
+ {
path: 'expirationRemind',
name: 'expirationRemind',
component: () => import('@/views/device/standardEquipment/expirationRemind.vue'),
@@ -147,6 +159,18 @@
auth: '/standard/expirationRemind',
},
},
+ // {
+ // path: 'expirationRemind/:type/:id?',
+ // name: 'fixedAssetsDetail',
+ // component: () => import('@/views/device/standardEquipment/components/standardListAdd.vue'),
+ // meta: {
+ // title: '到期提醒',
+ // icon: 'ep:key',
+ // sidebar: false,
+ // breadcrumb: true,
+ // activeMenu: '/standard/expirationRemind',
+ // },
+ // },
{
path: 'changeApply',
name: 'changeApply',
diff --git a/src/router/modules/measure.ts b/src/router/modules/measure.ts
index 759009e..5b0e1f4 100644
--- a/src/router/modules/measure.ts
+++ b/src/router/modules/measure.ts
@@ -210,7 +210,7 @@
icon: 'ep:key',
sidebar: false,
breadcrumb: true,
- activeMenu: '/measure/train/plan',
+ activeMenu: '/train/plan',
},
},
{
@@ -224,6 +224,18 @@
},
},
{
+ path: 'trainPlanApprove/:type/:id?',
+ name: 'listPageAdd',
+ component: () => import('@/views/measure/train/components/listPageAdd.vue'),
+ meta: {
+ title: '培训计划审批',
+ icon: 'ep:key',
+ sidebar: false,
+ breadcrumb: true,
+ auth: '/train/trainPlanApprove',
+ },
+ },
+ {
path: 'trainLog',
name: 'TrainLog',
component: () => import('@/views/measure/train/trainLog.vue'),
@@ -242,7 +254,7 @@
icon: 'ep:key',
sidebar: false,
breadcrumb: true,
- activeMenu: '/measure/train/trainLog',
+ activeMenu: '/train/trainLog',
},
},
],
@@ -324,6 +336,18 @@
},
},
{
+ path: ':type/:id?',
+ name: 'ListSourceAdd',
+ component: () => import('@/views/measure/source/listAdd.vue'),
+ meta: {
+ title: '溯源供方列表',
+ icon: 'ep:key',
+ sidebar: false,
+ breadcrumb: true,
+ activeMenu: '/source/list',
+ },
+ },
+ {
path: 'approve',
name: 'SourceApprove',
component: () => import('@/views/measure/source/approve.vue'),
@@ -333,6 +357,18 @@
auth: '/measure/measureSource/approve',
},
},
+ {
+ path: 'approve/:type/:id?',
+ name: 'ListpageSourceAdd',
+ component: () => import('@/views/measure/source/components/listPageAdd.vue'),
+ meta: {
+ title: '溯源供方审批',
+ icon: 'ep:key',
+ sidebar: false,
+ breadcrumb: true,
+ activeMenu: '/source/approve',
+ },
+ },
],
},
{
diff --git a/src/views/device/deviceMaintenance/components/applyList.vue b/src/views/device/deviceMaintenance/components/applyList.vue
new file mode 100644
index 0000000..45be74a
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/applyList.vue
@@ -0,0 +1,65 @@
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/all.vue b/src/views/device/deviceMaintenance/components/listApply/all.vue
new file mode 100644
index 0000000..d124307
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/all.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue b/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue
new file mode 100644
index 0000000..8a7a8bc
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue
@@ -0,0 +1,16 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/canceled.vue b/src/views/device/deviceMaintenance/components/listApply/canceled.vue
new file mode 100644
index 0000000..3b9657c
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/canceled.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/draftBox.vue b/src/views/device/deviceMaintenance/components/listApply/draftBox.vue
new file mode 100644
index 0000000..43d7b75
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/draftBox.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue b/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue
new file mode 100644
index 0000000..c13f95a
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/listPage.vue b/src/views/device/deviceMaintenance/components/listApply/listPage.vue
new file mode 100644
index 0000000..df90882
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/listPage.vue
@@ -0,0 +1,493 @@
+
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue b/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue
new file mode 100644
index 0000000..eb506ec
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue
@@ -0,0 +1,1021 @@
+
+
+
+
+
+
+ 基本信息
+
+
+
+ {{ item }}
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 上传
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 完成
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/notPass.vue b/src/views/device/deviceMaintenance/components/listApply/notPass.vue
new file mode 100644
index 0000000..5a4b817
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/notPass.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/passed.vue b/src/views/device/deviceMaintenance/components/listApply/passed.vue
new file mode 100644
index 0000000..31cd21c
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/passed.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/maintenanceCheckList.vue b/src/views/device/deviceMaintenance/maintenanceCheckList.vue
index 84224db..c6edd5e 100644
--- a/src/views/device/deviceMaintenance/maintenanceCheckList.vue
+++ b/src/views/device/deviceMaintenance/maintenanceCheckList.vue
@@ -1,11 +1,10 @@
-
- 设备检修保养验收单
-
+
diff --git a/src/views/device/standardEquipment/components/listApply/notPass.vue b/src/views/device/standardEquipment/components/listApply/notPass.vue
index 5a4b817..bf1d8ac 100644
--- a/src/views/device/standardEquipment/components/listApply/notPass.vue
+++ b/src/views/device/standardEquipment/components/listApply/notPass.vue
@@ -6,5 +6,5 @@
-
+
diff --git a/src/views/device/standardEquipment/components/listApply/passed.vue b/src/views/device/standardEquipment/components/listApply/passed.vue
index 31cd21c..1e31fc6 100644
--- a/src/views/device/standardEquipment/components/listApply/passed.vue
+++ b/src/views/device/standardEquipment/components/listApply/passed.vue
@@ -6,5 +6,5 @@
-
+
diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
index c47ad1d..aa13225 100644
--- a/src/views/device/standardEquipment/components/standardList/baseInfo.vue
+++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
@@ -214,7 +214,7 @@
formInline.value.laboratoryOwnerContact = null
formInline.value.laboratoryOwner = null
}
-// 获取详情信息
+// 获取detail信息
const getInfo = () => {
getStandardListDetail({ id: props.infoId }).then((res) => {
Object.keys(res.data).map((item) => {
@@ -225,7 +225,7 @@
formInline.value = res.data
})
}
-if (props.buttonType !== '') {
+if (props.buttonType !== 'add') {
getInfo()
}
watch(() => formInline.value, (newVal) => {
@@ -266,7 +266,7 @@
@@ -275,7 +275,7 @@
@@ -284,7 +284,7 @@
@@ -295,7 +295,7 @@
@@ -307,7 +307,7 @@
@@ -318,7 +318,7 @@
clearable
placeholder="标准负责人"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -347,7 +347,7 @@
clearable
placeholder="类别"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -413,18 +413,18 @@
placeholder="请选择筹建日期"
format="YYYY/MM/DD HH:mm:ss"
value-format="YYYY-MM-DD h:m:s"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
-
+
-
+
@@ -451,7 +451,7 @@
@@ -464,7 +464,7 @@
clearable
placeholder="管理状态"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -510,7 +510,7 @@
placeholder="请选择考核日期"
format="YYYY/MM/DD HH:mm:ss"
value-format="YYYY-MM-DD h:m:s"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -522,7 +522,7 @@
v-model.trim="formInline.uncertainty"
style="width: 500px;"
placeholder="不确定度"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -534,7 +534,7 @@
v-model.trim="formInline.mesureRange"
placeholder="测量范围"
style="width: 500px;"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -548,7 +548,7 @@
@@ -557,7 +557,7 @@
@@ -621,7 +621,7 @@
:on-change="handleFileChange"
:limit="1"
>
-
+
上传
@@ -635,7 +635,7 @@
v-model.trim="formInline.remark"
style="width: 500px;"
placeholder="备注"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue
index 348bb41..eb7ced3 100644
--- a/src/views/device/standardEquipment/components/standardListAdd.vue
+++ b/src/views/device/standardEquipment/components/standardListAdd.vue
@@ -9,17 +9,23 @@
import { getTypeSelect } from '@/api/system/price'
import { getStandardLisUpdate, getStandardListAdd, getStandardListDetail, getUsersDept } from '@/api/device/standard'
import { UploadFile } from '@/api/measure/file'
-const props = defineProps({
- infoId: {
- type: String,
- default: '0',
- },
- buttonType: {
- type: String,
- default: '',
- },
-})
-const emit = defineEmits(['close'])
+const loading = ref(false) // 表单加载状态
+const infoId = ref('') // id
+const pageType = ref('add') // 页面类型: add,edit, detail
+const buttonLoading = ref(false) // 按钮加载状态
+const textMap: { [key: string]: string } = {
+ edit: '编辑',
+ add: '新建',
+ detail: '详情',
+}// 字典
+// 从路由中获取页面类型参数
+const $route = useRoute()
+if ($route.params && $route.params.type) {
+ pageType.value = $route.params.type as string
+ if ($route.params.id) {
+ infoId.value = $route.params.id as string
+ }
+}
// 定义数据
const formInline = ref({})
// 关闭
@@ -42,17 +48,19 @@
watch(current, (newValue) => {
currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp
})
-// 关闭
+// 初始化router
+const $router = useRouter()
+// 关闭新增页面的回调
const close = () => {
- emit('close')
+ $router.back()
}
const setData = (newValue: object) => {
formInline.value = newValue
}
// 编辑获取详情的提交按钮
const submitFormDetail = () => {
- if (props.buttonType === '编辑') {
- formInline.value.id = props.infoId
+ if (pageType.value === 'edit') {
+ formInline.value.id = infoId.value
getStandardLisUpdate(formInline.value).then((res) => {
if (res.code === 200) {
close()
@@ -73,7 +81,7 @@
}
// 提交
const submitForm = () => {
- if (props.buttonType === '详情') { return submitFormDetail() }
+ if (pageType.value === 'detail') { return submitFormDetail() }
ElMessageBox.confirm(
'确认提交吗?',
'提示',
@@ -85,7 +93,7 @@
).then(() => {
current.value = '基本信息'
currentCompRef.value.submitForm().validate().then(() => {
- props.buttonType === ''
+ pageType.value === ''
? getStandardListAdd(formInline.value).then((res) => {
if (res.code === 200) {
close()
@@ -101,15 +109,15 @@
- 测量标准装置
+ {{ `测量标准装置-${textMap[pageType]}` }}
- {{ buttonType === '详情' ? '打印' : '提交' }}
+ {{ pageType === 'detail' ? '打印' : '提交' }}
关闭
@@ -125,7 +133,7 @@
-
+
diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue
index 1826c22..94520ba 100644
--- a/src/views/device/standardEquipment/expirationRemind.vue
+++ b/src/views/device/standardEquipment/expirationRemind.vue
@@ -116,6 +116,8 @@
getSelectList('standardCategory') // 获取类别下拉框
getSelectList('standardManagerState') // 获取管理状态下拉框
+// 初始化路由
+const $router = useRouter()
// 获取部门信息
getUsersDept({
createTime: '',
@@ -238,12 +240,12 @@
})
})
}
-// 点击编辑或详情
-const handleClick = (index: number, row: rowReturn, text: string) => {
- infoId.value = row.id
- buttonType.value = text
- isShow.value = false
+// 点击编辑/详情
+const handleEdit = (row: rowReturn) => {
+ $router.push(`/standard/detail/${row.id}`)
}
+// 提醒函数
+const warnClick = (row: object) => {}
@@ -348,7 +350,7 @@
size="small"
type="primary"
link
- @click="handleClick(row.$index, row, '详情')"
+ @click="handleEdit(row)"
>
详情
@@ -356,7 +358,7 @@
size="small"
link
type="primary"
- @click="handleClick(row.$index, row, '提醒')"
+ @click="warnClick(row)"
>
提醒
@@ -374,10 +376,6 @@
-
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/all.vue b/src/views/device/deviceMaintenance/components/listApply/all.vue
new file mode 100644
index 0000000..d124307
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/all.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue b/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue
new file mode 100644
index 0000000..8a7a8bc
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue
@@ -0,0 +1,16 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/canceled.vue b/src/views/device/deviceMaintenance/components/listApply/canceled.vue
new file mode 100644
index 0000000..3b9657c
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/canceled.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/draftBox.vue b/src/views/device/deviceMaintenance/components/listApply/draftBox.vue
new file mode 100644
index 0000000..43d7b75
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/draftBox.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue b/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue
new file mode 100644
index 0000000..c13f95a
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/listPage.vue b/src/views/device/deviceMaintenance/components/listApply/listPage.vue
new file mode 100644
index 0000000..df90882
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/listPage.vue
@@ -0,0 +1,493 @@
+
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue b/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue
new file mode 100644
index 0000000..eb506ec
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue
@@ -0,0 +1,1021 @@
+
+
+
+
+
+
+ 基本信息
+
+
+
+ {{ item }}
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 上传
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 完成
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/notPass.vue b/src/views/device/deviceMaintenance/components/listApply/notPass.vue
new file mode 100644
index 0000000..5a4b817
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/notPass.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/passed.vue b/src/views/device/deviceMaintenance/components/listApply/passed.vue
new file mode 100644
index 0000000..31cd21c
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/passed.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/maintenanceCheckList.vue b/src/views/device/deviceMaintenance/maintenanceCheckList.vue
index 84224db..c6edd5e 100644
--- a/src/views/device/deviceMaintenance/maintenanceCheckList.vue
+++ b/src/views/device/deviceMaintenance/maintenanceCheckList.vue
@@ -1,11 +1,10 @@
-
- 设备检修保养验收单
-
+
diff --git a/src/views/device/standardEquipment/components/listApply/notPass.vue b/src/views/device/standardEquipment/components/listApply/notPass.vue
index 5a4b817..bf1d8ac 100644
--- a/src/views/device/standardEquipment/components/listApply/notPass.vue
+++ b/src/views/device/standardEquipment/components/listApply/notPass.vue
@@ -6,5 +6,5 @@
-
+
diff --git a/src/views/device/standardEquipment/components/listApply/passed.vue b/src/views/device/standardEquipment/components/listApply/passed.vue
index 31cd21c..1e31fc6 100644
--- a/src/views/device/standardEquipment/components/listApply/passed.vue
+++ b/src/views/device/standardEquipment/components/listApply/passed.vue
@@ -6,5 +6,5 @@
-
+
diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
index c47ad1d..aa13225 100644
--- a/src/views/device/standardEquipment/components/standardList/baseInfo.vue
+++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
@@ -214,7 +214,7 @@
formInline.value.laboratoryOwnerContact = null
formInline.value.laboratoryOwner = null
}
-// 获取详情信息
+// 获取detail信息
const getInfo = () => {
getStandardListDetail({ id: props.infoId }).then((res) => {
Object.keys(res.data).map((item) => {
@@ -225,7 +225,7 @@
formInline.value = res.data
})
}
-if (props.buttonType !== '') {
+if (props.buttonType !== 'add') {
getInfo()
}
watch(() => formInline.value, (newVal) => {
@@ -266,7 +266,7 @@
@@ -275,7 +275,7 @@
@@ -284,7 +284,7 @@
@@ -295,7 +295,7 @@
@@ -307,7 +307,7 @@
@@ -318,7 +318,7 @@
clearable
placeholder="标准负责人"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -347,7 +347,7 @@
clearable
placeholder="类别"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -413,18 +413,18 @@
placeholder="请选择筹建日期"
format="YYYY/MM/DD HH:mm:ss"
value-format="YYYY-MM-DD h:m:s"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
-
+
-
+
@@ -451,7 +451,7 @@
@@ -464,7 +464,7 @@
clearable
placeholder="管理状态"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -510,7 +510,7 @@
placeholder="请选择考核日期"
format="YYYY/MM/DD HH:mm:ss"
value-format="YYYY-MM-DD h:m:s"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -522,7 +522,7 @@
v-model.trim="formInline.uncertainty"
style="width: 500px;"
placeholder="不确定度"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -534,7 +534,7 @@
v-model.trim="formInline.mesureRange"
placeholder="测量范围"
style="width: 500px;"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -548,7 +548,7 @@
@@ -557,7 +557,7 @@
@@ -621,7 +621,7 @@
:on-change="handleFileChange"
:limit="1"
>
-
+
上传
@@ -635,7 +635,7 @@
v-model.trim="formInline.remark"
style="width: 500px;"
placeholder="备注"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue
index 348bb41..eb7ced3 100644
--- a/src/views/device/standardEquipment/components/standardListAdd.vue
+++ b/src/views/device/standardEquipment/components/standardListAdd.vue
@@ -9,17 +9,23 @@
import { getTypeSelect } from '@/api/system/price'
import { getStandardLisUpdate, getStandardListAdd, getStandardListDetail, getUsersDept } from '@/api/device/standard'
import { UploadFile } from '@/api/measure/file'
-const props = defineProps({
- infoId: {
- type: String,
- default: '0',
- },
- buttonType: {
- type: String,
- default: '',
- },
-})
-const emit = defineEmits(['close'])
+const loading = ref(false) // 表单加载状态
+const infoId = ref('') // id
+const pageType = ref('add') // 页面类型: add,edit, detail
+const buttonLoading = ref(false) // 按钮加载状态
+const textMap: { [key: string]: string } = {
+ edit: '编辑',
+ add: '新建',
+ detail: '详情',
+}// 字典
+// 从路由中获取页面类型参数
+const $route = useRoute()
+if ($route.params && $route.params.type) {
+ pageType.value = $route.params.type as string
+ if ($route.params.id) {
+ infoId.value = $route.params.id as string
+ }
+}
// 定义数据
const formInline = ref({})
// 关闭
@@ -42,17 +48,19 @@
watch(current, (newValue) => {
currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp
})
-// 关闭
+// 初始化router
+const $router = useRouter()
+// 关闭新增页面的回调
const close = () => {
- emit('close')
+ $router.back()
}
const setData = (newValue: object) => {
formInline.value = newValue
}
// 编辑获取详情的提交按钮
const submitFormDetail = () => {
- if (props.buttonType === '编辑') {
- formInline.value.id = props.infoId
+ if (pageType.value === 'edit') {
+ formInline.value.id = infoId.value
getStandardLisUpdate(formInline.value).then((res) => {
if (res.code === 200) {
close()
@@ -73,7 +81,7 @@
}
// 提交
const submitForm = () => {
- if (props.buttonType === '详情') { return submitFormDetail() }
+ if (pageType.value === 'detail') { return submitFormDetail() }
ElMessageBox.confirm(
'确认提交吗?',
'提示',
@@ -85,7 +93,7 @@
).then(() => {
current.value = '基本信息'
currentCompRef.value.submitForm().validate().then(() => {
- props.buttonType === ''
+ pageType.value === ''
? getStandardListAdd(formInline.value).then((res) => {
if (res.code === 200) {
close()
@@ -101,15 +109,15 @@
- 测量标准装置
+ {{ `测量标准装置-${textMap[pageType]}` }}
- {{ buttonType === '详情' ? '打印' : '提交' }}
+ {{ pageType === 'detail' ? '打印' : '提交' }}
关闭
@@ -125,7 +133,7 @@
-
+
diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue
index 1826c22..94520ba 100644
--- a/src/views/device/standardEquipment/expirationRemind.vue
+++ b/src/views/device/standardEquipment/expirationRemind.vue
@@ -116,6 +116,8 @@
getSelectList('standardCategory') // 获取类别下拉框
getSelectList('standardManagerState') // 获取管理状态下拉框
+// 初始化路由
+const $router = useRouter()
// 获取部门信息
getUsersDept({
createTime: '',
@@ -238,12 +240,12 @@
})
})
}
-// 点击编辑或详情
-const handleClick = (index: number, row: rowReturn, text: string) => {
- infoId.value = row.id
- buttonType.value = text
- isShow.value = false
+// 点击编辑/详情
+const handleEdit = (row: rowReturn) => {
+ $router.push(`/standard/detail/${row.id}`)
}
+// 提醒函数
+const warnClick = (row: object) => {}
@@ -348,7 +350,7 @@
size="small"
type="primary"
link
- @click="handleClick(row.$index, row, '详情')"
+ @click="handleEdit(row)"
>
详情
@@ -356,7 +358,7 @@
size="small"
link
type="primary"
- @click="handleClick(row.$index, row, '提醒')"
+ @click="warnClick(row)"
>
提醒
@@ -374,10 +376,6 @@
-
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/all.vue b/src/views/device/deviceMaintenance/components/listApply/all.vue
new file mode 100644
index 0000000..d124307
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/all.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue b/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue
new file mode 100644
index 0000000..8a7a8bc
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue
@@ -0,0 +1,16 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/canceled.vue b/src/views/device/deviceMaintenance/components/listApply/canceled.vue
new file mode 100644
index 0000000..3b9657c
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/canceled.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/draftBox.vue b/src/views/device/deviceMaintenance/components/listApply/draftBox.vue
new file mode 100644
index 0000000..43d7b75
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/draftBox.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue b/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue
new file mode 100644
index 0000000..c13f95a
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/listPage.vue b/src/views/device/deviceMaintenance/components/listApply/listPage.vue
new file mode 100644
index 0000000..df90882
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/listPage.vue
@@ -0,0 +1,493 @@
+
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue b/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue
new file mode 100644
index 0000000..eb506ec
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue
@@ -0,0 +1,1021 @@
+
+
+
+
+
+
+ 基本信息
+
+
+
+ {{ item }}
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 上传
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 完成
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/notPass.vue b/src/views/device/deviceMaintenance/components/listApply/notPass.vue
new file mode 100644
index 0000000..5a4b817
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/notPass.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/passed.vue b/src/views/device/deviceMaintenance/components/listApply/passed.vue
new file mode 100644
index 0000000..31cd21c
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/passed.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/maintenanceCheckList.vue b/src/views/device/deviceMaintenance/maintenanceCheckList.vue
index 84224db..c6edd5e 100644
--- a/src/views/device/deviceMaintenance/maintenanceCheckList.vue
+++ b/src/views/device/deviceMaintenance/maintenanceCheckList.vue
@@ -1,11 +1,10 @@
-
- 设备检修保养验收单
-
+
diff --git a/src/views/device/standardEquipment/components/listApply/notPass.vue b/src/views/device/standardEquipment/components/listApply/notPass.vue
index 5a4b817..bf1d8ac 100644
--- a/src/views/device/standardEquipment/components/listApply/notPass.vue
+++ b/src/views/device/standardEquipment/components/listApply/notPass.vue
@@ -6,5 +6,5 @@
-
+
diff --git a/src/views/device/standardEquipment/components/listApply/passed.vue b/src/views/device/standardEquipment/components/listApply/passed.vue
index 31cd21c..1e31fc6 100644
--- a/src/views/device/standardEquipment/components/listApply/passed.vue
+++ b/src/views/device/standardEquipment/components/listApply/passed.vue
@@ -6,5 +6,5 @@
-
+
diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
index c47ad1d..aa13225 100644
--- a/src/views/device/standardEquipment/components/standardList/baseInfo.vue
+++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
@@ -214,7 +214,7 @@
formInline.value.laboratoryOwnerContact = null
formInline.value.laboratoryOwner = null
}
-// 获取详情信息
+// 获取detail信息
const getInfo = () => {
getStandardListDetail({ id: props.infoId }).then((res) => {
Object.keys(res.data).map((item) => {
@@ -225,7 +225,7 @@
formInline.value = res.data
})
}
-if (props.buttonType !== '') {
+if (props.buttonType !== 'add') {
getInfo()
}
watch(() => formInline.value, (newVal) => {
@@ -266,7 +266,7 @@
@@ -275,7 +275,7 @@
@@ -284,7 +284,7 @@
@@ -295,7 +295,7 @@
@@ -307,7 +307,7 @@
@@ -318,7 +318,7 @@
clearable
placeholder="标准负责人"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -347,7 +347,7 @@
clearable
placeholder="类别"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -413,18 +413,18 @@
placeholder="请选择筹建日期"
format="YYYY/MM/DD HH:mm:ss"
value-format="YYYY-MM-DD h:m:s"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
-
+
-
+
@@ -451,7 +451,7 @@
@@ -464,7 +464,7 @@
clearable
placeholder="管理状态"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -510,7 +510,7 @@
placeholder="请选择考核日期"
format="YYYY/MM/DD HH:mm:ss"
value-format="YYYY-MM-DD h:m:s"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -522,7 +522,7 @@
v-model.trim="formInline.uncertainty"
style="width: 500px;"
placeholder="不确定度"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -534,7 +534,7 @@
v-model.trim="formInline.mesureRange"
placeholder="测量范围"
style="width: 500px;"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -548,7 +548,7 @@
@@ -557,7 +557,7 @@
@@ -621,7 +621,7 @@
:on-change="handleFileChange"
:limit="1"
>
-
+
上传
@@ -635,7 +635,7 @@
v-model.trim="formInline.remark"
style="width: 500px;"
placeholder="备注"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue
index 348bb41..eb7ced3 100644
--- a/src/views/device/standardEquipment/components/standardListAdd.vue
+++ b/src/views/device/standardEquipment/components/standardListAdd.vue
@@ -9,17 +9,23 @@
import { getTypeSelect } from '@/api/system/price'
import { getStandardLisUpdate, getStandardListAdd, getStandardListDetail, getUsersDept } from '@/api/device/standard'
import { UploadFile } from '@/api/measure/file'
-const props = defineProps({
- infoId: {
- type: String,
- default: '0',
- },
- buttonType: {
- type: String,
- default: '',
- },
-})
-const emit = defineEmits(['close'])
+const loading = ref(false) // 表单加载状态
+const infoId = ref('') // id
+const pageType = ref('add') // 页面类型: add,edit, detail
+const buttonLoading = ref(false) // 按钮加载状态
+const textMap: { [key: string]: string } = {
+ edit: '编辑',
+ add: '新建',
+ detail: '详情',
+}// 字典
+// 从路由中获取页面类型参数
+const $route = useRoute()
+if ($route.params && $route.params.type) {
+ pageType.value = $route.params.type as string
+ if ($route.params.id) {
+ infoId.value = $route.params.id as string
+ }
+}
// 定义数据
const formInline = ref({})
// 关闭
@@ -42,17 +48,19 @@
watch(current, (newValue) => {
currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp
})
-// 关闭
+// 初始化router
+const $router = useRouter()
+// 关闭新增页面的回调
const close = () => {
- emit('close')
+ $router.back()
}
const setData = (newValue: object) => {
formInline.value = newValue
}
// 编辑获取详情的提交按钮
const submitFormDetail = () => {
- if (props.buttonType === '编辑') {
- formInline.value.id = props.infoId
+ if (pageType.value === 'edit') {
+ formInline.value.id = infoId.value
getStandardLisUpdate(formInline.value).then((res) => {
if (res.code === 200) {
close()
@@ -73,7 +81,7 @@
}
// 提交
const submitForm = () => {
- if (props.buttonType === '详情') { return submitFormDetail() }
+ if (pageType.value === 'detail') { return submitFormDetail() }
ElMessageBox.confirm(
'确认提交吗?',
'提示',
@@ -85,7 +93,7 @@
).then(() => {
current.value = '基本信息'
currentCompRef.value.submitForm().validate().then(() => {
- props.buttonType === ''
+ pageType.value === ''
? getStandardListAdd(formInline.value).then((res) => {
if (res.code === 200) {
close()
@@ -101,15 +109,15 @@
- 测量标准装置
+ {{ `测量标准装置-${textMap[pageType]}` }}
- {{ buttonType === '详情' ? '打印' : '提交' }}
+ {{ pageType === 'detail' ? '打印' : '提交' }}
关闭
@@ -125,7 +133,7 @@
-
+
diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue
index 1826c22..94520ba 100644
--- a/src/views/device/standardEquipment/expirationRemind.vue
+++ b/src/views/device/standardEquipment/expirationRemind.vue
@@ -116,6 +116,8 @@
getSelectList('standardCategory') // 获取类别下拉框
getSelectList('standardManagerState') // 获取管理状态下拉框
+// 初始化路由
+const $router = useRouter()
// 获取部门信息
getUsersDept({
createTime: '',
@@ -238,12 +240,12 @@
})
})
}
-// 点击编辑或详情
-const handleClick = (index: number, row: rowReturn, text: string) => {
- infoId.value = row.id
- buttonType.value = text
- isShow.value = false
+// 点击编辑/详情
+const handleEdit = (row: rowReturn) => {
+ $router.push(`/standard/detail/${row.id}`)
}
+// 提醒函数
+const warnClick = (row: object) => {}
@@ -348,7 +350,7 @@
size="small"
type="primary"
link
- @click="handleClick(row.$index, row, '详情')"
+ @click="handleEdit(row)"
>
详情
@@ -356,7 +358,7 @@
size="small"
link
type="primary"
- @click="handleClick(row.$index, row, '提醒')"
+ @click="warnClick(row)"
>
提醒
@@ -374,10 +376,6 @@
-
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/all.vue b/src/views/device/deviceMaintenance/components/listApply/all.vue
new file mode 100644
index 0000000..d124307
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/all.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue b/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue
new file mode 100644
index 0000000..8a7a8bc
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue
@@ -0,0 +1,16 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/canceled.vue b/src/views/device/deviceMaintenance/components/listApply/canceled.vue
new file mode 100644
index 0000000..3b9657c
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/canceled.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/draftBox.vue b/src/views/device/deviceMaintenance/components/listApply/draftBox.vue
new file mode 100644
index 0000000..43d7b75
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/draftBox.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue b/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue
new file mode 100644
index 0000000..c13f95a
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/listPage.vue b/src/views/device/deviceMaintenance/components/listApply/listPage.vue
new file mode 100644
index 0000000..df90882
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/listPage.vue
@@ -0,0 +1,493 @@
+
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue b/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue
new file mode 100644
index 0000000..eb506ec
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue
@@ -0,0 +1,1021 @@
+
+
+
+
+
+
+ 基本信息
+
+
+
+ {{ item }}
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 上传
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 完成
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/notPass.vue b/src/views/device/deviceMaintenance/components/listApply/notPass.vue
new file mode 100644
index 0000000..5a4b817
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/notPass.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/passed.vue b/src/views/device/deviceMaintenance/components/listApply/passed.vue
new file mode 100644
index 0000000..31cd21c
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/passed.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/maintenanceCheckList.vue b/src/views/device/deviceMaintenance/maintenanceCheckList.vue
index 84224db..c6edd5e 100644
--- a/src/views/device/deviceMaintenance/maintenanceCheckList.vue
+++ b/src/views/device/deviceMaintenance/maintenanceCheckList.vue
@@ -1,11 +1,10 @@
-
- 设备检修保养验收单
-
+
diff --git a/src/views/device/standardEquipment/components/listApply/notPass.vue b/src/views/device/standardEquipment/components/listApply/notPass.vue
index 5a4b817..bf1d8ac 100644
--- a/src/views/device/standardEquipment/components/listApply/notPass.vue
+++ b/src/views/device/standardEquipment/components/listApply/notPass.vue
@@ -6,5 +6,5 @@
-
+
diff --git a/src/views/device/standardEquipment/components/listApply/passed.vue b/src/views/device/standardEquipment/components/listApply/passed.vue
index 31cd21c..1e31fc6 100644
--- a/src/views/device/standardEquipment/components/listApply/passed.vue
+++ b/src/views/device/standardEquipment/components/listApply/passed.vue
@@ -6,5 +6,5 @@
-
+
diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
index c47ad1d..aa13225 100644
--- a/src/views/device/standardEquipment/components/standardList/baseInfo.vue
+++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
@@ -214,7 +214,7 @@
formInline.value.laboratoryOwnerContact = null
formInline.value.laboratoryOwner = null
}
-// 获取详情信息
+// 获取detail信息
const getInfo = () => {
getStandardListDetail({ id: props.infoId }).then((res) => {
Object.keys(res.data).map((item) => {
@@ -225,7 +225,7 @@
formInline.value = res.data
})
}
-if (props.buttonType !== '') {
+if (props.buttonType !== 'add') {
getInfo()
}
watch(() => formInline.value, (newVal) => {
@@ -266,7 +266,7 @@
@@ -275,7 +275,7 @@
@@ -284,7 +284,7 @@
@@ -295,7 +295,7 @@
@@ -307,7 +307,7 @@
@@ -318,7 +318,7 @@
clearable
placeholder="标准负责人"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -347,7 +347,7 @@
clearable
placeholder="类别"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -413,18 +413,18 @@
placeholder="请选择筹建日期"
format="YYYY/MM/DD HH:mm:ss"
value-format="YYYY-MM-DD h:m:s"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
-
+
-
+
@@ -451,7 +451,7 @@
@@ -464,7 +464,7 @@
clearable
placeholder="管理状态"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -510,7 +510,7 @@
placeholder="请选择考核日期"
format="YYYY/MM/DD HH:mm:ss"
value-format="YYYY-MM-DD h:m:s"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -522,7 +522,7 @@
v-model.trim="formInline.uncertainty"
style="width: 500px;"
placeholder="不确定度"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -534,7 +534,7 @@
v-model.trim="formInline.mesureRange"
placeholder="测量范围"
style="width: 500px;"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -548,7 +548,7 @@
@@ -557,7 +557,7 @@
@@ -621,7 +621,7 @@
:on-change="handleFileChange"
:limit="1"
>
-
+
上传
@@ -635,7 +635,7 @@
v-model.trim="formInline.remark"
style="width: 500px;"
placeholder="备注"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue
index 348bb41..eb7ced3 100644
--- a/src/views/device/standardEquipment/components/standardListAdd.vue
+++ b/src/views/device/standardEquipment/components/standardListAdd.vue
@@ -9,17 +9,23 @@
import { getTypeSelect } from '@/api/system/price'
import { getStandardLisUpdate, getStandardListAdd, getStandardListDetail, getUsersDept } from '@/api/device/standard'
import { UploadFile } from '@/api/measure/file'
-const props = defineProps({
- infoId: {
- type: String,
- default: '0',
- },
- buttonType: {
- type: String,
- default: '',
- },
-})
-const emit = defineEmits(['close'])
+const loading = ref(false) // 表单加载状态
+const infoId = ref('') // id
+const pageType = ref('add') // 页面类型: add,edit, detail
+const buttonLoading = ref(false) // 按钮加载状态
+const textMap: { [key: string]: string } = {
+ edit: '编辑',
+ add: '新建',
+ detail: '详情',
+}// 字典
+// 从路由中获取页面类型参数
+const $route = useRoute()
+if ($route.params && $route.params.type) {
+ pageType.value = $route.params.type as string
+ if ($route.params.id) {
+ infoId.value = $route.params.id as string
+ }
+}
// 定义数据
const formInline = ref({})
// 关闭
@@ -42,17 +48,19 @@
watch(current, (newValue) => {
currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp
})
-// 关闭
+// 初始化router
+const $router = useRouter()
+// 关闭新增页面的回调
const close = () => {
- emit('close')
+ $router.back()
}
const setData = (newValue: object) => {
formInline.value = newValue
}
// 编辑获取详情的提交按钮
const submitFormDetail = () => {
- if (props.buttonType === '编辑') {
- formInline.value.id = props.infoId
+ if (pageType.value === 'edit') {
+ formInline.value.id = infoId.value
getStandardLisUpdate(formInline.value).then((res) => {
if (res.code === 200) {
close()
@@ -73,7 +81,7 @@
}
// 提交
const submitForm = () => {
- if (props.buttonType === '详情') { return submitFormDetail() }
+ if (pageType.value === 'detail') { return submitFormDetail() }
ElMessageBox.confirm(
'确认提交吗?',
'提示',
@@ -85,7 +93,7 @@
).then(() => {
current.value = '基本信息'
currentCompRef.value.submitForm().validate().then(() => {
- props.buttonType === ''
+ pageType.value === ''
? getStandardListAdd(formInline.value).then((res) => {
if (res.code === 200) {
close()
@@ -101,15 +109,15 @@
- 测量标准装置
+ {{ `测量标准装置-${textMap[pageType]}` }}
- {{ buttonType === '详情' ? '打印' : '提交' }}
+ {{ pageType === 'detail' ? '打印' : '提交' }}
关闭
@@ -125,7 +133,7 @@
-
+
diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue
index 1826c22..94520ba 100644
--- a/src/views/device/standardEquipment/expirationRemind.vue
+++ b/src/views/device/standardEquipment/expirationRemind.vue
@@ -116,6 +116,8 @@
getSelectList('standardCategory') // 获取类别下拉框
getSelectList('standardManagerState') // 获取管理状态下拉框
+// 初始化路由
+const $router = useRouter()
// 获取部门信息
getUsersDept({
createTime: '',
@@ -238,12 +240,12 @@
})
})
}
-// 点击编辑或详情
-const handleClick = (index: number, row: rowReturn, text: string) => {
- infoId.value = row.id
- buttonType.value = text
- isShow.value = false
+// 点击编辑/详情
+const handleEdit = (row: rowReturn) => {
+ $router.push(`/standard/detail/${row.id}`)
}
+// 提醒函数
+const warnClick = (row: object) => {}
@@ -348,7 +350,7 @@
size="small"
type="primary"
link
- @click="handleClick(row.$index, row, '详情')"
+ @click="handleEdit(row)"
>
详情
@@ -356,7 +358,7 @@
size="small"
link
type="primary"
- @click="handleClick(row.$index, row, '提醒')"
+ @click="warnClick(row)"
>
提醒
@@ -374,10 +376,6 @@
-
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/all.vue b/src/views/device/deviceMaintenance/components/listApply/all.vue
new file mode 100644
index 0000000..d124307
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/all.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue b/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue
new file mode 100644
index 0000000..8a7a8bc
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue
@@ -0,0 +1,16 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/canceled.vue b/src/views/device/deviceMaintenance/components/listApply/canceled.vue
new file mode 100644
index 0000000..3b9657c
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/canceled.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/draftBox.vue b/src/views/device/deviceMaintenance/components/listApply/draftBox.vue
new file mode 100644
index 0000000..43d7b75
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/draftBox.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue b/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue
new file mode 100644
index 0000000..c13f95a
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/listPage.vue b/src/views/device/deviceMaintenance/components/listApply/listPage.vue
new file mode 100644
index 0000000..df90882
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/listPage.vue
@@ -0,0 +1,493 @@
+
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue b/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue
new file mode 100644
index 0000000..eb506ec
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue
@@ -0,0 +1,1021 @@
+
+
+
+
+
+
+ 基本信息
+
+
+
+ {{ item }}
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 上传
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 完成
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/notPass.vue b/src/views/device/deviceMaintenance/components/listApply/notPass.vue
new file mode 100644
index 0000000..5a4b817
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/notPass.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/passed.vue b/src/views/device/deviceMaintenance/components/listApply/passed.vue
new file mode 100644
index 0000000..31cd21c
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/passed.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/maintenanceCheckList.vue b/src/views/device/deviceMaintenance/maintenanceCheckList.vue
index 84224db..c6edd5e 100644
--- a/src/views/device/deviceMaintenance/maintenanceCheckList.vue
+++ b/src/views/device/deviceMaintenance/maintenanceCheckList.vue
@@ -1,11 +1,10 @@
-
- 设备检修保养验收单
-
+
diff --git a/src/views/device/standardEquipment/components/listApply/notPass.vue b/src/views/device/standardEquipment/components/listApply/notPass.vue
index 5a4b817..bf1d8ac 100644
--- a/src/views/device/standardEquipment/components/listApply/notPass.vue
+++ b/src/views/device/standardEquipment/components/listApply/notPass.vue
@@ -6,5 +6,5 @@
-
+
diff --git a/src/views/device/standardEquipment/components/listApply/passed.vue b/src/views/device/standardEquipment/components/listApply/passed.vue
index 31cd21c..1e31fc6 100644
--- a/src/views/device/standardEquipment/components/listApply/passed.vue
+++ b/src/views/device/standardEquipment/components/listApply/passed.vue
@@ -6,5 +6,5 @@
-
+
diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
index c47ad1d..aa13225 100644
--- a/src/views/device/standardEquipment/components/standardList/baseInfo.vue
+++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
@@ -214,7 +214,7 @@
formInline.value.laboratoryOwnerContact = null
formInline.value.laboratoryOwner = null
}
-// 获取详情信息
+// 获取detail信息
const getInfo = () => {
getStandardListDetail({ id: props.infoId }).then((res) => {
Object.keys(res.data).map((item) => {
@@ -225,7 +225,7 @@
formInline.value = res.data
})
}
-if (props.buttonType !== '') {
+if (props.buttonType !== 'add') {
getInfo()
}
watch(() => formInline.value, (newVal) => {
@@ -266,7 +266,7 @@
@@ -275,7 +275,7 @@
@@ -284,7 +284,7 @@
@@ -295,7 +295,7 @@
@@ -307,7 +307,7 @@
@@ -318,7 +318,7 @@
clearable
placeholder="标准负责人"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -347,7 +347,7 @@
clearable
placeholder="类别"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -413,18 +413,18 @@
placeholder="请选择筹建日期"
format="YYYY/MM/DD HH:mm:ss"
value-format="YYYY-MM-DD h:m:s"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
-
+
-
+
@@ -451,7 +451,7 @@
@@ -464,7 +464,7 @@
clearable
placeholder="管理状态"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -510,7 +510,7 @@
placeholder="请选择考核日期"
format="YYYY/MM/DD HH:mm:ss"
value-format="YYYY-MM-DD h:m:s"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -522,7 +522,7 @@
v-model.trim="formInline.uncertainty"
style="width: 500px;"
placeholder="不确定度"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -534,7 +534,7 @@
v-model.trim="formInline.mesureRange"
placeholder="测量范围"
style="width: 500px;"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -548,7 +548,7 @@
@@ -557,7 +557,7 @@
@@ -621,7 +621,7 @@
:on-change="handleFileChange"
:limit="1"
>
-
+
上传
@@ -635,7 +635,7 @@
v-model.trim="formInline.remark"
style="width: 500px;"
placeholder="备注"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue
index 348bb41..eb7ced3 100644
--- a/src/views/device/standardEquipment/components/standardListAdd.vue
+++ b/src/views/device/standardEquipment/components/standardListAdd.vue
@@ -9,17 +9,23 @@
import { getTypeSelect } from '@/api/system/price'
import { getStandardLisUpdate, getStandardListAdd, getStandardListDetail, getUsersDept } from '@/api/device/standard'
import { UploadFile } from '@/api/measure/file'
-const props = defineProps({
- infoId: {
- type: String,
- default: '0',
- },
- buttonType: {
- type: String,
- default: '',
- },
-})
-const emit = defineEmits(['close'])
+const loading = ref(false) // 表单加载状态
+const infoId = ref('') // id
+const pageType = ref('add') // 页面类型: add,edit, detail
+const buttonLoading = ref(false) // 按钮加载状态
+const textMap: { [key: string]: string } = {
+ edit: '编辑',
+ add: '新建',
+ detail: '详情',
+}// 字典
+// 从路由中获取页面类型参数
+const $route = useRoute()
+if ($route.params && $route.params.type) {
+ pageType.value = $route.params.type as string
+ if ($route.params.id) {
+ infoId.value = $route.params.id as string
+ }
+}
// 定义数据
const formInline = ref({})
// 关闭
@@ -42,17 +48,19 @@
watch(current, (newValue) => {
currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp
})
-// 关闭
+// 初始化router
+const $router = useRouter()
+// 关闭新增页面的回调
const close = () => {
- emit('close')
+ $router.back()
}
const setData = (newValue: object) => {
formInline.value = newValue
}
// 编辑获取详情的提交按钮
const submitFormDetail = () => {
- if (props.buttonType === '编辑') {
- formInline.value.id = props.infoId
+ if (pageType.value === 'edit') {
+ formInline.value.id = infoId.value
getStandardLisUpdate(formInline.value).then((res) => {
if (res.code === 200) {
close()
@@ -73,7 +81,7 @@
}
// 提交
const submitForm = () => {
- if (props.buttonType === '详情') { return submitFormDetail() }
+ if (pageType.value === 'detail') { return submitFormDetail() }
ElMessageBox.confirm(
'确认提交吗?',
'提示',
@@ -85,7 +93,7 @@
).then(() => {
current.value = '基本信息'
currentCompRef.value.submitForm().validate().then(() => {
- props.buttonType === ''
+ pageType.value === ''
? getStandardListAdd(formInline.value).then((res) => {
if (res.code === 200) {
close()
@@ -101,15 +109,15 @@
- 测量标准装置
+ {{ `测量标准装置-${textMap[pageType]}` }}
- {{ buttonType === '详情' ? '打印' : '提交' }}
+ {{ pageType === 'detail' ? '打印' : '提交' }}
关闭
@@ -125,7 +133,7 @@
-
+
diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue
index 1826c22..94520ba 100644
--- a/src/views/device/standardEquipment/expirationRemind.vue
+++ b/src/views/device/standardEquipment/expirationRemind.vue
@@ -116,6 +116,8 @@
getSelectList('standardCategory') // 获取类别下拉框
getSelectList('standardManagerState') // 获取管理状态下拉框
+// 初始化路由
+const $router = useRouter()
// 获取部门信息
getUsersDept({
createTime: '',
@@ -238,12 +240,12 @@
})
})
}
-// 点击编辑或详情
-const handleClick = (index: number, row: rowReturn, text: string) => {
- infoId.value = row.id
- buttonType.value = text
- isShow.value = false
+// 点击编辑/详情
+const handleEdit = (row: rowReturn) => {
+ $router.push(`/standard/detail/${row.id}`)
}
+// 提醒函数
+const warnClick = (row: object) => {}
@@ -348,7 +350,7 @@
size="small"
type="primary"
link
- @click="handleClick(row.$index, row, '详情')"
+ @click="handleEdit(row)"
>
详情
@@ -356,7 +358,7 @@
size="small"
link
type="primary"
- @click="handleClick(row.$index, row, '提醒')"
+ @click="warnClick(row)"
>
提醒
@@ -374,10 +376,6 @@
-
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/all.vue b/src/views/device/deviceMaintenance/components/listApply/all.vue
new file mode 100644
index 0000000..d124307
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/all.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue b/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue
new file mode 100644
index 0000000..8a7a8bc
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue
@@ -0,0 +1,16 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/canceled.vue b/src/views/device/deviceMaintenance/components/listApply/canceled.vue
new file mode 100644
index 0000000..3b9657c
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/canceled.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/draftBox.vue b/src/views/device/deviceMaintenance/components/listApply/draftBox.vue
new file mode 100644
index 0000000..43d7b75
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/draftBox.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue b/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue
new file mode 100644
index 0000000..c13f95a
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/listPage.vue b/src/views/device/deviceMaintenance/components/listApply/listPage.vue
new file mode 100644
index 0000000..df90882
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/listPage.vue
@@ -0,0 +1,493 @@
+
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue b/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue
new file mode 100644
index 0000000..eb506ec
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue
@@ -0,0 +1,1021 @@
+
+
+
+
+
+
+ 基本信息
+
+
+
+ {{ item }}
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 上传
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 完成
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/notPass.vue b/src/views/device/deviceMaintenance/components/listApply/notPass.vue
new file mode 100644
index 0000000..5a4b817
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/notPass.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/passed.vue b/src/views/device/deviceMaintenance/components/listApply/passed.vue
new file mode 100644
index 0000000..31cd21c
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/passed.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/maintenanceCheckList.vue b/src/views/device/deviceMaintenance/maintenanceCheckList.vue
index 84224db..c6edd5e 100644
--- a/src/views/device/deviceMaintenance/maintenanceCheckList.vue
+++ b/src/views/device/deviceMaintenance/maintenanceCheckList.vue
@@ -1,11 +1,10 @@
-
- 设备检修保养验收单
-
+
diff --git a/src/views/device/standardEquipment/components/listApply/notPass.vue b/src/views/device/standardEquipment/components/listApply/notPass.vue
index 5a4b817..bf1d8ac 100644
--- a/src/views/device/standardEquipment/components/listApply/notPass.vue
+++ b/src/views/device/standardEquipment/components/listApply/notPass.vue
@@ -6,5 +6,5 @@
-
+
diff --git a/src/views/device/standardEquipment/components/listApply/passed.vue b/src/views/device/standardEquipment/components/listApply/passed.vue
index 31cd21c..1e31fc6 100644
--- a/src/views/device/standardEquipment/components/listApply/passed.vue
+++ b/src/views/device/standardEquipment/components/listApply/passed.vue
@@ -6,5 +6,5 @@
-
+
diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
index c47ad1d..aa13225 100644
--- a/src/views/device/standardEquipment/components/standardList/baseInfo.vue
+++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
@@ -214,7 +214,7 @@
formInline.value.laboratoryOwnerContact = null
formInline.value.laboratoryOwner = null
}
-// 获取详情信息
+// 获取detail信息
const getInfo = () => {
getStandardListDetail({ id: props.infoId }).then((res) => {
Object.keys(res.data).map((item) => {
@@ -225,7 +225,7 @@
formInline.value = res.data
})
}
-if (props.buttonType !== '') {
+if (props.buttonType !== 'add') {
getInfo()
}
watch(() => formInline.value, (newVal) => {
@@ -266,7 +266,7 @@
@@ -275,7 +275,7 @@
@@ -284,7 +284,7 @@
@@ -295,7 +295,7 @@
@@ -307,7 +307,7 @@
@@ -318,7 +318,7 @@
clearable
placeholder="标准负责人"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -347,7 +347,7 @@
clearable
placeholder="类别"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -413,18 +413,18 @@
placeholder="请选择筹建日期"
format="YYYY/MM/DD HH:mm:ss"
value-format="YYYY-MM-DD h:m:s"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
-
+
-
+
@@ -451,7 +451,7 @@
@@ -464,7 +464,7 @@
clearable
placeholder="管理状态"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -510,7 +510,7 @@
placeholder="请选择考核日期"
format="YYYY/MM/DD HH:mm:ss"
value-format="YYYY-MM-DD h:m:s"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -522,7 +522,7 @@
v-model.trim="formInline.uncertainty"
style="width: 500px;"
placeholder="不确定度"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -534,7 +534,7 @@
v-model.trim="formInline.mesureRange"
placeholder="测量范围"
style="width: 500px;"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -548,7 +548,7 @@
@@ -557,7 +557,7 @@
@@ -621,7 +621,7 @@
:on-change="handleFileChange"
:limit="1"
>
-
+
上传
@@ -635,7 +635,7 @@
v-model.trim="formInline.remark"
style="width: 500px;"
placeholder="备注"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue
index 348bb41..eb7ced3 100644
--- a/src/views/device/standardEquipment/components/standardListAdd.vue
+++ b/src/views/device/standardEquipment/components/standardListAdd.vue
@@ -9,17 +9,23 @@
import { getTypeSelect } from '@/api/system/price'
import { getStandardLisUpdate, getStandardListAdd, getStandardListDetail, getUsersDept } from '@/api/device/standard'
import { UploadFile } from '@/api/measure/file'
-const props = defineProps({
- infoId: {
- type: String,
- default: '0',
- },
- buttonType: {
- type: String,
- default: '',
- },
-})
-const emit = defineEmits(['close'])
+const loading = ref(false) // 表单加载状态
+const infoId = ref('') // id
+const pageType = ref('add') // 页面类型: add,edit, detail
+const buttonLoading = ref(false) // 按钮加载状态
+const textMap: { [key: string]: string } = {
+ edit: '编辑',
+ add: '新建',
+ detail: '详情',
+}// 字典
+// 从路由中获取页面类型参数
+const $route = useRoute()
+if ($route.params && $route.params.type) {
+ pageType.value = $route.params.type as string
+ if ($route.params.id) {
+ infoId.value = $route.params.id as string
+ }
+}
// 定义数据
const formInline = ref({})
// 关闭
@@ -42,17 +48,19 @@
watch(current, (newValue) => {
currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp
})
-// 关闭
+// 初始化router
+const $router = useRouter()
+// 关闭新增页面的回调
const close = () => {
- emit('close')
+ $router.back()
}
const setData = (newValue: object) => {
formInline.value = newValue
}
// 编辑获取详情的提交按钮
const submitFormDetail = () => {
- if (props.buttonType === '编辑') {
- formInline.value.id = props.infoId
+ if (pageType.value === 'edit') {
+ formInline.value.id = infoId.value
getStandardLisUpdate(formInline.value).then((res) => {
if (res.code === 200) {
close()
@@ -73,7 +81,7 @@
}
// 提交
const submitForm = () => {
- if (props.buttonType === '详情') { return submitFormDetail() }
+ if (pageType.value === 'detail') { return submitFormDetail() }
ElMessageBox.confirm(
'确认提交吗?',
'提示',
@@ -85,7 +93,7 @@
).then(() => {
current.value = '基本信息'
currentCompRef.value.submitForm().validate().then(() => {
- props.buttonType === ''
+ pageType.value === ''
? getStandardListAdd(formInline.value).then((res) => {
if (res.code === 200) {
close()
@@ -101,15 +109,15 @@
- 测量标准装置
+ {{ `测量标准装置-${textMap[pageType]}` }}
- {{ buttonType === '详情' ? '打印' : '提交' }}
+ {{ pageType === 'detail' ? '打印' : '提交' }}
关闭
@@ -125,7 +133,7 @@
-
+
diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue
index 1826c22..94520ba 100644
--- a/src/views/device/standardEquipment/expirationRemind.vue
+++ b/src/views/device/standardEquipment/expirationRemind.vue
@@ -116,6 +116,8 @@
getSelectList('standardCategory') // 获取类别下拉框
getSelectList('standardManagerState') // 获取管理状态下拉框
+// 初始化路由
+const $router = useRouter()
// 获取部门信息
getUsersDept({
createTime: '',
@@ -238,12 +240,12 @@
})
})
}
-// 点击编辑或详情
-const handleClick = (index: number, row: rowReturn, text: string) => {
- infoId.value = row.id
- buttonType.value = text
- isShow.value = false
+// 点击编辑/详情
+const handleEdit = (row: rowReturn) => {
+ $router.push(`/standard/detail/${row.id}`)
}
+// 提醒函数
+const warnClick = (row: object) => {}
@@ -348,7 +350,7 @@
size="small"
type="primary"
link
- @click="handleClick(row.$index, row, '详情')"
+ @click="handleEdit(row)"
>
详情
@@ -356,7 +358,7 @@
size="small"
link
type="primary"
- @click="handleClick(row.$index, row, '提醒')"
+ @click="warnClick(row)"
>
提醒
@@ -374,10 +376,6 @@
-
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/all.vue b/src/views/device/deviceMaintenance/components/listApply/all.vue
new file mode 100644
index 0000000..d124307
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/all.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue b/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue
new file mode 100644
index 0000000..8a7a8bc
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue
@@ -0,0 +1,16 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/canceled.vue b/src/views/device/deviceMaintenance/components/listApply/canceled.vue
new file mode 100644
index 0000000..3b9657c
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/canceled.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/draftBox.vue b/src/views/device/deviceMaintenance/components/listApply/draftBox.vue
new file mode 100644
index 0000000..43d7b75
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/draftBox.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue b/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue
new file mode 100644
index 0000000..c13f95a
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/listPage.vue b/src/views/device/deviceMaintenance/components/listApply/listPage.vue
new file mode 100644
index 0000000..df90882
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/listPage.vue
@@ -0,0 +1,493 @@
+
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue b/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue
new file mode 100644
index 0000000..eb506ec
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue
@@ -0,0 +1,1021 @@
+
+
+
+
+
+
+ 基本信息
+
+
+
+ {{ item }}
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 上传
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 完成
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/notPass.vue b/src/views/device/deviceMaintenance/components/listApply/notPass.vue
new file mode 100644
index 0000000..5a4b817
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/notPass.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/passed.vue b/src/views/device/deviceMaintenance/components/listApply/passed.vue
new file mode 100644
index 0000000..31cd21c
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/passed.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/maintenanceCheckList.vue b/src/views/device/deviceMaintenance/maintenanceCheckList.vue
index 84224db..c6edd5e 100644
--- a/src/views/device/deviceMaintenance/maintenanceCheckList.vue
+++ b/src/views/device/deviceMaintenance/maintenanceCheckList.vue
@@ -1,11 +1,10 @@
-
- 设备检修保养验收单
-
+
diff --git a/src/views/device/standardEquipment/components/listApply/notPass.vue b/src/views/device/standardEquipment/components/listApply/notPass.vue
index 5a4b817..bf1d8ac 100644
--- a/src/views/device/standardEquipment/components/listApply/notPass.vue
+++ b/src/views/device/standardEquipment/components/listApply/notPass.vue
@@ -6,5 +6,5 @@
-
+
diff --git a/src/views/device/standardEquipment/components/listApply/passed.vue b/src/views/device/standardEquipment/components/listApply/passed.vue
index 31cd21c..1e31fc6 100644
--- a/src/views/device/standardEquipment/components/listApply/passed.vue
+++ b/src/views/device/standardEquipment/components/listApply/passed.vue
@@ -6,5 +6,5 @@
-
+
diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
index c47ad1d..aa13225 100644
--- a/src/views/device/standardEquipment/components/standardList/baseInfo.vue
+++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
@@ -214,7 +214,7 @@
formInline.value.laboratoryOwnerContact = null
formInline.value.laboratoryOwner = null
}
-// 获取详情信息
+// 获取detail信息
const getInfo = () => {
getStandardListDetail({ id: props.infoId }).then((res) => {
Object.keys(res.data).map((item) => {
@@ -225,7 +225,7 @@
formInline.value = res.data
})
}
-if (props.buttonType !== '') {
+if (props.buttonType !== 'add') {
getInfo()
}
watch(() => formInline.value, (newVal) => {
@@ -266,7 +266,7 @@
@@ -275,7 +275,7 @@
@@ -284,7 +284,7 @@
@@ -295,7 +295,7 @@
@@ -307,7 +307,7 @@
@@ -318,7 +318,7 @@
clearable
placeholder="标准负责人"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -347,7 +347,7 @@
clearable
placeholder="类别"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -413,18 +413,18 @@
placeholder="请选择筹建日期"
format="YYYY/MM/DD HH:mm:ss"
value-format="YYYY-MM-DD h:m:s"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
-
+
-
+
@@ -451,7 +451,7 @@
@@ -464,7 +464,7 @@
clearable
placeholder="管理状态"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -510,7 +510,7 @@
placeholder="请选择考核日期"
format="YYYY/MM/DD HH:mm:ss"
value-format="YYYY-MM-DD h:m:s"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -522,7 +522,7 @@
v-model.trim="formInline.uncertainty"
style="width: 500px;"
placeholder="不确定度"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -534,7 +534,7 @@
v-model.trim="formInline.mesureRange"
placeholder="测量范围"
style="width: 500px;"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -548,7 +548,7 @@
@@ -557,7 +557,7 @@
@@ -621,7 +621,7 @@
:on-change="handleFileChange"
:limit="1"
>
-
+
上传
@@ -635,7 +635,7 @@
v-model.trim="formInline.remark"
style="width: 500px;"
placeholder="备注"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue
index 348bb41..eb7ced3 100644
--- a/src/views/device/standardEquipment/components/standardListAdd.vue
+++ b/src/views/device/standardEquipment/components/standardListAdd.vue
@@ -9,17 +9,23 @@
import { getTypeSelect } from '@/api/system/price'
import { getStandardLisUpdate, getStandardListAdd, getStandardListDetail, getUsersDept } from '@/api/device/standard'
import { UploadFile } from '@/api/measure/file'
-const props = defineProps({
- infoId: {
- type: String,
- default: '0',
- },
- buttonType: {
- type: String,
- default: '',
- },
-})
-const emit = defineEmits(['close'])
+const loading = ref(false) // 表单加载状态
+const infoId = ref('') // id
+const pageType = ref('add') // 页面类型: add,edit, detail
+const buttonLoading = ref(false) // 按钮加载状态
+const textMap: { [key: string]: string } = {
+ edit: '编辑',
+ add: '新建',
+ detail: '详情',
+}// 字典
+// 从路由中获取页面类型参数
+const $route = useRoute()
+if ($route.params && $route.params.type) {
+ pageType.value = $route.params.type as string
+ if ($route.params.id) {
+ infoId.value = $route.params.id as string
+ }
+}
// 定义数据
const formInline = ref({})
// 关闭
@@ -42,17 +48,19 @@
watch(current, (newValue) => {
currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp
})
-// 关闭
+// 初始化router
+const $router = useRouter()
+// 关闭新增页面的回调
const close = () => {
- emit('close')
+ $router.back()
}
const setData = (newValue: object) => {
formInline.value = newValue
}
// 编辑获取详情的提交按钮
const submitFormDetail = () => {
- if (props.buttonType === '编辑') {
- formInline.value.id = props.infoId
+ if (pageType.value === 'edit') {
+ formInline.value.id = infoId.value
getStandardLisUpdate(formInline.value).then((res) => {
if (res.code === 200) {
close()
@@ -73,7 +81,7 @@
}
// 提交
const submitForm = () => {
- if (props.buttonType === '详情') { return submitFormDetail() }
+ if (pageType.value === 'detail') { return submitFormDetail() }
ElMessageBox.confirm(
'确认提交吗?',
'提示',
@@ -85,7 +93,7 @@
).then(() => {
current.value = '基本信息'
currentCompRef.value.submitForm().validate().then(() => {
- props.buttonType === ''
+ pageType.value === ''
? getStandardListAdd(formInline.value).then((res) => {
if (res.code === 200) {
close()
@@ -101,15 +109,15 @@
- 测量标准装置
+ {{ `测量标准装置-${textMap[pageType]}` }}
- {{ buttonType === '详情' ? '打印' : '提交' }}
+ {{ pageType === 'detail' ? '打印' : '提交' }}
关闭
@@ -125,7 +133,7 @@
-
+
diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue
index 1826c22..94520ba 100644
--- a/src/views/device/standardEquipment/expirationRemind.vue
+++ b/src/views/device/standardEquipment/expirationRemind.vue
@@ -116,6 +116,8 @@
getSelectList('standardCategory') // 获取类别下拉框
getSelectList('standardManagerState') // 获取管理状态下拉框
+// 初始化路由
+const $router = useRouter()
// 获取部门信息
getUsersDept({
createTime: '',
@@ -238,12 +240,12 @@
})
})
}
-// 点击编辑或详情
-const handleClick = (index: number, row: rowReturn, text: string) => {
- infoId.value = row.id
- buttonType.value = text
- isShow.value = false
+// 点击编辑/详情
+const handleEdit = (row: rowReturn) => {
+ $router.push(`/standard/detail/${row.id}`)
}
+// 提醒函数
+const warnClick = (row: object) => {}
@@ -348,7 +350,7 @@
size="small"
type="primary"
link
- @click="handleClick(row.$index, row, '详情')"
+ @click="handleEdit(row)"
>
详情
@@ -356,7 +358,7 @@
size="small"
link
type="primary"
- @click="handleClick(row.$index, row, '提醒')"
+ @click="warnClick(row)"
>
提醒
@@ -374,10 +376,6 @@
-
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/all.vue b/src/views/device/deviceMaintenance/components/listApply/all.vue
new file mode 100644
index 0000000..d124307
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/all.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue b/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue
new file mode 100644
index 0000000..8a7a8bc
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue
@@ -0,0 +1,16 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/canceled.vue b/src/views/device/deviceMaintenance/components/listApply/canceled.vue
new file mode 100644
index 0000000..3b9657c
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/canceled.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/draftBox.vue b/src/views/device/deviceMaintenance/components/listApply/draftBox.vue
new file mode 100644
index 0000000..43d7b75
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/draftBox.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue b/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue
new file mode 100644
index 0000000..c13f95a
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/listPage.vue b/src/views/device/deviceMaintenance/components/listApply/listPage.vue
new file mode 100644
index 0000000..df90882
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/listPage.vue
@@ -0,0 +1,493 @@
+
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue b/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue
new file mode 100644
index 0000000..eb506ec
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue
@@ -0,0 +1,1021 @@
+
+
+
+
+
+
+ 基本信息
+
+
+
+ {{ item }}
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 上传
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 完成
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/notPass.vue b/src/views/device/deviceMaintenance/components/listApply/notPass.vue
new file mode 100644
index 0000000..5a4b817
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/notPass.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/passed.vue b/src/views/device/deviceMaintenance/components/listApply/passed.vue
new file mode 100644
index 0000000..31cd21c
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/passed.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/maintenanceCheckList.vue b/src/views/device/deviceMaintenance/maintenanceCheckList.vue
index 84224db..c6edd5e 100644
--- a/src/views/device/deviceMaintenance/maintenanceCheckList.vue
+++ b/src/views/device/deviceMaintenance/maintenanceCheckList.vue
@@ -1,11 +1,10 @@
-
- 设备检修保养验收单
-
+
diff --git a/src/views/device/standardEquipment/components/listApply/notPass.vue b/src/views/device/standardEquipment/components/listApply/notPass.vue
index 5a4b817..bf1d8ac 100644
--- a/src/views/device/standardEquipment/components/listApply/notPass.vue
+++ b/src/views/device/standardEquipment/components/listApply/notPass.vue
@@ -6,5 +6,5 @@
-
+
diff --git a/src/views/device/standardEquipment/components/listApply/passed.vue b/src/views/device/standardEquipment/components/listApply/passed.vue
index 31cd21c..1e31fc6 100644
--- a/src/views/device/standardEquipment/components/listApply/passed.vue
+++ b/src/views/device/standardEquipment/components/listApply/passed.vue
@@ -6,5 +6,5 @@
-
+
diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
index c47ad1d..aa13225 100644
--- a/src/views/device/standardEquipment/components/standardList/baseInfo.vue
+++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
@@ -214,7 +214,7 @@
formInline.value.laboratoryOwnerContact = null
formInline.value.laboratoryOwner = null
}
-// 获取详情信息
+// 获取detail信息
const getInfo = () => {
getStandardListDetail({ id: props.infoId }).then((res) => {
Object.keys(res.data).map((item) => {
@@ -225,7 +225,7 @@
formInline.value = res.data
})
}
-if (props.buttonType !== '') {
+if (props.buttonType !== 'add') {
getInfo()
}
watch(() => formInline.value, (newVal) => {
@@ -266,7 +266,7 @@
@@ -275,7 +275,7 @@
@@ -284,7 +284,7 @@
@@ -295,7 +295,7 @@
@@ -307,7 +307,7 @@
@@ -318,7 +318,7 @@
clearable
placeholder="标准负责人"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -347,7 +347,7 @@
clearable
placeholder="类别"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -413,18 +413,18 @@
placeholder="请选择筹建日期"
format="YYYY/MM/DD HH:mm:ss"
value-format="YYYY-MM-DD h:m:s"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
-
+
-
+
@@ -451,7 +451,7 @@
@@ -464,7 +464,7 @@
clearable
placeholder="管理状态"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -510,7 +510,7 @@
placeholder="请选择考核日期"
format="YYYY/MM/DD HH:mm:ss"
value-format="YYYY-MM-DD h:m:s"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -522,7 +522,7 @@
v-model.trim="formInline.uncertainty"
style="width: 500px;"
placeholder="不确定度"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -534,7 +534,7 @@
v-model.trim="formInline.mesureRange"
placeholder="测量范围"
style="width: 500px;"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -548,7 +548,7 @@
@@ -557,7 +557,7 @@
@@ -621,7 +621,7 @@
:on-change="handleFileChange"
:limit="1"
>
-
+
上传
@@ -635,7 +635,7 @@
v-model.trim="formInline.remark"
style="width: 500px;"
placeholder="备注"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue
index 348bb41..eb7ced3 100644
--- a/src/views/device/standardEquipment/components/standardListAdd.vue
+++ b/src/views/device/standardEquipment/components/standardListAdd.vue
@@ -9,17 +9,23 @@
import { getTypeSelect } from '@/api/system/price'
import { getStandardLisUpdate, getStandardListAdd, getStandardListDetail, getUsersDept } from '@/api/device/standard'
import { UploadFile } from '@/api/measure/file'
-const props = defineProps({
- infoId: {
- type: String,
- default: '0',
- },
- buttonType: {
- type: String,
- default: '',
- },
-})
-const emit = defineEmits(['close'])
+const loading = ref(false) // 表单加载状态
+const infoId = ref('') // id
+const pageType = ref('add') // 页面类型: add,edit, detail
+const buttonLoading = ref(false) // 按钮加载状态
+const textMap: { [key: string]: string } = {
+ edit: '编辑',
+ add: '新建',
+ detail: '详情',
+}// 字典
+// 从路由中获取页面类型参数
+const $route = useRoute()
+if ($route.params && $route.params.type) {
+ pageType.value = $route.params.type as string
+ if ($route.params.id) {
+ infoId.value = $route.params.id as string
+ }
+}
// 定义数据
const formInline = ref({})
// 关闭
@@ -42,17 +48,19 @@
watch(current, (newValue) => {
currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp
})
-// 关闭
+// 初始化router
+const $router = useRouter()
+// 关闭新增页面的回调
const close = () => {
- emit('close')
+ $router.back()
}
const setData = (newValue: object) => {
formInline.value = newValue
}
// 编辑获取详情的提交按钮
const submitFormDetail = () => {
- if (props.buttonType === '编辑') {
- formInline.value.id = props.infoId
+ if (pageType.value === 'edit') {
+ formInline.value.id = infoId.value
getStandardLisUpdate(formInline.value).then((res) => {
if (res.code === 200) {
close()
@@ -73,7 +81,7 @@
}
// 提交
const submitForm = () => {
- if (props.buttonType === '详情') { return submitFormDetail() }
+ if (pageType.value === 'detail') { return submitFormDetail() }
ElMessageBox.confirm(
'确认提交吗?',
'提示',
@@ -85,7 +93,7 @@
).then(() => {
current.value = '基本信息'
currentCompRef.value.submitForm().validate().then(() => {
- props.buttonType === ''
+ pageType.value === ''
? getStandardListAdd(formInline.value).then((res) => {
if (res.code === 200) {
close()
@@ -101,15 +109,15 @@
- 测量标准装置
+ {{ `测量标准装置-${textMap[pageType]}` }}
- {{ buttonType === '详情' ? '打印' : '提交' }}
+ {{ pageType === 'detail' ? '打印' : '提交' }}
关闭
@@ -125,7 +133,7 @@
-
+
diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue
index 1826c22..94520ba 100644
--- a/src/views/device/standardEquipment/expirationRemind.vue
+++ b/src/views/device/standardEquipment/expirationRemind.vue
@@ -116,6 +116,8 @@
getSelectList('standardCategory') // 获取类别下拉框
getSelectList('standardManagerState') // 获取管理状态下拉框
+// 初始化路由
+const $router = useRouter()
// 获取部门信息
getUsersDept({
createTime: '',
@@ -238,12 +240,12 @@
})
})
}
-// 点击编辑或详情
-const handleClick = (index: number, row: rowReturn, text: string) => {
- infoId.value = row.id
- buttonType.value = text
- isShow.value = false
+// 点击编辑/详情
+const handleEdit = (row: rowReturn) => {
+ $router.push(`/standard/detail/${row.id}`)
}
+// 提醒函数
+const warnClick = (row: object) => {}
@@ -348,7 +350,7 @@
size="small"
type="primary"
link
- @click="handleClick(row.$index, row, '详情')"
+ @click="handleEdit(row)"
>
详情
@@ -356,7 +358,7 @@
size="small"
link
type="primary"
- @click="handleClick(row.$index, row, '提醒')"
+ @click="warnClick(row)"
>
提醒
@@ -374,10 +376,6 @@
-
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/all.vue b/src/views/device/deviceMaintenance/components/listApply/all.vue
new file mode 100644
index 0000000..d124307
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/all.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue b/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue
new file mode 100644
index 0000000..8a7a8bc
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue
@@ -0,0 +1,16 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/canceled.vue b/src/views/device/deviceMaintenance/components/listApply/canceled.vue
new file mode 100644
index 0000000..3b9657c
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/canceled.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/draftBox.vue b/src/views/device/deviceMaintenance/components/listApply/draftBox.vue
new file mode 100644
index 0000000..43d7b75
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/draftBox.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue b/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue
new file mode 100644
index 0000000..c13f95a
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/listPage.vue b/src/views/device/deviceMaintenance/components/listApply/listPage.vue
new file mode 100644
index 0000000..df90882
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/listPage.vue
@@ -0,0 +1,493 @@
+
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue b/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue
new file mode 100644
index 0000000..eb506ec
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue
@@ -0,0 +1,1021 @@
+
+
+
+
+
+
+ 基本信息
+
+
+
+ {{ item }}
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 上传
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 完成
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/notPass.vue b/src/views/device/deviceMaintenance/components/listApply/notPass.vue
new file mode 100644
index 0000000..5a4b817
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/notPass.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/passed.vue b/src/views/device/deviceMaintenance/components/listApply/passed.vue
new file mode 100644
index 0000000..31cd21c
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/passed.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/maintenanceCheckList.vue b/src/views/device/deviceMaintenance/maintenanceCheckList.vue
index 84224db..c6edd5e 100644
--- a/src/views/device/deviceMaintenance/maintenanceCheckList.vue
+++ b/src/views/device/deviceMaintenance/maintenanceCheckList.vue
@@ -1,11 +1,10 @@
-
- 设备检修保养验收单
-
+
diff --git a/src/views/device/standardEquipment/components/listApply/notPass.vue b/src/views/device/standardEquipment/components/listApply/notPass.vue
index 5a4b817..bf1d8ac 100644
--- a/src/views/device/standardEquipment/components/listApply/notPass.vue
+++ b/src/views/device/standardEquipment/components/listApply/notPass.vue
@@ -6,5 +6,5 @@
-
+
diff --git a/src/views/device/standardEquipment/components/listApply/passed.vue b/src/views/device/standardEquipment/components/listApply/passed.vue
index 31cd21c..1e31fc6 100644
--- a/src/views/device/standardEquipment/components/listApply/passed.vue
+++ b/src/views/device/standardEquipment/components/listApply/passed.vue
@@ -6,5 +6,5 @@
-
+
diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
index c47ad1d..aa13225 100644
--- a/src/views/device/standardEquipment/components/standardList/baseInfo.vue
+++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
@@ -214,7 +214,7 @@
formInline.value.laboratoryOwnerContact = null
formInline.value.laboratoryOwner = null
}
-// 获取详情信息
+// 获取detail信息
const getInfo = () => {
getStandardListDetail({ id: props.infoId }).then((res) => {
Object.keys(res.data).map((item) => {
@@ -225,7 +225,7 @@
formInline.value = res.data
})
}
-if (props.buttonType !== '') {
+if (props.buttonType !== 'add') {
getInfo()
}
watch(() => formInline.value, (newVal) => {
@@ -266,7 +266,7 @@
@@ -275,7 +275,7 @@
@@ -284,7 +284,7 @@
@@ -295,7 +295,7 @@
@@ -307,7 +307,7 @@
@@ -318,7 +318,7 @@
clearable
placeholder="标准负责人"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -347,7 +347,7 @@
clearable
placeholder="类别"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -413,18 +413,18 @@
placeholder="请选择筹建日期"
format="YYYY/MM/DD HH:mm:ss"
value-format="YYYY-MM-DD h:m:s"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
-
+
-
+
@@ -451,7 +451,7 @@
@@ -464,7 +464,7 @@
clearable
placeholder="管理状态"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -510,7 +510,7 @@
placeholder="请选择考核日期"
format="YYYY/MM/DD HH:mm:ss"
value-format="YYYY-MM-DD h:m:s"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -522,7 +522,7 @@
v-model.trim="formInline.uncertainty"
style="width: 500px;"
placeholder="不确定度"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -534,7 +534,7 @@
v-model.trim="formInline.mesureRange"
placeholder="测量范围"
style="width: 500px;"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -548,7 +548,7 @@
@@ -557,7 +557,7 @@
@@ -621,7 +621,7 @@
:on-change="handleFileChange"
:limit="1"
>
-
+
上传
@@ -635,7 +635,7 @@
v-model.trim="formInline.remark"
style="width: 500px;"
placeholder="备注"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue
index 348bb41..eb7ced3 100644
--- a/src/views/device/standardEquipment/components/standardListAdd.vue
+++ b/src/views/device/standardEquipment/components/standardListAdd.vue
@@ -9,17 +9,23 @@
import { getTypeSelect } from '@/api/system/price'
import { getStandardLisUpdate, getStandardListAdd, getStandardListDetail, getUsersDept } from '@/api/device/standard'
import { UploadFile } from '@/api/measure/file'
-const props = defineProps({
- infoId: {
- type: String,
- default: '0',
- },
- buttonType: {
- type: String,
- default: '',
- },
-})
-const emit = defineEmits(['close'])
+const loading = ref(false) // 表单加载状态
+const infoId = ref('') // id
+const pageType = ref('add') // 页面类型: add,edit, detail
+const buttonLoading = ref(false) // 按钮加载状态
+const textMap: { [key: string]: string } = {
+ edit: '编辑',
+ add: '新建',
+ detail: '详情',
+}// 字典
+// 从路由中获取页面类型参数
+const $route = useRoute()
+if ($route.params && $route.params.type) {
+ pageType.value = $route.params.type as string
+ if ($route.params.id) {
+ infoId.value = $route.params.id as string
+ }
+}
// 定义数据
const formInline = ref({})
// 关闭
@@ -42,17 +48,19 @@
watch(current, (newValue) => {
currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp
})
-// 关闭
+// 初始化router
+const $router = useRouter()
+// 关闭新增页面的回调
const close = () => {
- emit('close')
+ $router.back()
}
const setData = (newValue: object) => {
formInline.value = newValue
}
// 编辑获取详情的提交按钮
const submitFormDetail = () => {
- if (props.buttonType === '编辑') {
- formInline.value.id = props.infoId
+ if (pageType.value === 'edit') {
+ formInline.value.id = infoId.value
getStandardLisUpdate(formInline.value).then((res) => {
if (res.code === 200) {
close()
@@ -73,7 +81,7 @@
}
// 提交
const submitForm = () => {
- if (props.buttonType === '详情') { return submitFormDetail() }
+ if (pageType.value === 'detail') { return submitFormDetail() }
ElMessageBox.confirm(
'确认提交吗?',
'提示',
@@ -85,7 +93,7 @@
).then(() => {
current.value = '基本信息'
currentCompRef.value.submitForm().validate().then(() => {
- props.buttonType === ''
+ pageType.value === ''
? getStandardListAdd(formInline.value).then((res) => {
if (res.code === 200) {
close()
@@ -101,15 +109,15 @@
- 测量标准装置
+ {{ `测量标准装置-${textMap[pageType]}` }}
- {{ buttonType === '详情' ? '打印' : '提交' }}
+ {{ pageType === 'detail' ? '打印' : '提交' }}
关闭
@@ -125,7 +133,7 @@
-
+
diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue
index 1826c22..94520ba 100644
--- a/src/views/device/standardEquipment/expirationRemind.vue
+++ b/src/views/device/standardEquipment/expirationRemind.vue
@@ -116,6 +116,8 @@
getSelectList('standardCategory') // 获取类别下拉框
getSelectList('standardManagerState') // 获取管理状态下拉框
+// 初始化路由
+const $router = useRouter()
// 获取部门信息
getUsersDept({
createTime: '',
@@ -238,12 +240,12 @@
})
})
}
-// 点击编辑或详情
-const handleClick = (index: number, row: rowReturn, text: string) => {
- infoId.value = row.id
- buttonType.value = text
- isShow.value = false
+// 点击编辑/详情
+const handleEdit = (row: rowReturn) => {
+ $router.push(`/standard/detail/${row.id}`)
}
+// 提醒函数
+const warnClick = (row: object) => {}
@@ -348,7 +350,7 @@
size="small"
type="primary"
link
- @click="handleClick(row.$index, row, '详情')"
+ @click="handleEdit(row)"
>
详情
@@ -356,7 +358,7 @@
size="small"
link
type="primary"
- @click="handleClick(row.$index, row, '提醒')"
+ @click="warnClick(row)"
>
提醒
@@ -374,10 +376,6 @@
-
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/all.vue b/src/views/device/deviceMaintenance/components/listApply/all.vue
new file mode 100644
index 0000000..d124307
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/all.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue b/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue
new file mode 100644
index 0000000..8a7a8bc
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue
@@ -0,0 +1,16 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/canceled.vue b/src/views/device/deviceMaintenance/components/listApply/canceled.vue
new file mode 100644
index 0000000..3b9657c
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/canceled.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/draftBox.vue b/src/views/device/deviceMaintenance/components/listApply/draftBox.vue
new file mode 100644
index 0000000..43d7b75
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/draftBox.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue b/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue
new file mode 100644
index 0000000..c13f95a
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/listPage.vue b/src/views/device/deviceMaintenance/components/listApply/listPage.vue
new file mode 100644
index 0000000..df90882
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/listPage.vue
@@ -0,0 +1,493 @@
+
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue b/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue
new file mode 100644
index 0000000..eb506ec
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue
@@ -0,0 +1,1021 @@
+
+
+
+
+
+
+ 基本信息
+
+
+
+ {{ item }}
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 上传
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 完成
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/notPass.vue b/src/views/device/deviceMaintenance/components/listApply/notPass.vue
new file mode 100644
index 0000000..5a4b817
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/notPass.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/passed.vue b/src/views/device/deviceMaintenance/components/listApply/passed.vue
new file mode 100644
index 0000000..31cd21c
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/passed.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/maintenanceCheckList.vue b/src/views/device/deviceMaintenance/maintenanceCheckList.vue
index 84224db..c6edd5e 100644
--- a/src/views/device/deviceMaintenance/maintenanceCheckList.vue
+++ b/src/views/device/deviceMaintenance/maintenanceCheckList.vue
@@ -1,11 +1,10 @@
-
- 设备检修保养验收单
-
+
diff --git a/src/views/device/standardEquipment/components/listApply/notPass.vue b/src/views/device/standardEquipment/components/listApply/notPass.vue
index 5a4b817..bf1d8ac 100644
--- a/src/views/device/standardEquipment/components/listApply/notPass.vue
+++ b/src/views/device/standardEquipment/components/listApply/notPass.vue
@@ -6,5 +6,5 @@
-
+
diff --git a/src/views/device/standardEquipment/components/listApply/passed.vue b/src/views/device/standardEquipment/components/listApply/passed.vue
index 31cd21c..1e31fc6 100644
--- a/src/views/device/standardEquipment/components/listApply/passed.vue
+++ b/src/views/device/standardEquipment/components/listApply/passed.vue
@@ -6,5 +6,5 @@
-
+
diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
index c47ad1d..aa13225 100644
--- a/src/views/device/standardEquipment/components/standardList/baseInfo.vue
+++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
@@ -214,7 +214,7 @@
formInline.value.laboratoryOwnerContact = null
formInline.value.laboratoryOwner = null
}
-// 获取详情信息
+// 获取detail信息
const getInfo = () => {
getStandardListDetail({ id: props.infoId }).then((res) => {
Object.keys(res.data).map((item) => {
@@ -225,7 +225,7 @@
formInline.value = res.data
})
}
-if (props.buttonType !== '') {
+if (props.buttonType !== 'add') {
getInfo()
}
watch(() => formInline.value, (newVal) => {
@@ -266,7 +266,7 @@
@@ -275,7 +275,7 @@
@@ -284,7 +284,7 @@
@@ -295,7 +295,7 @@
@@ -307,7 +307,7 @@
@@ -318,7 +318,7 @@
clearable
placeholder="标准负责人"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -347,7 +347,7 @@
clearable
placeholder="类别"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -413,18 +413,18 @@
placeholder="请选择筹建日期"
format="YYYY/MM/DD HH:mm:ss"
value-format="YYYY-MM-DD h:m:s"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
-
+
-
+
@@ -451,7 +451,7 @@
@@ -464,7 +464,7 @@
clearable
placeholder="管理状态"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -510,7 +510,7 @@
placeholder="请选择考核日期"
format="YYYY/MM/DD HH:mm:ss"
value-format="YYYY-MM-DD h:m:s"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -522,7 +522,7 @@
v-model.trim="formInline.uncertainty"
style="width: 500px;"
placeholder="不确定度"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -534,7 +534,7 @@
v-model.trim="formInline.mesureRange"
placeholder="测量范围"
style="width: 500px;"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -548,7 +548,7 @@
@@ -557,7 +557,7 @@
@@ -621,7 +621,7 @@
:on-change="handleFileChange"
:limit="1"
>
-
+
上传
@@ -635,7 +635,7 @@
v-model.trim="formInline.remark"
style="width: 500px;"
placeholder="备注"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue
index 348bb41..eb7ced3 100644
--- a/src/views/device/standardEquipment/components/standardListAdd.vue
+++ b/src/views/device/standardEquipment/components/standardListAdd.vue
@@ -9,17 +9,23 @@
import { getTypeSelect } from '@/api/system/price'
import { getStandardLisUpdate, getStandardListAdd, getStandardListDetail, getUsersDept } from '@/api/device/standard'
import { UploadFile } from '@/api/measure/file'
-const props = defineProps({
- infoId: {
- type: String,
- default: '0',
- },
- buttonType: {
- type: String,
- default: '',
- },
-})
-const emit = defineEmits(['close'])
+const loading = ref(false) // 表单加载状态
+const infoId = ref('') // id
+const pageType = ref('add') // 页面类型: add,edit, detail
+const buttonLoading = ref(false) // 按钮加载状态
+const textMap: { [key: string]: string } = {
+ edit: '编辑',
+ add: '新建',
+ detail: '详情',
+}// 字典
+// 从路由中获取页面类型参数
+const $route = useRoute()
+if ($route.params && $route.params.type) {
+ pageType.value = $route.params.type as string
+ if ($route.params.id) {
+ infoId.value = $route.params.id as string
+ }
+}
// 定义数据
const formInline = ref({})
// 关闭
@@ -42,17 +48,19 @@
watch(current, (newValue) => {
currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp
})
-// 关闭
+// 初始化router
+const $router = useRouter()
+// 关闭新增页面的回调
const close = () => {
- emit('close')
+ $router.back()
}
const setData = (newValue: object) => {
formInline.value = newValue
}
// 编辑获取详情的提交按钮
const submitFormDetail = () => {
- if (props.buttonType === '编辑') {
- formInline.value.id = props.infoId
+ if (pageType.value === 'edit') {
+ formInline.value.id = infoId.value
getStandardLisUpdate(formInline.value).then((res) => {
if (res.code === 200) {
close()
@@ -73,7 +81,7 @@
}
// 提交
const submitForm = () => {
- if (props.buttonType === '详情') { return submitFormDetail() }
+ if (pageType.value === 'detail') { return submitFormDetail() }
ElMessageBox.confirm(
'确认提交吗?',
'提示',
@@ -85,7 +93,7 @@
).then(() => {
current.value = '基本信息'
currentCompRef.value.submitForm().validate().then(() => {
- props.buttonType === ''
+ pageType.value === ''
? getStandardListAdd(formInline.value).then((res) => {
if (res.code === 200) {
close()
@@ -101,15 +109,15 @@
- 测量标准装置
+ {{ `测量标准装置-${textMap[pageType]}` }}
- {{ buttonType === '详情' ? '打印' : '提交' }}
+ {{ pageType === 'detail' ? '打印' : '提交' }}
关闭
@@ -125,7 +133,7 @@
-
+
diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue
index 1826c22..94520ba 100644
--- a/src/views/device/standardEquipment/expirationRemind.vue
+++ b/src/views/device/standardEquipment/expirationRemind.vue
@@ -116,6 +116,8 @@
getSelectList('standardCategory') // 获取类别下拉框
getSelectList('standardManagerState') // 获取管理状态下拉框
+// 初始化路由
+const $router = useRouter()
// 获取部门信息
getUsersDept({
createTime: '',
@@ -238,12 +240,12 @@
})
})
}
-// 点击编辑或详情
-const handleClick = (index: number, row: rowReturn, text: string) => {
- infoId.value = row.id
- buttonType.value = text
- isShow.value = false
+// 点击编辑/详情
+const handleEdit = (row: rowReturn) => {
+ $router.push(`/standard/detail/${row.id}`)
}
+// 提醒函数
+const warnClick = (row: object) => {}
@@ -348,7 +350,7 @@
size="small"
type="primary"
link
- @click="handleClick(row.$index, row, '详情')"
+ @click="handleEdit(row)"
>
详情
@@ -356,7 +358,7 @@
size="small"
link
type="primary"
- @click="handleClick(row.$index, row, '提醒')"
+ @click="warnClick(row)"
>
提醒
@@ -374,10 +376,6 @@
-
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/all.vue b/src/views/device/deviceMaintenance/components/listApply/all.vue
new file mode 100644
index 0000000..d124307
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/all.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue b/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue
new file mode 100644
index 0000000..8a7a8bc
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue
@@ -0,0 +1,16 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/canceled.vue b/src/views/device/deviceMaintenance/components/listApply/canceled.vue
new file mode 100644
index 0000000..3b9657c
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/canceled.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/draftBox.vue b/src/views/device/deviceMaintenance/components/listApply/draftBox.vue
new file mode 100644
index 0000000..43d7b75
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/draftBox.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue b/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue
new file mode 100644
index 0000000..c13f95a
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/listPage.vue b/src/views/device/deviceMaintenance/components/listApply/listPage.vue
new file mode 100644
index 0000000..df90882
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/listPage.vue
@@ -0,0 +1,493 @@
+
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue b/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue
new file mode 100644
index 0000000..eb506ec
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue
@@ -0,0 +1,1021 @@
+
+
+
+
+
+
+ 基本信息
+
+
+
+ {{ item }}
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 上传
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 完成
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/notPass.vue b/src/views/device/deviceMaintenance/components/listApply/notPass.vue
new file mode 100644
index 0000000..5a4b817
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/notPass.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/passed.vue b/src/views/device/deviceMaintenance/components/listApply/passed.vue
new file mode 100644
index 0000000..31cd21c
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/passed.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/maintenanceCheckList.vue b/src/views/device/deviceMaintenance/maintenanceCheckList.vue
index 84224db..c6edd5e 100644
--- a/src/views/device/deviceMaintenance/maintenanceCheckList.vue
+++ b/src/views/device/deviceMaintenance/maintenanceCheckList.vue
@@ -1,11 +1,10 @@
-
- 设备检修保养验收单
-
+
diff --git a/src/views/device/standardEquipment/components/listApply/notPass.vue b/src/views/device/standardEquipment/components/listApply/notPass.vue
index 5a4b817..bf1d8ac 100644
--- a/src/views/device/standardEquipment/components/listApply/notPass.vue
+++ b/src/views/device/standardEquipment/components/listApply/notPass.vue
@@ -6,5 +6,5 @@
-
+
diff --git a/src/views/device/standardEquipment/components/listApply/passed.vue b/src/views/device/standardEquipment/components/listApply/passed.vue
index 31cd21c..1e31fc6 100644
--- a/src/views/device/standardEquipment/components/listApply/passed.vue
+++ b/src/views/device/standardEquipment/components/listApply/passed.vue
@@ -6,5 +6,5 @@
-
+
diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
index c47ad1d..aa13225 100644
--- a/src/views/device/standardEquipment/components/standardList/baseInfo.vue
+++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
@@ -214,7 +214,7 @@
formInline.value.laboratoryOwnerContact = null
formInline.value.laboratoryOwner = null
}
-// 获取详情信息
+// 获取detail信息
const getInfo = () => {
getStandardListDetail({ id: props.infoId }).then((res) => {
Object.keys(res.data).map((item) => {
@@ -225,7 +225,7 @@
formInline.value = res.data
})
}
-if (props.buttonType !== '') {
+if (props.buttonType !== 'add') {
getInfo()
}
watch(() => formInline.value, (newVal) => {
@@ -266,7 +266,7 @@
@@ -275,7 +275,7 @@
@@ -284,7 +284,7 @@
@@ -295,7 +295,7 @@
@@ -307,7 +307,7 @@
@@ -318,7 +318,7 @@
clearable
placeholder="标准负责人"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -347,7 +347,7 @@
clearable
placeholder="类别"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -413,18 +413,18 @@
placeholder="请选择筹建日期"
format="YYYY/MM/DD HH:mm:ss"
value-format="YYYY-MM-DD h:m:s"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
-
+
-
+
@@ -451,7 +451,7 @@
@@ -464,7 +464,7 @@
clearable
placeholder="管理状态"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -510,7 +510,7 @@
placeholder="请选择考核日期"
format="YYYY/MM/DD HH:mm:ss"
value-format="YYYY-MM-DD h:m:s"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -522,7 +522,7 @@
v-model.trim="formInline.uncertainty"
style="width: 500px;"
placeholder="不确定度"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -534,7 +534,7 @@
v-model.trim="formInline.mesureRange"
placeholder="测量范围"
style="width: 500px;"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -548,7 +548,7 @@
@@ -557,7 +557,7 @@
@@ -621,7 +621,7 @@
:on-change="handleFileChange"
:limit="1"
>
-
+
上传
@@ -635,7 +635,7 @@
v-model.trim="formInline.remark"
style="width: 500px;"
placeholder="备注"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue
index 348bb41..eb7ced3 100644
--- a/src/views/device/standardEquipment/components/standardListAdd.vue
+++ b/src/views/device/standardEquipment/components/standardListAdd.vue
@@ -9,17 +9,23 @@
import { getTypeSelect } from '@/api/system/price'
import { getStandardLisUpdate, getStandardListAdd, getStandardListDetail, getUsersDept } from '@/api/device/standard'
import { UploadFile } from '@/api/measure/file'
-const props = defineProps({
- infoId: {
- type: String,
- default: '0',
- },
- buttonType: {
- type: String,
- default: '',
- },
-})
-const emit = defineEmits(['close'])
+const loading = ref(false) // 表单加载状态
+const infoId = ref('') // id
+const pageType = ref('add') // 页面类型: add,edit, detail
+const buttonLoading = ref(false) // 按钮加载状态
+const textMap: { [key: string]: string } = {
+ edit: '编辑',
+ add: '新建',
+ detail: '详情',
+}// 字典
+// 从路由中获取页面类型参数
+const $route = useRoute()
+if ($route.params && $route.params.type) {
+ pageType.value = $route.params.type as string
+ if ($route.params.id) {
+ infoId.value = $route.params.id as string
+ }
+}
// 定义数据
const formInline = ref({})
// 关闭
@@ -42,17 +48,19 @@
watch(current, (newValue) => {
currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp
})
-// 关闭
+// 初始化router
+const $router = useRouter()
+// 关闭新增页面的回调
const close = () => {
- emit('close')
+ $router.back()
}
const setData = (newValue: object) => {
formInline.value = newValue
}
// 编辑获取详情的提交按钮
const submitFormDetail = () => {
- if (props.buttonType === '编辑') {
- formInline.value.id = props.infoId
+ if (pageType.value === 'edit') {
+ formInline.value.id = infoId.value
getStandardLisUpdate(formInline.value).then((res) => {
if (res.code === 200) {
close()
@@ -73,7 +81,7 @@
}
// 提交
const submitForm = () => {
- if (props.buttonType === '详情') { return submitFormDetail() }
+ if (pageType.value === 'detail') { return submitFormDetail() }
ElMessageBox.confirm(
'确认提交吗?',
'提示',
@@ -85,7 +93,7 @@
).then(() => {
current.value = '基本信息'
currentCompRef.value.submitForm().validate().then(() => {
- props.buttonType === ''
+ pageType.value === ''
? getStandardListAdd(formInline.value).then((res) => {
if (res.code === 200) {
close()
@@ -101,15 +109,15 @@
- 测量标准装置
+ {{ `测量标准装置-${textMap[pageType]}` }}
- {{ buttonType === '详情' ? '打印' : '提交' }}
+ {{ pageType === 'detail' ? '打印' : '提交' }}
关闭
@@ -125,7 +133,7 @@
-
+
diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue
index 1826c22..94520ba 100644
--- a/src/views/device/standardEquipment/expirationRemind.vue
+++ b/src/views/device/standardEquipment/expirationRemind.vue
@@ -116,6 +116,8 @@
getSelectList('standardCategory') // 获取类别下拉框
getSelectList('standardManagerState') // 获取管理状态下拉框
+// 初始化路由
+const $router = useRouter()
// 获取部门信息
getUsersDept({
createTime: '',
@@ -238,12 +240,12 @@
})
})
}
-// 点击编辑或详情
-const handleClick = (index: number, row: rowReturn, text: string) => {
- infoId.value = row.id
- buttonType.value = text
- isShow.value = false
+// 点击编辑/详情
+const handleEdit = (row: rowReturn) => {
+ $router.push(`/standard/detail/${row.id}`)
}
+// 提醒函数
+const warnClick = (row: object) => {}
@@ -348,7 +350,7 @@
size="small"
type="primary"
link
- @click="handleClick(row.$index, row, '详情')"
+ @click="handleEdit(row)"
>
详情
@@ -356,7 +358,7 @@
size="small"
link
type="primary"
- @click="handleClick(row.$index, row, '提醒')"
+ @click="warnClick(row)"
>
提醒
@@ -374,10 +376,6 @@
-
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/all.vue b/src/views/device/deviceMaintenance/components/listApply/all.vue
new file mode 100644
index 0000000..d124307
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/all.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue b/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue
new file mode 100644
index 0000000..8a7a8bc
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue
@@ -0,0 +1,16 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/canceled.vue b/src/views/device/deviceMaintenance/components/listApply/canceled.vue
new file mode 100644
index 0000000..3b9657c
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/canceled.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/draftBox.vue b/src/views/device/deviceMaintenance/components/listApply/draftBox.vue
new file mode 100644
index 0000000..43d7b75
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/draftBox.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue b/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue
new file mode 100644
index 0000000..c13f95a
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/listPage.vue b/src/views/device/deviceMaintenance/components/listApply/listPage.vue
new file mode 100644
index 0000000..df90882
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/listPage.vue
@@ -0,0 +1,493 @@
+
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue b/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue
new file mode 100644
index 0000000..eb506ec
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue
@@ -0,0 +1,1021 @@
+
+
+
+
+
+
+ 基本信息
+
+
+
+ {{ item }}
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 上传
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 完成
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/notPass.vue b/src/views/device/deviceMaintenance/components/listApply/notPass.vue
new file mode 100644
index 0000000..5a4b817
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/notPass.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/passed.vue b/src/views/device/deviceMaintenance/components/listApply/passed.vue
new file mode 100644
index 0000000..31cd21c
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/passed.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/maintenanceCheckList.vue b/src/views/device/deviceMaintenance/maintenanceCheckList.vue
index 84224db..c6edd5e 100644
--- a/src/views/device/deviceMaintenance/maintenanceCheckList.vue
+++ b/src/views/device/deviceMaintenance/maintenanceCheckList.vue
@@ -1,11 +1,10 @@
-
- 设备检修保养验收单
-
+
diff --git a/src/views/device/standardEquipment/components/listApply/notPass.vue b/src/views/device/standardEquipment/components/listApply/notPass.vue
index 5a4b817..bf1d8ac 100644
--- a/src/views/device/standardEquipment/components/listApply/notPass.vue
+++ b/src/views/device/standardEquipment/components/listApply/notPass.vue
@@ -6,5 +6,5 @@
-
+
diff --git a/src/views/device/standardEquipment/components/listApply/passed.vue b/src/views/device/standardEquipment/components/listApply/passed.vue
index 31cd21c..1e31fc6 100644
--- a/src/views/device/standardEquipment/components/listApply/passed.vue
+++ b/src/views/device/standardEquipment/components/listApply/passed.vue
@@ -6,5 +6,5 @@
-
+
diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
index c47ad1d..aa13225 100644
--- a/src/views/device/standardEquipment/components/standardList/baseInfo.vue
+++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
@@ -214,7 +214,7 @@
formInline.value.laboratoryOwnerContact = null
formInline.value.laboratoryOwner = null
}
-// 获取详情信息
+// 获取detail信息
const getInfo = () => {
getStandardListDetail({ id: props.infoId }).then((res) => {
Object.keys(res.data).map((item) => {
@@ -225,7 +225,7 @@
formInline.value = res.data
})
}
-if (props.buttonType !== '') {
+if (props.buttonType !== 'add') {
getInfo()
}
watch(() => formInline.value, (newVal) => {
@@ -266,7 +266,7 @@
@@ -275,7 +275,7 @@
@@ -284,7 +284,7 @@
@@ -295,7 +295,7 @@
@@ -307,7 +307,7 @@
@@ -318,7 +318,7 @@
clearable
placeholder="标准负责人"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -347,7 +347,7 @@
clearable
placeholder="类别"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -413,18 +413,18 @@
placeholder="请选择筹建日期"
format="YYYY/MM/DD HH:mm:ss"
value-format="YYYY-MM-DD h:m:s"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
-
+
-
+
@@ -451,7 +451,7 @@
@@ -464,7 +464,7 @@
clearable
placeholder="管理状态"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -510,7 +510,7 @@
placeholder="请选择考核日期"
format="YYYY/MM/DD HH:mm:ss"
value-format="YYYY-MM-DD h:m:s"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -522,7 +522,7 @@
v-model.trim="formInline.uncertainty"
style="width: 500px;"
placeholder="不确定度"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -534,7 +534,7 @@
v-model.trim="formInline.mesureRange"
placeholder="测量范围"
style="width: 500px;"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -548,7 +548,7 @@
@@ -557,7 +557,7 @@
@@ -621,7 +621,7 @@
:on-change="handleFileChange"
:limit="1"
>
-
+
上传
@@ -635,7 +635,7 @@
v-model.trim="formInline.remark"
style="width: 500px;"
placeholder="备注"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue
index 348bb41..eb7ced3 100644
--- a/src/views/device/standardEquipment/components/standardListAdd.vue
+++ b/src/views/device/standardEquipment/components/standardListAdd.vue
@@ -9,17 +9,23 @@
import { getTypeSelect } from '@/api/system/price'
import { getStandardLisUpdate, getStandardListAdd, getStandardListDetail, getUsersDept } from '@/api/device/standard'
import { UploadFile } from '@/api/measure/file'
-const props = defineProps({
- infoId: {
- type: String,
- default: '0',
- },
- buttonType: {
- type: String,
- default: '',
- },
-})
-const emit = defineEmits(['close'])
+const loading = ref(false) // 表单加载状态
+const infoId = ref('') // id
+const pageType = ref('add') // 页面类型: add,edit, detail
+const buttonLoading = ref(false) // 按钮加载状态
+const textMap: { [key: string]: string } = {
+ edit: '编辑',
+ add: '新建',
+ detail: '详情',
+}// 字典
+// 从路由中获取页面类型参数
+const $route = useRoute()
+if ($route.params && $route.params.type) {
+ pageType.value = $route.params.type as string
+ if ($route.params.id) {
+ infoId.value = $route.params.id as string
+ }
+}
// 定义数据
const formInline = ref({})
// 关闭
@@ -42,17 +48,19 @@
watch(current, (newValue) => {
currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp
})
-// 关闭
+// 初始化router
+const $router = useRouter()
+// 关闭新增页面的回调
const close = () => {
- emit('close')
+ $router.back()
}
const setData = (newValue: object) => {
formInline.value = newValue
}
// 编辑获取详情的提交按钮
const submitFormDetail = () => {
- if (props.buttonType === '编辑') {
- formInline.value.id = props.infoId
+ if (pageType.value === 'edit') {
+ formInline.value.id = infoId.value
getStandardLisUpdate(formInline.value).then((res) => {
if (res.code === 200) {
close()
@@ -73,7 +81,7 @@
}
// 提交
const submitForm = () => {
- if (props.buttonType === '详情') { return submitFormDetail() }
+ if (pageType.value === 'detail') { return submitFormDetail() }
ElMessageBox.confirm(
'确认提交吗?',
'提示',
@@ -85,7 +93,7 @@
).then(() => {
current.value = '基本信息'
currentCompRef.value.submitForm().validate().then(() => {
- props.buttonType === ''
+ pageType.value === ''
? getStandardListAdd(formInline.value).then((res) => {
if (res.code === 200) {
close()
@@ -101,15 +109,15 @@
- 测量标准装置
+ {{ `测量标准装置-${textMap[pageType]}` }}
- {{ buttonType === '详情' ? '打印' : '提交' }}
+ {{ pageType === 'detail' ? '打印' : '提交' }}
关闭
@@ -125,7 +133,7 @@
-
+
diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue
index 1826c22..94520ba 100644
--- a/src/views/device/standardEquipment/expirationRemind.vue
+++ b/src/views/device/standardEquipment/expirationRemind.vue
@@ -116,6 +116,8 @@
getSelectList('standardCategory') // 获取类别下拉框
getSelectList('standardManagerState') // 获取管理状态下拉框
+// 初始化路由
+const $router = useRouter()
// 获取部门信息
getUsersDept({
createTime: '',
@@ -238,12 +240,12 @@
})
})
}
-// 点击编辑或详情
-const handleClick = (index: number, row: rowReturn, text: string) => {
- infoId.value = row.id
- buttonType.value = text
- isShow.value = false
+// 点击编辑/详情
+const handleEdit = (row: rowReturn) => {
+ $router.push(`/standard/detail/${row.id}`)
}
+// 提醒函数
+const warnClick = (row: object) => {}
@@ -348,7 +350,7 @@
size="small"
type="primary"
link
- @click="handleClick(row.$index, row, '详情')"
+ @click="handleEdit(row)"
>
详情
@@ -356,7 +358,7 @@
size="small"
link
type="primary"
- @click="handleClick(row.$index, row, '提醒')"
+ @click="warnClick(row)"
>
提醒
@@ -374,10 +376,6 @@
-
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/all.vue b/src/views/device/deviceMaintenance/components/listApply/all.vue
new file mode 100644
index 0000000..d124307
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/all.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue b/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue
new file mode 100644
index 0000000..8a7a8bc
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue
@@ -0,0 +1,16 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/canceled.vue b/src/views/device/deviceMaintenance/components/listApply/canceled.vue
new file mode 100644
index 0000000..3b9657c
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/canceled.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/draftBox.vue b/src/views/device/deviceMaintenance/components/listApply/draftBox.vue
new file mode 100644
index 0000000..43d7b75
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/draftBox.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue b/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue
new file mode 100644
index 0000000..c13f95a
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/listPage.vue b/src/views/device/deviceMaintenance/components/listApply/listPage.vue
new file mode 100644
index 0000000..df90882
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/listPage.vue
@@ -0,0 +1,493 @@
+
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue b/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue
new file mode 100644
index 0000000..eb506ec
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue
@@ -0,0 +1,1021 @@
+
+
+
+
+
+
+ 基本信息
+
+
+
+ {{ item }}
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 上传
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 完成
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/notPass.vue b/src/views/device/deviceMaintenance/components/listApply/notPass.vue
new file mode 100644
index 0000000..5a4b817
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/notPass.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/passed.vue b/src/views/device/deviceMaintenance/components/listApply/passed.vue
new file mode 100644
index 0000000..31cd21c
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/passed.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/maintenanceCheckList.vue b/src/views/device/deviceMaintenance/maintenanceCheckList.vue
index 84224db..c6edd5e 100644
--- a/src/views/device/deviceMaintenance/maintenanceCheckList.vue
+++ b/src/views/device/deviceMaintenance/maintenanceCheckList.vue
@@ -1,11 +1,10 @@
-
- 设备检修保养验收单
-
+
diff --git a/src/views/device/standardEquipment/components/listApply/notPass.vue b/src/views/device/standardEquipment/components/listApply/notPass.vue
index 5a4b817..bf1d8ac 100644
--- a/src/views/device/standardEquipment/components/listApply/notPass.vue
+++ b/src/views/device/standardEquipment/components/listApply/notPass.vue
@@ -6,5 +6,5 @@
-
+
diff --git a/src/views/device/standardEquipment/components/listApply/passed.vue b/src/views/device/standardEquipment/components/listApply/passed.vue
index 31cd21c..1e31fc6 100644
--- a/src/views/device/standardEquipment/components/listApply/passed.vue
+++ b/src/views/device/standardEquipment/components/listApply/passed.vue
@@ -6,5 +6,5 @@
-
+
diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
index c47ad1d..aa13225 100644
--- a/src/views/device/standardEquipment/components/standardList/baseInfo.vue
+++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
@@ -214,7 +214,7 @@
formInline.value.laboratoryOwnerContact = null
formInline.value.laboratoryOwner = null
}
-// 获取详情信息
+// 获取detail信息
const getInfo = () => {
getStandardListDetail({ id: props.infoId }).then((res) => {
Object.keys(res.data).map((item) => {
@@ -225,7 +225,7 @@
formInline.value = res.data
})
}
-if (props.buttonType !== '') {
+if (props.buttonType !== 'add') {
getInfo()
}
watch(() => formInline.value, (newVal) => {
@@ -266,7 +266,7 @@
@@ -275,7 +275,7 @@
@@ -284,7 +284,7 @@
@@ -295,7 +295,7 @@
@@ -307,7 +307,7 @@
@@ -318,7 +318,7 @@
clearable
placeholder="标准负责人"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -347,7 +347,7 @@
clearable
placeholder="类别"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -413,18 +413,18 @@
placeholder="请选择筹建日期"
format="YYYY/MM/DD HH:mm:ss"
value-format="YYYY-MM-DD h:m:s"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
-
+
-
+
@@ -451,7 +451,7 @@
@@ -464,7 +464,7 @@
clearable
placeholder="管理状态"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -510,7 +510,7 @@
placeholder="请选择考核日期"
format="YYYY/MM/DD HH:mm:ss"
value-format="YYYY-MM-DD h:m:s"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -522,7 +522,7 @@
v-model.trim="formInline.uncertainty"
style="width: 500px;"
placeholder="不确定度"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -534,7 +534,7 @@
v-model.trim="formInline.mesureRange"
placeholder="测量范围"
style="width: 500px;"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -548,7 +548,7 @@
@@ -557,7 +557,7 @@
@@ -621,7 +621,7 @@
:on-change="handleFileChange"
:limit="1"
>
-
+
上传
@@ -635,7 +635,7 @@
v-model.trim="formInline.remark"
style="width: 500px;"
placeholder="备注"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue
index 348bb41..eb7ced3 100644
--- a/src/views/device/standardEquipment/components/standardListAdd.vue
+++ b/src/views/device/standardEquipment/components/standardListAdd.vue
@@ -9,17 +9,23 @@
import { getTypeSelect } from '@/api/system/price'
import { getStandardLisUpdate, getStandardListAdd, getStandardListDetail, getUsersDept } from '@/api/device/standard'
import { UploadFile } from '@/api/measure/file'
-const props = defineProps({
- infoId: {
- type: String,
- default: '0',
- },
- buttonType: {
- type: String,
- default: '',
- },
-})
-const emit = defineEmits(['close'])
+const loading = ref(false) // 表单加载状态
+const infoId = ref('') // id
+const pageType = ref('add') // 页面类型: add,edit, detail
+const buttonLoading = ref(false) // 按钮加载状态
+const textMap: { [key: string]: string } = {
+ edit: '编辑',
+ add: '新建',
+ detail: '详情',
+}// 字典
+// 从路由中获取页面类型参数
+const $route = useRoute()
+if ($route.params && $route.params.type) {
+ pageType.value = $route.params.type as string
+ if ($route.params.id) {
+ infoId.value = $route.params.id as string
+ }
+}
// 定义数据
const formInline = ref({})
// 关闭
@@ -42,17 +48,19 @@
watch(current, (newValue) => {
currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp
})
-// 关闭
+// 初始化router
+const $router = useRouter()
+// 关闭新增页面的回调
const close = () => {
- emit('close')
+ $router.back()
}
const setData = (newValue: object) => {
formInline.value = newValue
}
// 编辑获取详情的提交按钮
const submitFormDetail = () => {
- if (props.buttonType === '编辑') {
- formInline.value.id = props.infoId
+ if (pageType.value === 'edit') {
+ formInline.value.id = infoId.value
getStandardLisUpdate(formInline.value).then((res) => {
if (res.code === 200) {
close()
@@ -73,7 +81,7 @@
}
// 提交
const submitForm = () => {
- if (props.buttonType === '详情') { return submitFormDetail() }
+ if (pageType.value === 'detail') { return submitFormDetail() }
ElMessageBox.confirm(
'确认提交吗?',
'提示',
@@ -85,7 +93,7 @@
).then(() => {
current.value = '基本信息'
currentCompRef.value.submitForm().validate().then(() => {
- props.buttonType === ''
+ pageType.value === ''
? getStandardListAdd(formInline.value).then((res) => {
if (res.code === 200) {
close()
@@ -101,15 +109,15 @@
- 测量标准装置
+ {{ `测量标准装置-${textMap[pageType]}` }}
- {{ buttonType === '详情' ? '打印' : '提交' }}
+ {{ pageType === 'detail' ? '打印' : '提交' }}
关闭
@@ -125,7 +133,7 @@
-
+
diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue
index 1826c22..94520ba 100644
--- a/src/views/device/standardEquipment/expirationRemind.vue
+++ b/src/views/device/standardEquipment/expirationRemind.vue
@@ -116,6 +116,8 @@
getSelectList('standardCategory') // 获取类别下拉框
getSelectList('standardManagerState') // 获取管理状态下拉框
+// 初始化路由
+const $router = useRouter()
// 获取部门信息
getUsersDept({
createTime: '',
@@ -238,12 +240,12 @@
})
})
}
-// 点击编辑或详情
-const handleClick = (index: number, row: rowReturn, text: string) => {
- infoId.value = row.id
- buttonType.value = text
- isShow.value = false
+// 点击编辑/详情
+const handleEdit = (row: rowReturn) => {
+ $router.push(`/standard/detail/${row.id}`)
}
+// 提醒函数
+const warnClick = (row: object) => {}
@@ -348,7 +350,7 @@
size="small"
type="primary"
link
- @click="handleClick(row.$index, row, '详情')"
+ @click="handleEdit(row)"
>
详情
@@ -356,7 +358,7 @@
size="small"
link
type="primary"
- @click="handleClick(row.$index, row, '提醒')"
+ @click="warnClick(row)"
>
提醒
@@ -374,10 +376,6 @@
-
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/all.vue b/src/views/device/deviceMaintenance/components/listApply/all.vue
new file mode 100644
index 0000000..d124307
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/all.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue b/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue
new file mode 100644
index 0000000..8a7a8bc
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue
@@ -0,0 +1,16 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/canceled.vue b/src/views/device/deviceMaintenance/components/listApply/canceled.vue
new file mode 100644
index 0000000..3b9657c
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/canceled.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/draftBox.vue b/src/views/device/deviceMaintenance/components/listApply/draftBox.vue
new file mode 100644
index 0000000..43d7b75
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/draftBox.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue b/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue
new file mode 100644
index 0000000..c13f95a
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/listPage.vue b/src/views/device/deviceMaintenance/components/listApply/listPage.vue
new file mode 100644
index 0000000..df90882
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/listPage.vue
@@ -0,0 +1,493 @@
+
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue b/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue
new file mode 100644
index 0000000..eb506ec
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue
@@ -0,0 +1,1021 @@
+
+
+
+
+
+
+ 基本信息
+
+
+
+ {{ item }}
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 上传
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 完成
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/notPass.vue b/src/views/device/deviceMaintenance/components/listApply/notPass.vue
new file mode 100644
index 0000000..5a4b817
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/notPass.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/passed.vue b/src/views/device/deviceMaintenance/components/listApply/passed.vue
new file mode 100644
index 0000000..31cd21c
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/passed.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/maintenanceCheckList.vue b/src/views/device/deviceMaintenance/maintenanceCheckList.vue
index 84224db..c6edd5e 100644
--- a/src/views/device/deviceMaintenance/maintenanceCheckList.vue
+++ b/src/views/device/deviceMaintenance/maintenanceCheckList.vue
@@ -1,11 +1,10 @@
-
- 设备检修保养验收单
-
+
diff --git a/src/views/device/standardEquipment/components/listApply/notPass.vue b/src/views/device/standardEquipment/components/listApply/notPass.vue
index 5a4b817..bf1d8ac 100644
--- a/src/views/device/standardEquipment/components/listApply/notPass.vue
+++ b/src/views/device/standardEquipment/components/listApply/notPass.vue
@@ -6,5 +6,5 @@
-
+
diff --git a/src/views/device/standardEquipment/components/listApply/passed.vue b/src/views/device/standardEquipment/components/listApply/passed.vue
index 31cd21c..1e31fc6 100644
--- a/src/views/device/standardEquipment/components/listApply/passed.vue
+++ b/src/views/device/standardEquipment/components/listApply/passed.vue
@@ -6,5 +6,5 @@
-
+
diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
index c47ad1d..aa13225 100644
--- a/src/views/device/standardEquipment/components/standardList/baseInfo.vue
+++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
@@ -214,7 +214,7 @@
formInline.value.laboratoryOwnerContact = null
formInline.value.laboratoryOwner = null
}
-// 获取详情信息
+// 获取detail信息
const getInfo = () => {
getStandardListDetail({ id: props.infoId }).then((res) => {
Object.keys(res.data).map((item) => {
@@ -225,7 +225,7 @@
formInline.value = res.data
})
}
-if (props.buttonType !== '') {
+if (props.buttonType !== 'add') {
getInfo()
}
watch(() => formInline.value, (newVal) => {
@@ -266,7 +266,7 @@
@@ -275,7 +275,7 @@
@@ -284,7 +284,7 @@
@@ -295,7 +295,7 @@
@@ -307,7 +307,7 @@
@@ -318,7 +318,7 @@
clearable
placeholder="标准负责人"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -347,7 +347,7 @@
clearable
placeholder="类别"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -413,18 +413,18 @@
placeholder="请选择筹建日期"
format="YYYY/MM/DD HH:mm:ss"
value-format="YYYY-MM-DD h:m:s"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
-
+
-
+
@@ -451,7 +451,7 @@
@@ -464,7 +464,7 @@
clearable
placeholder="管理状态"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -510,7 +510,7 @@
placeholder="请选择考核日期"
format="YYYY/MM/DD HH:mm:ss"
value-format="YYYY-MM-DD h:m:s"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -522,7 +522,7 @@
v-model.trim="formInline.uncertainty"
style="width: 500px;"
placeholder="不确定度"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -534,7 +534,7 @@
v-model.trim="formInline.mesureRange"
placeholder="测量范围"
style="width: 500px;"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -548,7 +548,7 @@
@@ -557,7 +557,7 @@
@@ -621,7 +621,7 @@
:on-change="handleFileChange"
:limit="1"
>
-
+
上传
@@ -635,7 +635,7 @@
v-model.trim="formInline.remark"
style="width: 500px;"
placeholder="备注"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue
index 348bb41..eb7ced3 100644
--- a/src/views/device/standardEquipment/components/standardListAdd.vue
+++ b/src/views/device/standardEquipment/components/standardListAdd.vue
@@ -9,17 +9,23 @@
import { getTypeSelect } from '@/api/system/price'
import { getStandardLisUpdate, getStandardListAdd, getStandardListDetail, getUsersDept } from '@/api/device/standard'
import { UploadFile } from '@/api/measure/file'
-const props = defineProps({
- infoId: {
- type: String,
- default: '0',
- },
- buttonType: {
- type: String,
- default: '',
- },
-})
-const emit = defineEmits(['close'])
+const loading = ref(false) // 表单加载状态
+const infoId = ref('') // id
+const pageType = ref('add') // 页面类型: add,edit, detail
+const buttonLoading = ref(false) // 按钮加载状态
+const textMap: { [key: string]: string } = {
+ edit: '编辑',
+ add: '新建',
+ detail: '详情',
+}// 字典
+// 从路由中获取页面类型参数
+const $route = useRoute()
+if ($route.params && $route.params.type) {
+ pageType.value = $route.params.type as string
+ if ($route.params.id) {
+ infoId.value = $route.params.id as string
+ }
+}
// 定义数据
const formInline = ref({})
// 关闭
@@ -42,17 +48,19 @@
watch(current, (newValue) => {
currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp
})
-// 关闭
+// 初始化router
+const $router = useRouter()
+// 关闭新增页面的回调
const close = () => {
- emit('close')
+ $router.back()
}
const setData = (newValue: object) => {
formInline.value = newValue
}
// 编辑获取详情的提交按钮
const submitFormDetail = () => {
- if (props.buttonType === '编辑') {
- formInline.value.id = props.infoId
+ if (pageType.value === 'edit') {
+ formInline.value.id = infoId.value
getStandardLisUpdate(formInline.value).then((res) => {
if (res.code === 200) {
close()
@@ -73,7 +81,7 @@
}
// 提交
const submitForm = () => {
- if (props.buttonType === '详情') { return submitFormDetail() }
+ if (pageType.value === 'detail') { return submitFormDetail() }
ElMessageBox.confirm(
'确认提交吗?',
'提示',
@@ -85,7 +93,7 @@
).then(() => {
current.value = '基本信息'
currentCompRef.value.submitForm().validate().then(() => {
- props.buttonType === ''
+ pageType.value === ''
? getStandardListAdd(formInline.value).then((res) => {
if (res.code === 200) {
close()
@@ -101,15 +109,15 @@
- 测量标准装置
+ {{ `测量标准装置-${textMap[pageType]}` }}
- {{ buttonType === '详情' ? '打印' : '提交' }}
+ {{ pageType === 'detail' ? '打印' : '提交' }}
关闭
@@ -125,7 +133,7 @@
-
+
diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue
index 1826c22..94520ba 100644
--- a/src/views/device/standardEquipment/expirationRemind.vue
+++ b/src/views/device/standardEquipment/expirationRemind.vue
@@ -116,6 +116,8 @@
getSelectList('standardCategory') // 获取类别下拉框
getSelectList('standardManagerState') // 获取管理状态下拉框
+// 初始化路由
+const $router = useRouter()
// 获取部门信息
getUsersDept({
createTime: '',
@@ -238,12 +240,12 @@
})
})
}
-// 点击编辑或详情
-const handleClick = (index: number, row: rowReturn, text: string) => {
- infoId.value = row.id
- buttonType.value = text
- isShow.value = false
+// 点击编辑/详情
+const handleEdit = (row: rowReturn) => {
+ $router.push(`/standard/detail/${row.id}`)
}
+// 提醒函数
+const warnClick = (row: object) => {}
@@ -348,7 +350,7 @@
size="small"
type="primary"
link
- @click="handleClick(row.$index, row, '详情')"
+ @click="handleEdit(row)"
>
详情
@@ -356,7 +358,7 @@
size="small"
link
type="primary"
- @click="handleClick(row.$index, row, '提醒')"
+ @click="warnClick(row)"
>
提醒
@@ -374,10 +376,6 @@
-
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/all.vue b/src/views/device/deviceMaintenance/components/listApply/all.vue
new file mode 100644
index 0000000..d124307
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/all.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue b/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue
new file mode 100644
index 0000000..8a7a8bc
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue
@@ -0,0 +1,16 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/canceled.vue b/src/views/device/deviceMaintenance/components/listApply/canceled.vue
new file mode 100644
index 0000000..3b9657c
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/canceled.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/draftBox.vue b/src/views/device/deviceMaintenance/components/listApply/draftBox.vue
new file mode 100644
index 0000000..43d7b75
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/draftBox.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue b/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue
new file mode 100644
index 0000000..c13f95a
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/listPage.vue b/src/views/device/deviceMaintenance/components/listApply/listPage.vue
new file mode 100644
index 0000000..df90882
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/listPage.vue
@@ -0,0 +1,493 @@
+
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue b/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue
new file mode 100644
index 0000000..eb506ec
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue
@@ -0,0 +1,1021 @@
+
+
+
+
+
+
+ 基本信息
+
+
+
+ {{ item }}
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 上传
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 完成
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/notPass.vue b/src/views/device/deviceMaintenance/components/listApply/notPass.vue
new file mode 100644
index 0000000..5a4b817
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/notPass.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/passed.vue b/src/views/device/deviceMaintenance/components/listApply/passed.vue
new file mode 100644
index 0000000..31cd21c
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/passed.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/maintenanceCheckList.vue b/src/views/device/deviceMaintenance/maintenanceCheckList.vue
index 84224db..c6edd5e 100644
--- a/src/views/device/deviceMaintenance/maintenanceCheckList.vue
+++ b/src/views/device/deviceMaintenance/maintenanceCheckList.vue
@@ -1,11 +1,10 @@
-
- 设备检修保养验收单
-
+
diff --git a/src/views/device/standardEquipment/components/listApply/notPass.vue b/src/views/device/standardEquipment/components/listApply/notPass.vue
index 5a4b817..bf1d8ac 100644
--- a/src/views/device/standardEquipment/components/listApply/notPass.vue
+++ b/src/views/device/standardEquipment/components/listApply/notPass.vue
@@ -6,5 +6,5 @@
-
+
diff --git a/src/views/device/standardEquipment/components/listApply/passed.vue b/src/views/device/standardEquipment/components/listApply/passed.vue
index 31cd21c..1e31fc6 100644
--- a/src/views/device/standardEquipment/components/listApply/passed.vue
+++ b/src/views/device/standardEquipment/components/listApply/passed.vue
@@ -6,5 +6,5 @@
-
+
diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
index c47ad1d..aa13225 100644
--- a/src/views/device/standardEquipment/components/standardList/baseInfo.vue
+++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
@@ -214,7 +214,7 @@
formInline.value.laboratoryOwnerContact = null
formInline.value.laboratoryOwner = null
}
-// 获取详情信息
+// 获取detail信息
const getInfo = () => {
getStandardListDetail({ id: props.infoId }).then((res) => {
Object.keys(res.data).map((item) => {
@@ -225,7 +225,7 @@
formInline.value = res.data
})
}
-if (props.buttonType !== '') {
+if (props.buttonType !== 'add') {
getInfo()
}
watch(() => formInline.value, (newVal) => {
@@ -266,7 +266,7 @@
@@ -275,7 +275,7 @@
@@ -284,7 +284,7 @@
@@ -295,7 +295,7 @@
@@ -307,7 +307,7 @@
@@ -318,7 +318,7 @@
clearable
placeholder="标准负责人"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -347,7 +347,7 @@
clearable
placeholder="类别"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -413,18 +413,18 @@
placeholder="请选择筹建日期"
format="YYYY/MM/DD HH:mm:ss"
value-format="YYYY-MM-DD h:m:s"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
-
+
-
+
@@ -451,7 +451,7 @@
@@ -464,7 +464,7 @@
clearable
placeholder="管理状态"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -510,7 +510,7 @@
placeholder="请选择考核日期"
format="YYYY/MM/DD HH:mm:ss"
value-format="YYYY-MM-DD h:m:s"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -522,7 +522,7 @@
v-model.trim="formInline.uncertainty"
style="width: 500px;"
placeholder="不确定度"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -534,7 +534,7 @@
v-model.trim="formInline.mesureRange"
placeholder="测量范围"
style="width: 500px;"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -548,7 +548,7 @@
@@ -557,7 +557,7 @@
@@ -621,7 +621,7 @@
:on-change="handleFileChange"
:limit="1"
>
-
+
上传
@@ -635,7 +635,7 @@
v-model.trim="formInline.remark"
style="width: 500px;"
placeholder="备注"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue
index 348bb41..eb7ced3 100644
--- a/src/views/device/standardEquipment/components/standardListAdd.vue
+++ b/src/views/device/standardEquipment/components/standardListAdd.vue
@@ -9,17 +9,23 @@
import { getTypeSelect } from '@/api/system/price'
import { getStandardLisUpdate, getStandardListAdd, getStandardListDetail, getUsersDept } from '@/api/device/standard'
import { UploadFile } from '@/api/measure/file'
-const props = defineProps({
- infoId: {
- type: String,
- default: '0',
- },
- buttonType: {
- type: String,
- default: '',
- },
-})
-const emit = defineEmits(['close'])
+const loading = ref(false) // 表单加载状态
+const infoId = ref('') // id
+const pageType = ref('add') // 页面类型: add,edit, detail
+const buttonLoading = ref(false) // 按钮加载状态
+const textMap: { [key: string]: string } = {
+ edit: '编辑',
+ add: '新建',
+ detail: '详情',
+}// 字典
+// 从路由中获取页面类型参数
+const $route = useRoute()
+if ($route.params && $route.params.type) {
+ pageType.value = $route.params.type as string
+ if ($route.params.id) {
+ infoId.value = $route.params.id as string
+ }
+}
// 定义数据
const formInline = ref({})
// 关闭
@@ -42,17 +48,19 @@
watch(current, (newValue) => {
currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp
})
-// 关闭
+// 初始化router
+const $router = useRouter()
+// 关闭新增页面的回调
const close = () => {
- emit('close')
+ $router.back()
}
const setData = (newValue: object) => {
formInline.value = newValue
}
// 编辑获取详情的提交按钮
const submitFormDetail = () => {
- if (props.buttonType === '编辑') {
- formInline.value.id = props.infoId
+ if (pageType.value === 'edit') {
+ formInline.value.id = infoId.value
getStandardLisUpdate(formInline.value).then((res) => {
if (res.code === 200) {
close()
@@ -73,7 +81,7 @@
}
// 提交
const submitForm = () => {
- if (props.buttonType === '详情') { return submitFormDetail() }
+ if (pageType.value === 'detail') { return submitFormDetail() }
ElMessageBox.confirm(
'确认提交吗?',
'提示',
@@ -85,7 +93,7 @@
).then(() => {
current.value = '基本信息'
currentCompRef.value.submitForm().validate().then(() => {
- props.buttonType === ''
+ pageType.value === ''
? getStandardListAdd(formInline.value).then((res) => {
if (res.code === 200) {
close()
@@ -101,15 +109,15 @@
- 测量标准装置
+ {{ `测量标准装置-${textMap[pageType]}` }}
- {{ buttonType === '详情' ? '打印' : '提交' }}
+ {{ pageType === 'detail' ? '打印' : '提交' }}
关闭
@@ -125,7 +133,7 @@
-
+
diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue
index 1826c22..94520ba 100644
--- a/src/views/device/standardEquipment/expirationRemind.vue
+++ b/src/views/device/standardEquipment/expirationRemind.vue
@@ -116,6 +116,8 @@
getSelectList('standardCategory') // 获取类别下拉框
getSelectList('standardManagerState') // 获取管理状态下拉框
+// 初始化路由
+const $router = useRouter()
// 获取部门信息
getUsersDept({
createTime: '',
@@ -238,12 +240,12 @@
})
})
}
-// 点击编辑或详情
-const handleClick = (index: number, row: rowReturn, text: string) => {
- infoId.value = row.id
- buttonType.value = text
- isShow.value = false
+// 点击编辑/详情
+const handleEdit = (row: rowReturn) => {
+ $router.push(`/standard/detail/${row.id}`)
}
+// 提醒函数
+const warnClick = (row: object) => {}
@@ -348,7 +350,7 @@
size="small"
type="primary"
link
- @click="handleClick(row.$index, row, '详情')"
+ @click="handleEdit(row)"
>
详情
@@ -356,7 +358,7 @@
size="small"
link
type="primary"
- @click="handleClick(row.$index, row, '提醒')"
+ @click="warnClick(row)"
>
提醒
@@ -374,10 +376,6 @@
-
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/all.vue b/src/views/device/deviceMaintenance/components/listApply/all.vue
new file mode 100644
index 0000000..d124307
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/all.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue b/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue
new file mode 100644
index 0000000..8a7a8bc
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue
@@ -0,0 +1,16 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/canceled.vue b/src/views/device/deviceMaintenance/components/listApply/canceled.vue
new file mode 100644
index 0000000..3b9657c
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/canceled.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/draftBox.vue b/src/views/device/deviceMaintenance/components/listApply/draftBox.vue
new file mode 100644
index 0000000..43d7b75
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/draftBox.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue b/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue
new file mode 100644
index 0000000..c13f95a
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/listPage.vue b/src/views/device/deviceMaintenance/components/listApply/listPage.vue
new file mode 100644
index 0000000..df90882
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/listPage.vue
@@ -0,0 +1,493 @@
+
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue b/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue
new file mode 100644
index 0000000..eb506ec
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue
@@ -0,0 +1,1021 @@
+
+
+
+
+
+
+ 基本信息
+
+
+
+ {{ item }}
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 上传
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 完成
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/notPass.vue b/src/views/device/deviceMaintenance/components/listApply/notPass.vue
new file mode 100644
index 0000000..5a4b817
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/notPass.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/passed.vue b/src/views/device/deviceMaintenance/components/listApply/passed.vue
new file mode 100644
index 0000000..31cd21c
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/passed.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/maintenanceCheckList.vue b/src/views/device/deviceMaintenance/maintenanceCheckList.vue
index 84224db..c6edd5e 100644
--- a/src/views/device/deviceMaintenance/maintenanceCheckList.vue
+++ b/src/views/device/deviceMaintenance/maintenanceCheckList.vue
@@ -1,11 +1,10 @@
-
- 设备检修保养验收单
-
+
diff --git a/src/views/device/standardEquipment/components/listApply/notPass.vue b/src/views/device/standardEquipment/components/listApply/notPass.vue
index 5a4b817..bf1d8ac 100644
--- a/src/views/device/standardEquipment/components/listApply/notPass.vue
+++ b/src/views/device/standardEquipment/components/listApply/notPass.vue
@@ -6,5 +6,5 @@
-
+
diff --git a/src/views/device/standardEquipment/components/listApply/passed.vue b/src/views/device/standardEquipment/components/listApply/passed.vue
index 31cd21c..1e31fc6 100644
--- a/src/views/device/standardEquipment/components/listApply/passed.vue
+++ b/src/views/device/standardEquipment/components/listApply/passed.vue
@@ -6,5 +6,5 @@
-
+
diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
index c47ad1d..aa13225 100644
--- a/src/views/device/standardEquipment/components/standardList/baseInfo.vue
+++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
@@ -214,7 +214,7 @@
formInline.value.laboratoryOwnerContact = null
formInline.value.laboratoryOwner = null
}
-// 获取详情信息
+// 获取detail信息
const getInfo = () => {
getStandardListDetail({ id: props.infoId }).then((res) => {
Object.keys(res.data).map((item) => {
@@ -225,7 +225,7 @@
formInline.value = res.data
})
}
-if (props.buttonType !== '') {
+if (props.buttonType !== 'add') {
getInfo()
}
watch(() => formInline.value, (newVal) => {
@@ -266,7 +266,7 @@
@@ -275,7 +275,7 @@
@@ -284,7 +284,7 @@
@@ -295,7 +295,7 @@
@@ -307,7 +307,7 @@
@@ -318,7 +318,7 @@
clearable
placeholder="标准负责人"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -347,7 +347,7 @@
clearable
placeholder="类别"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -413,18 +413,18 @@
placeholder="请选择筹建日期"
format="YYYY/MM/DD HH:mm:ss"
value-format="YYYY-MM-DD h:m:s"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
-
+
-
+
@@ -451,7 +451,7 @@
@@ -464,7 +464,7 @@
clearable
placeholder="管理状态"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -510,7 +510,7 @@
placeholder="请选择考核日期"
format="YYYY/MM/DD HH:mm:ss"
value-format="YYYY-MM-DD h:m:s"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -522,7 +522,7 @@
v-model.trim="formInline.uncertainty"
style="width: 500px;"
placeholder="不确定度"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -534,7 +534,7 @@
v-model.trim="formInline.mesureRange"
placeholder="测量范围"
style="width: 500px;"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -548,7 +548,7 @@
@@ -557,7 +557,7 @@
@@ -621,7 +621,7 @@
:on-change="handleFileChange"
:limit="1"
>
-
+
上传
@@ -635,7 +635,7 @@
v-model.trim="formInline.remark"
style="width: 500px;"
placeholder="备注"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue
index 348bb41..eb7ced3 100644
--- a/src/views/device/standardEquipment/components/standardListAdd.vue
+++ b/src/views/device/standardEquipment/components/standardListAdd.vue
@@ -9,17 +9,23 @@
import { getTypeSelect } from '@/api/system/price'
import { getStandardLisUpdate, getStandardListAdd, getStandardListDetail, getUsersDept } from '@/api/device/standard'
import { UploadFile } from '@/api/measure/file'
-const props = defineProps({
- infoId: {
- type: String,
- default: '0',
- },
- buttonType: {
- type: String,
- default: '',
- },
-})
-const emit = defineEmits(['close'])
+const loading = ref(false) // 表单加载状态
+const infoId = ref('') // id
+const pageType = ref('add') // 页面类型: add,edit, detail
+const buttonLoading = ref(false) // 按钮加载状态
+const textMap: { [key: string]: string } = {
+ edit: '编辑',
+ add: '新建',
+ detail: '详情',
+}// 字典
+// 从路由中获取页面类型参数
+const $route = useRoute()
+if ($route.params && $route.params.type) {
+ pageType.value = $route.params.type as string
+ if ($route.params.id) {
+ infoId.value = $route.params.id as string
+ }
+}
// 定义数据
const formInline = ref({})
// 关闭
@@ -42,17 +48,19 @@
watch(current, (newValue) => {
currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp
})
-// 关闭
+// 初始化router
+const $router = useRouter()
+// 关闭新增页面的回调
const close = () => {
- emit('close')
+ $router.back()
}
const setData = (newValue: object) => {
formInline.value = newValue
}
// 编辑获取详情的提交按钮
const submitFormDetail = () => {
- if (props.buttonType === '编辑') {
- formInline.value.id = props.infoId
+ if (pageType.value === 'edit') {
+ formInline.value.id = infoId.value
getStandardLisUpdate(formInline.value).then((res) => {
if (res.code === 200) {
close()
@@ -73,7 +81,7 @@
}
// 提交
const submitForm = () => {
- if (props.buttonType === '详情') { return submitFormDetail() }
+ if (pageType.value === 'detail') { return submitFormDetail() }
ElMessageBox.confirm(
'确认提交吗?',
'提示',
@@ -85,7 +93,7 @@
).then(() => {
current.value = '基本信息'
currentCompRef.value.submitForm().validate().then(() => {
- props.buttonType === ''
+ pageType.value === ''
? getStandardListAdd(formInline.value).then((res) => {
if (res.code === 200) {
close()
@@ -101,15 +109,15 @@
- 测量标准装置
+ {{ `测量标准装置-${textMap[pageType]}` }}
- {{ buttonType === '详情' ? '打印' : '提交' }}
+ {{ pageType === 'detail' ? '打印' : '提交' }}
关闭
@@ -125,7 +133,7 @@
-
+
diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue
index 1826c22..94520ba 100644
--- a/src/views/device/standardEquipment/expirationRemind.vue
+++ b/src/views/device/standardEquipment/expirationRemind.vue
@@ -116,6 +116,8 @@
getSelectList('standardCategory') // 获取类别下拉框
getSelectList('standardManagerState') // 获取管理状态下拉框
+// 初始化路由
+const $router = useRouter()
// 获取部门信息
getUsersDept({
createTime: '',
@@ -238,12 +240,12 @@
})
})
}
-// 点击编辑或详情
-const handleClick = (index: number, row: rowReturn, text: string) => {
- infoId.value = row.id
- buttonType.value = text
- isShow.value = false
+// 点击编辑/详情
+const handleEdit = (row: rowReturn) => {
+ $router.push(`/standard/detail/${row.id}`)
}
+// 提醒函数
+const warnClick = (row: object) => {}
@@ -348,7 +350,7 @@
size="small"
type="primary"
link
- @click="handleClick(row.$index, row, '详情')"
+ @click="handleEdit(row)"
>
详情
@@ -356,7 +358,7 @@
size="small"
link
type="primary"
- @click="handleClick(row.$index, row, '提醒')"
+ @click="warnClick(row)"
>
提醒
@@ -374,10 +376,6 @@
-
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/all.vue b/src/views/device/deviceMaintenance/components/listApply/all.vue
new file mode 100644
index 0000000..d124307
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/all.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue b/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue
new file mode 100644
index 0000000..8a7a8bc
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue
@@ -0,0 +1,16 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/canceled.vue b/src/views/device/deviceMaintenance/components/listApply/canceled.vue
new file mode 100644
index 0000000..3b9657c
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/canceled.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/draftBox.vue b/src/views/device/deviceMaintenance/components/listApply/draftBox.vue
new file mode 100644
index 0000000..43d7b75
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/draftBox.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue b/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue
new file mode 100644
index 0000000..c13f95a
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/listPage.vue b/src/views/device/deviceMaintenance/components/listApply/listPage.vue
new file mode 100644
index 0000000..df90882
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/listPage.vue
@@ -0,0 +1,493 @@
+
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue b/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue
new file mode 100644
index 0000000..eb506ec
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue
@@ -0,0 +1,1021 @@
+
+
+
+
+
+
+ 基本信息
+
+
+
+ {{ item }}
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 上传
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 完成
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/notPass.vue b/src/views/device/deviceMaintenance/components/listApply/notPass.vue
new file mode 100644
index 0000000..5a4b817
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/notPass.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/passed.vue b/src/views/device/deviceMaintenance/components/listApply/passed.vue
new file mode 100644
index 0000000..31cd21c
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/passed.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/maintenanceCheckList.vue b/src/views/device/deviceMaintenance/maintenanceCheckList.vue
index 84224db..c6edd5e 100644
--- a/src/views/device/deviceMaintenance/maintenanceCheckList.vue
+++ b/src/views/device/deviceMaintenance/maintenanceCheckList.vue
@@ -1,11 +1,10 @@
-
- 设备检修保养验收单
-
+
diff --git a/src/views/device/standardEquipment/components/listApply/notPass.vue b/src/views/device/standardEquipment/components/listApply/notPass.vue
index 5a4b817..bf1d8ac 100644
--- a/src/views/device/standardEquipment/components/listApply/notPass.vue
+++ b/src/views/device/standardEquipment/components/listApply/notPass.vue
@@ -6,5 +6,5 @@
-
+
diff --git a/src/views/device/standardEquipment/components/listApply/passed.vue b/src/views/device/standardEquipment/components/listApply/passed.vue
index 31cd21c..1e31fc6 100644
--- a/src/views/device/standardEquipment/components/listApply/passed.vue
+++ b/src/views/device/standardEquipment/components/listApply/passed.vue
@@ -6,5 +6,5 @@
-
+
diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
index c47ad1d..aa13225 100644
--- a/src/views/device/standardEquipment/components/standardList/baseInfo.vue
+++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
@@ -214,7 +214,7 @@
formInline.value.laboratoryOwnerContact = null
formInline.value.laboratoryOwner = null
}
-// 获取详情信息
+// 获取detail信息
const getInfo = () => {
getStandardListDetail({ id: props.infoId }).then((res) => {
Object.keys(res.data).map((item) => {
@@ -225,7 +225,7 @@
formInline.value = res.data
})
}
-if (props.buttonType !== '') {
+if (props.buttonType !== 'add') {
getInfo()
}
watch(() => formInline.value, (newVal) => {
@@ -266,7 +266,7 @@
@@ -275,7 +275,7 @@
@@ -284,7 +284,7 @@
@@ -295,7 +295,7 @@
@@ -307,7 +307,7 @@
@@ -318,7 +318,7 @@
clearable
placeholder="标准负责人"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -347,7 +347,7 @@
clearable
placeholder="类别"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -413,18 +413,18 @@
placeholder="请选择筹建日期"
format="YYYY/MM/DD HH:mm:ss"
value-format="YYYY-MM-DD h:m:s"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
-
+
-
+
@@ -451,7 +451,7 @@
@@ -464,7 +464,7 @@
clearable
placeholder="管理状态"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -510,7 +510,7 @@
placeholder="请选择考核日期"
format="YYYY/MM/DD HH:mm:ss"
value-format="YYYY-MM-DD h:m:s"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -522,7 +522,7 @@
v-model.trim="formInline.uncertainty"
style="width: 500px;"
placeholder="不确定度"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -534,7 +534,7 @@
v-model.trim="formInline.mesureRange"
placeholder="测量范围"
style="width: 500px;"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -548,7 +548,7 @@
@@ -557,7 +557,7 @@
@@ -621,7 +621,7 @@
:on-change="handleFileChange"
:limit="1"
>
-
+
上传
@@ -635,7 +635,7 @@
v-model.trim="formInline.remark"
style="width: 500px;"
placeholder="备注"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue
index 348bb41..eb7ced3 100644
--- a/src/views/device/standardEquipment/components/standardListAdd.vue
+++ b/src/views/device/standardEquipment/components/standardListAdd.vue
@@ -9,17 +9,23 @@
import { getTypeSelect } from '@/api/system/price'
import { getStandardLisUpdate, getStandardListAdd, getStandardListDetail, getUsersDept } from '@/api/device/standard'
import { UploadFile } from '@/api/measure/file'
-const props = defineProps({
- infoId: {
- type: String,
- default: '0',
- },
- buttonType: {
- type: String,
- default: '',
- },
-})
-const emit = defineEmits(['close'])
+const loading = ref(false) // 表单加载状态
+const infoId = ref('') // id
+const pageType = ref('add') // 页面类型: add,edit, detail
+const buttonLoading = ref(false) // 按钮加载状态
+const textMap: { [key: string]: string } = {
+ edit: '编辑',
+ add: '新建',
+ detail: '详情',
+}// 字典
+// 从路由中获取页面类型参数
+const $route = useRoute()
+if ($route.params && $route.params.type) {
+ pageType.value = $route.params.type as string
+ if ($route.params.id) {
+ infoId.value = $route.params.id as string
+ }
+}
// 定义数据
const formInline = ref({})
// 关闭
@@ -42,17 +48,19 @@
watch(current, (newValue) => {
currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp
})
-// 关闭
+// 初始化router
+const $router = useRouter()
+// 关闭新增页面的回调
const close = () => {
- emit('close')
+ $router.back()
}
const setData = (newValue: object) => {
formInline.value = newValue
}
// 编辑获取详情的提交按钮
const submitFormDetail = () => {
- if (props.buttonType === '编辑') {
- formInline.value.id = props.infoId
+ if (pageType.value === 'edit') {
+ formInline.value.id = infoId.value
getStandardLisUpdate(formInline.value).then((res) => {
if (res.code === 200) {
close()
@@ -73,7 +81,7 @@
}
// 提交
const submitForm = () => {
- if (props.buttonType === '详情') { return submitFormDetail() }
+ if (pageType.value === 'detail') { return submitFormDetail() }
ElMessageBox.confirm(
'确认提交吗?',
'提示',
@@ -85,7 +93,7 @@
).then(() => {
current.value = '基本信息'
currentCompRef.value.submitForm().validate().then(() => {
- props.buttonType === ''
+ pageType.value === ''
? getStandardListAdd(formInline.value).then((res) => {
if (res.code === 200) {
close()
@@ -101,15 +109,15 @@
- 测量标准装置
+ {{ `测量标准装置-${textMap[pageType]}` }}
- {{ buttonType === '详情' ? '打印' : '提交' }}
+ {{ pageType === 'detail' ? '打印' : '提交' }}
关闭
@@ -125,7 +133,7 @@
-
+
diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue
index 1826c22..94520ba 100644
--- a/src/views/device/standardEquipment/expirationRemind.vue
+++ b/src/views/device/standardEquipment/expirationRemind.vue
@@ -116,6 +116,8 @@
getSelectList('standardCategory') // 获取类别下拉框
getSelectList('standardManagerState') // 获取管理状态下拉框
+// 初始化路由
+const $router = useRouter()
// 获取部门信息
getUsersDept({
createTime: '',
@@ -238,12 +240,12 @@
})
})
}
-// 点击编辑或详情
-const handleClick = (index: number, row: rowReturn, text: string) => {
- infoId.value = row.id
- buttonType.value = text
- isShow.value = false
+// 点击编辑/详情
+const handleEdit = (row: rowReturn) => {
+ $router.push(`/standard/detail/${row.id}`)
}
+// 提醒函数
+const warnClick = (row: object) => {}
@@ -348,7 +350,7 @@
size="small"
type="primary"
link
- @click="handleClick(row.$index, row, '详情')"
+ @click="handleEdit(row)"
>
详情
@@ -356,7 +358,7 @@
size="small"
link
type="primary"
- @click="handleClick(row.$index, row, '提醒')"
+ @click="warnClick(row)"
>
提醒
@@ -374,10 +376,6 @@
-
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/all.vue b/src/views/device/deviceMaintenance/components/listApply/all.vue
new file mode 100644
index 0000000..d124307
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/all.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue b/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue
new file mode 100644
index 0000000..8a7a8bc
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue
@@ -0,0 +1,16 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/canceled.vue b/src/views/device/deviceMaintenance/components/listApply/canceled.vue
new file mode 100644
index 0000000..3b9657c
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/canceled.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/draftBox.vue b/src/views/device/deviceMaintenance/components/listApply/draftBox.vue
new file mode 100644
index 0000000..43d7b75
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/draftBox.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue b/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue
new file mode 100644
index 0000000..c13f95a
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/listPage.vue b/src/views/device/deviceMaintenance/components/listApply/listPage.vue
new file mode 100644
index 0000000..df90882
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/listPage.vue
@@ -0,0 +1,493 @@
+
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue b/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue
new file mode 100644
index 0000000..eb506ec
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue
@@ -0,0 +1,1021 @@
+
+
+
+
+
+
+ 基本信息
+
+
+
+ {{ item }}
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 上传
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 完成
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/notPass.vue b/src/views/device/deviceMaintenance/components/listApply/notPass.vue
new file mode 100644
index 0000000..5a4b817
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/notPass.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/passed.vue b/src/views/device/deviceMaintenance/components/listApply/passed.vue
new file mode 100644
index 0000000..31cd21c
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/passed.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/maintenanceCheckList.vue b/src/views/device/deviceMaintenance/maintenanceCheckList.vue
index 84224db..c6edd5e 100644
--- a/src/views/device/deviceMaintenance/maintenanceCheckList.vue
+++ b/src/views/device/deviceMaintenance/maintenanceCheckList.vue
@@ -1,11 +1,10 @@
-
- 设备检修保养验收单
-
+
diff --git a/src/views/device/standardEquipment/components/listApply/notPass.vue b/src/views/device/standardEquipment/components/listApply/notPass.vue
index 5a4b817..bf1d8ac 100644
--- a/src/views/device/standardEquipment/components/listApply/notPass.vue
+++ b/src/views/device/standardEquipment/components/listApply/notPass.vue
@@ -6,5 +6,5 @@
-
+
diff --git a/src/views/device/standardEquipment/components/listApply/passed.vue b/src/views/device/standardEquipment/components/listApply/passed.vue
index 31cd21c..1e31fc6 100644
--- a/src/views/device/standardEquipment/components/listApply/passed.vue
+++ b/src/views/device/standardEquipment/components/listApply/passed.vue
@@ -6,5 +6,5 @@
-
+
diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
index c47ad1d..aa13225 100644
--- a/src/views/device/standardEquipment/components/standardList/baseInfo.vue
+++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
@@ -214,7 +214,7 @@
formInline.value.laboratoryOwnerContact = null
formInline.value.laboratoryOwner = null
}
-// 获取详情信息
+// 获取detail信息
const getInfo = () => {
getStandardListDetail({ id: props.infoId }).then((res) => {
Object.keys(res.data).map((item) => {
@@ -225,7 +225,7 @@
formInline.value = res.data
})
}
-if (props.buttonType !== '') {
+if (props.buttonType !== 'add') {
getInfo()
}
watch(() => formInline.value, (newVal) => {
@@ -266,7 +266,7 @@
@@ -275,7 +275,7 @@
@@ -284,7 +284,7 @@
@@ -295,7 +295,7 @@
@@ -307,7 +307,7 @@
@@ -318,7 +318,7 @@
clearable
placeholder="标准负责人"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -347,7 +347,7 @@
clearable
placeholder="类别"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -413,18 +413,18 @@
placeholder="请选择筹建日期"
format="YYYY/MM/DD HH:mm:ss"
value-format="YYYY-MM-DD h:m:s"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
-
+
-
+
@@ -451,7 +451,7 @@
@@ -464,7 +464,7 @@
clearable
placeholder="管理状态"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -510,7 +510,7 @@
placeholder="请选择考核日期"
format="YYYY/MM/DD HH:mm:ss"
value-format="YYYY-MM-DD h:m:s"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -522,7 +522,7 @@
v-model.trim="formInline.uncertainty"
style="width: 500px;"
placeholder="不确定度"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -534,7 +534,7 @@
v-model.trim="formInline.mesureRange"
placeholder="测量范围"
style="width: 500px;"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -548,7 +548,7 @@
@@ -557,7 +557,7 @@
@@ -621,7 +621,7 @@
:on-change="handleFileChange"
:limit="1"
>
-
+
上传
@@ -635,7 +635,7 @@
v-model.trim="formInline.remark"
style="width: 500px;"
placeholder="备注"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue
index 348bb41..eb7ced3 100644
--- a/src/views/device/standardEquipment/components/standardListAdd.vue
+++ b/src/views/device/standardEquipment/components/standardListAdd.vue
@@ -9,17 +9,23 @@
import { getTypeSelect } from '@/api/system/price'
import { getStandardLisUpdate, getStandardListAdd, getStandardListDetail, getUsersDept } from '@/api/device/standard'
import { UploadFile } from '@/api/measure/file'
-const props = defineProps({
- infoId: {
- type: String,
- default: '0',
- },
- buttonType: {
- type: String,
- default: '',
- },
-})
-const emit = defineEmits(['close'])
+const loading = ref(false) // 表单加载状态
+const infoId = ref('') // id
+const pageType = ref('add') // 页面类型: add,edit, detail
+const buttonLoading = ref(false) // 按钮加载状态
+const textMap: { [key: string]: string } = {
+ edit: '编辑',
+ add: '新建',
+ detail: '详情',
+}// 字典
+// 从路由中获取页面类型参数
+const $route = useRoute()
+if ($route.params && $route.params.type) {
+ pageType.value = $route.params.type as string
+ if ($route.params.id) {
+ infoId.value = $route.params.id as string
+ }
+}
// 定义数据
const formInline = ref({})
// 关闭
@@ -42,17 +48,19 @@
watch(current, (newValue) => {
currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp
})
-// 关闭
+// 初始化router
+const $router = useRouter()
+// 关闭新增页面的回调
const close = () => {
- emit('close')
+ $router.back()
}
const setData = (newValue: object) => {
formInline.value = newValue
}
// 编辑获取详情的提交按钮
const submitFormDetail = () => {
- if (props.buttonType === '编辑') {
- formInline.value.id = props.infoId
+ if (pageType.value === 'edit') {
+ formInline.value.id = infoId.value
getStandardLisUpdate(formInline.value).then((res) => {
if (res.code === 200) {
close()
@@ -73,7 +81,7 @@
}
// 提交
const submitForm = () => {
- if (props.buttonType === '详情') { return submitFormDetail() }
+ if (pageType.value === 'detail') { return submitFormDetail() }
ElMessageBox.confirm(
'确认提交吗?',
'提示',
@@ -85,7 +93,7 @@
).then(() => {
current.value = '基本信息'
currentCompRef.value.submitForm().validate().then(() => {
- props.buttonType === ''
+ pageType.value === ''
? getStandardListAdd(formInline.value).then((res) => {
if (res.code === 200) {
close()
@@ -101,15 +109,15 @@
- 测量标准装置
+ {{ `测量标准装置-${textMap[pageType]}` }}
- {{ buttonType === '详情' ? '打印' : '提交' }}
+ {{ pageType === 'detail' ? '打印' : '提交' }}
关闭
@@ -125,7 +133,7 @@
-
+
diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue
index 1826c22..94520ba 100644
--- a/src/views/device/standardEquipment/expirationRemind.vue
+++ b/src/views/device/standardEquipment/expirationRemind.vue
@@ -116,6 +116,8 @@
getSelectList('standardCategory') // 获取类别下拉框
getSelectList('standardManagerState') // 获取管理状态下拉框
+// 初始化路由
+const $router = useRouter()
// 获取部门信息
getUsersDept({
createTime: '',
@@ -238,12 +240,12 @@
})
})
}
-// 点击编辑或详情
-const handleClick = (index: number, row: rowReturn, text: string) => {
- infoId.value = row.id
- buttonType.value = text
- isShow.value = false
+// 点击编辑/详情
+const handleEdit = (row: rowReturn) => {
+ $router.push(`/standard/detail/${row.id}`)
}
+// 提醒函数
+const warnClick = (row: object) => {}
@@ -348,7 +350,7 @@
size="small"
type="primary"
link
- @click="handleClick(row.$index, row, '详情')"
+ @click="handleEdit(row)"
>
详情
@@ -356,7 +358,7 @@
size="small"
link
type="primary"
- @click="handleClick(row.$index, row, '提醒')"
+ @click="warnClick(row)"
>
提醒
@@ -374,10 +376,6 @@
-
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/all.vue b/src/views/device/deviceMaintenance/components/listApply/all.vue
new file mode 100644
index 0000000..d124307
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/all.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue b/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue
new file mode 100644
index 0000000..8a7a8bc
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue
@@ -0,0 +1,16 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/canceled.vue b/src/views/device/deviceMaintenance/components/listApply/canceled.vue
new file mode 100644
index 0000000..3b9657c
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/canceled.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/draftBox.vue b/src/views/device/deviceMaintenance/components/listApply/draftBox.vue
new file mode 100644
index 0000000..43d7b75
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/draftBox.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue b/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue
new file mode 100644
index 0000000..c13f95a
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/listPage.vue b/src/views/device/deviceMaintenance/components/listApply/listPage.vue
new file mode 100644
index 0000000..df90882
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/listPage.vue
@@ -0,0 +1,493 @@
+
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue b/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue
new file mode 100644
index 0000000..eb506ec
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue
@@ -0,0 +1,1021 @@
+
+
+
+
+
+
+ 基本信息
+
+
+
+ {{ item }}
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 上传
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 完成
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/notPass.vue b/src/views/device/deviceMaintenance/components/listApply/notPass.vue
new file mode 100644
index 0000000..5a4b817
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/notPass.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/passed.vue b/src/views/device/deviceMaintenance/components/listApply/passed.vue
new file mode 100644
index 0000000..31cd21c
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/passed.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/maintenanceCheckList.vue b/src/views/device/deviceMaintenance/maintenanceCheckList.vue
index 84224db..c6edd5e 100644
--- a/src/views/device/deviceMaintenance/maintenanceCheckList.vue
+++ b/src/views/device/deviceMaintenance/maintenanceCheckList.vue
@@ -1,11 +1,10 @@
-
- 设备检修保养验收单
-
+
diff --git a/src/views/device/standardEquipment/components/listApply/notPass.vue b/src/views/device/standardEquipment/components/listApply/notPass.vue
index 5a4b817..bf1d8ac 100644
--- a/src/views/device/standardEquipment/components/listApply/notPass.vue
+++ b/src/views/device/standardEquipment/components/listApply/notPass.vue
@@ -6,5 +6,5 @@
-
+
diff --git a/src/views/device/standardEquipment/components/listApply/passed.vue b/src/views/device/standardEquipment/components/listApply/passed.vue
index 31cd21c..1e31fc6 100644
--- a/src/views/device/standardEquipment/components/listApply/passed.vue
+++ b/src/views/device/standardEquipment/components/listApply/passed.vue
@@ -6,5 +6,5 @@
-
+
diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
index c47ad1d..aa13225 100644
--- a/src/views/device/standardEquipment/components/standardList/baseInfo.vue
+++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
@@ -214,7 +214,7 @@
formInline.value.laboratoryOwnerContact = null
formInline.value.laboratoryOwner = null
}
-// 获取详情信息
+// 获取detail信息
const getInfo = () => {
getStandardListDetail({ id: props.infoId }).then((res) => {
Object.keys(res.data).map((item) => {
@@ -225,7 +225,7 @@
formInline.value = res.data
})
}
-if (props.buttonType !== '') {
+if (props.buttonType !== 'add') {
getInfo()
}
watch(() => formInline.value, (newVal) => {
@@ -266,7 +266,7 @@
@@ -275,7 +275,7 @@
@@ -284,7 +284,7 @@
@@ -295,7 +295,7 @@
@@ -307,7 +307,7 @@
@@ -318,7 +318,7 @@
clearable
placeholder="标准负责人"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -347,7 +347,7 @@
clearable
placeholder="类别"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -413,18 +413,18 @@
placeholder="请选择筹建日期"
format="YYYY/MM/DD HH:mm:ss"
value-format="YYYY-MM-DD h:m:s"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
-
+
-
+
@@ -451,7 +451,7 @@
@@ -464,7 +464,7 @@
clearable
placeholder="管理状态"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -510,7 +510,7 @@
placeholder="请选择考核日期"
format="YYYY/MM/DD HH:mm:ss"
value-format="YYYY-MM-DD h:m:s"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -522,7 +522,7 @@
v-model.trim="formInline.uncertainty"
style="width: 500px;"
placeholder="不确定度"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -534,7 +534,7 @@
v-model.trim="formInline.mesureRange"
placeholder="测量范围"
style="width: 500px;"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -548,7 +548,7 @@
@@ -557,7 +557,7 @@
@@ -621,7 +621,7 @@
:on-change="handleFileChange"
:limit="1"
>
-
+
上传
@@ -635,7 +635,7 @@
v-model.trim="formInline.remark"
style="width: 500px;"
placeholder="备注"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue
index 348bb41..eb7ced3 100644
--- a/src/views/device/standardEquipment/components/standardListAdd.vue
+++ b/src/views/device/standardEquipment/components/standardListAdd.vue
@@ -9,17 +9,23 @@
import { getTypeSelect } from '@/api/system/price'
import { getStandardLisUpdate, getStandardListAdd, getStandardListDetail, getUsersDept } from '@/api/device/standard'
import { UploadFile } from '@/api/measure/file'
-const props = defineProps({
- infoId: {
- type: String,
- default: '0',
- },
- buttonType: {
- type: String,
- default: '',
- },
-})
-const emit = defineEmits(['close'])
+const loading = ref(false) // 表单加载状态
+const infoId = ref('') // id
+const pageType = ref('add') // 页面类型: add,edit, detail
+const buttonLoading = ref(false) // 按钮加载状态
+const textMap: { [key: string]: string } = {
+ edit: '编辑',
+ add: '新建',
+ detail: '详情',
+}// 字典
+// 从路由中获取页面类型参数
+const $route = useRoute()
+if ($route.params && $route.params.type) {
+ pageType.value = $route.params.type as string
+ if ($route.params.id) {
+ infoId.value = $route.params.id as string
+ }
+}
// 定义数据
const formInline = ref({})
// 关闭
@@ -42,17 +48,19 @@
watch(current, (newValue) => {
currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp
})
-// 关闭
+// 初始化router
+const $router = useRouter()
+// 关闭新增页面的回调
const close = () => {
- emit('close')
+ $router.back()
}
const setData = (newValue: object) => {
formInline.value = newValue
}
// 编辑获取详情的提交按钮
const submitFormDetail = () => {
- if (props.buttonType === '编辑') {
- formInline.value.id = props.infoId
+ if (pageType.value === 'edit') {
+ formInline.value.id = infoId.value
getStandardLisUpdate(formInline.value).then((res) => {
if (res.code === 200) {
close()
@@ -73,7 +81,7 @@
}
// 提交
const submitForm = () => {
- if (props.buttonType === '详情') { return submitFormDetail() }
+ if (pageType.value === 'detail') { return submitFormDetail() }
ElMessageBox.confirm(
'确认提交吗?',
'提示',
@@ -85,7 +93,7 @@
).then(() => {
current.value = '基本信息'
currentCompRef.value.submitForm().validate().then(() => {
- props.buttonType === ''
+ pageType.value === ''
? getStandardListAdd(formInline.value).then((res) => {
if (res.code === 200) {
close()
@@ -101,15 +109,15 @@
- 测量标准装置
+ {{ `测量标准装置-${textMap[pageType]}` }}
- {{ buttonType === '详情' ? '打印' : '提交' }}
+ {{ pageType === 'detail' ? '打印' : '提交' }}
关闭
@@ -125,7 +133,7 @@
-
+
diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue
index 1826c22..94520ba 100644
--- a/src/views/device/standardEquipment/expirationRemind.vue
+++ b/src/views/device/standardEquipment/expirationRemind.vue
@@ -116,6 +116,8 @@
getSelectList('standardCategory') // 获取类别下拉框
getSelectList('standardManagerState') // 获取管理状态下拉框
+// 初始化路由
+const $router = useRouter()
// 获取部门信息
getUsersDept({
createTime: '',
@@ -238,12 +240,12 @@
})
})
}
-// 点击编辑或详情
-const handleClick = (index: number, row: rowReturn, text: string) => {
- infoId.value = row.id
- buttonType.value = text
- isShow.value = false
+// 点击编辑/详情
+const handleEdit = (row: rowReturn) => {
+ $router.push(`/standard/detail/${row.id}`)
}
+// 提醒函数
+const warnClick = (row: object) => {}
@@ -348,7 +350,7 @@
size="small"
type="primary"
link
- @click="handleClick(row.$index, row, '详情')"
+ @click="handleEdit(row)"
>
详情
@@ -356,7 +358,7 @@
size="small"
link
type="primary"
- @click="handleClick(row.$index, row, '提醒')"
+ @click="warnClick(row)"
>
提醒
@@ -374,10 +376,6 @@
-
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/all.vue b/src/views/device/deviceMaintenance/components/listApply/all.vue
new file mode 100644
index 0000000..d124307
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/all.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue b/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue
new file mode 100644
index 0000000..8a7a8bc
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue
@@ -0,0 +1,16 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/canceled.vue b/src/views/device/deviceMaintenance/components/listApply/canceled.vue
new file mode 100644
index 0000000..3b9657c
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/canceled.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/draftBox.vue b/src/views/device/deviceMaintenance/components/listApply/draftBox.vue
new file mode 100644
index 0000000..43d7b75
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/draftBox.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue b/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue
new file mode 100644
index 0000000..c13f95a
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/listPage.vue b/src/views/device/deviceMaintenance/components/listApply/listPage.vue
new file mode 100644
index 0000000..df90882
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/listPage.vue
@@ -0,0 +1,493 @@
+
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue b/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue
new file mode 100644
index 0000000..eb506ec
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue
@@ -0,0 +1,1021 @@
+
+
+
+
+
+
+ 基本信息
+
+
+
+ {{ item }}
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 上传
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 完成
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/notPass.vue b/src/views/device/deviceMaintenance/components/listApply/notPass.vue
new file mode 100644
index 0000000..5a4b817
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/notPass.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/passed.vue b/src/views/device/deviceMaintenance/components/listApply/passed.vue
new file mode 100644
index 0000000..31cd21c
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/passed.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/maintenanceCheckList.vue b/src/views/device/deviceMaintenance/maintenanceCheckList.vue
index 84224db..c6edd5e 100644
--- a/src/views/device/deviceMaintenance/maintenanceCheckList.vue
+++ b/src/views/device/deviceMaintenance/maintenanceCheckList.vue
@@ -1,11 +1,10 @@
-
- 设备检修保养验收单
-
+
diff --git a/src/views/device/standardEquipment/components/listApply/notPass.vue b/src/views/device/standardEquipment/components/listApply/notPass.vue
index 5a4b817..bf1d8ac 100644
--- a/src/views/device/standardEquipment/components/listApply/notPass.vue
+++ b/src/views/device/standardEquipment/components/listApply/notPass.vue
@@ -6,5 +6,5 @@
-
+
diff --git a/src/views/device/standardEquipment/components/listApply/passed.vue b/src/views/device/standardEquipment/components/listApply/passed.vue
index 31cd21c..1e31fc6 100644
--- a/src/views/device/standardEquipment/components/listApply/passed.vue
+++ b/src/views/device/standardEquipment/components/listApply/passed.vue
@@ -6,5 +6,5 @@
-
+
diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
index c47ad1d..aa13225 100644
--- a/src/views/device/standardEquipment/components/standardList/baseInfo.vue
+++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
@@ -214,7 +214,7 @@
formInline.value.laboratoryOwnerContact = null
formInline.value.laboratoryOwner = null
}
-// 获取详情信息
+// 获取detail信息
const getInfo = () => {
getStandardListDetail({ id: props.infoId }).then((res) => {
Object.keys(res.data).map((item) => {
@@ -225,7 +225,7 @@
formInline.value = res.data
})
}
-if (props.buttonType !== '') {
+if (props.buttonType !== 'add') {
getInfo()
}
watch(() => formInline.value, (newVal) => {
@@ -266,7 +266,7 @@
@@ -275,7 +275,7 @@
@@ -284,7 +284,7 @@
@@ -295,7 +295,7 @@
@@ -307,7 +307,7 @@
@@ -318,7 +318,7 @@
clearable
placeholder="标准负责人"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -347,7 +347,7 @@
clearable
placeholder="类别"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -413,18 +413,18 @@
placeholder="请选择筹建日期"
format="YYYY/MM/DD HH:mm:ss"
value-format="YYYY-MM-DD h:m:s"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
-
+
-
+
@@ -451,7 +451,7 @@
@@ -464,7 +464,7 @@
clearable
placeholder="管理状态"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -510,7 +510,7 @@
placeholder="请选择考核日期"
format="YYYY/MM/DD HH:mm:ss"
value-format="YYYY-MM-DD h:m:s"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -522,7 +522,7 @@
v-model.trim="formInline.uncertainty"
style="width: 500px;"
placeholder="不确定度"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -534,7 +534,7 @@
v-model.trim="formInline.mesureRange"
placeholder="测量范围"
style="width: 500px;"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -548,7 +548,7 @@
@@ -557,7 +557,7 @@
@@ -621,7 +621,7 @@
:on-change="handleFileChange"
:limit="1"
>
-
+
上传
@@ -635,7 +635,7 @@
v-model.trim="formInline.remark"
style="width: 500px;"
placeholder="备注"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue
index 348bb41..eb7ced3 100644
--- a/src/views/device/standardEquipment/components/standardListAdd.vue
+++ b/src/views/device/standardEquipment/components/standardListAdd.vue
@@ -9,17 +9,23 @@
import { getTypeSelect } from '@/api/system/price'
import { getStandardLisUpdate, getStandardListAdd, getStandardListDetail, getUsersDept } from '@/api/device/standard'
import { UploadFile } from '@/api/measure/file'
-const props = defineProps({
- infoId: {
- type: String,
- default: '0',
- },
- buttonType: {
- type: String,
- default: '',
- },
-})
-const emit = defineEmits(['close'])
+const loading = ref(false) // 表单加载状态
+const infoId = ref('') // id
+const pageType = ref('add') // 页面类型: add,edit, detail
+const buttonLoading = ref(false) // 按钮加载状态
+const textMap: { [key: string]: string } = {
+ edit: '编辑',
+ add: '新建',
+ detail: '详情',
+}// 字典
+// 从路由中获取页面类型参数
+const $route = useRoute()
+if ($route.params && $route.params.type) {
+ pageType.value = $route.params.type as string
+ if ($route.params.id) {
+ infoId.value = $route.params.id as string
+ }
+}
// 定义数据
const formInline = ref({})
// 关闭
@@ -42,17 +48,19 @@
watch(current, (newValue) => {
currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp
})
-// 关闭
+// 初始化router
+const $router = useRouter()
+// 关闭新增页面的回调
const close = () => {
- emit('close')
+ $router.back()
}
const setData = (newValue: object) => {
formInline.value = newValue
}
// 编辑获取详情的提交按钮
const submitFormDetail = () => {
- if (props.buttonType === '编辑') {
- formInline.value.id = props.infoId
+ if (pageType.value === 'edit') {
+ formInline.value.id = infoId.value
getStandardLisUpdate(formInline.value).then((res) => {
if (res.code === 200) {
close()
@@ -73,7 +81,7 @@
}
// 提交
const submitForm = () => {
- if (props.buttonType === '详情') { return submitFormDetail() }
+ if (pageType.value === 'detail') { return submitFormDetail() }
ElMessageBox.confirm(
'确认提交吗?',
'提示',
@@ -85,7 +93,7 @@
).then(() => {
current.value = '基本信息'
currentCompRef.value.submitForm().validate().then(() => {
- props.buttonType === ''
+ pageType.value === ''
? getStandardListAdd(formInline.value).then((res) => {
if (res.code === 200) {
close()
@@ -101,15 +109,15 @@
- 测量标准装置
+ {{ `测量标准装置-${textMap[pageType]}` }}
- {{ buttonType === '详情' ? '打印' : '提交' }}
+ {{ pageType === 'detail' ? '打印' : '提交' }}
关闭
@@ -125,7 +133,7 @@
-
+
diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue
index 1826c22..94520ba 100644
--- a/src/views/device/standardEquipment/expirationRemind.vue
+++ b/src/views/device/standardEquipment/expirationRemind.vue
@@ -116,6 +116,8 @@
getSelectList('standardCategory') // 获取类别下拉框
getSelectList('standardManagerState') // 获取管理状态下拉框
+// 初始化路由
+const $router = useRouter()
// 获取部门信息
getUsersDept({
createTime: '',
@@ -238,12 +240,12 @@
})
})
}
-// 点击编辑或详情
-const handleClick = (index: number, row: rowReturn, text: string) => {
- infoId.value = row.id
- buttonType.value = text
- isShow.value = false
+// 点击编辑/详情
+const handleEdit = (row: rowReturn) => {
+ $router.push(`/standard/detail/${row.id}`)
}
+// 提醒函数
+const warnClick = (row: object) => {}
@@ -348,7 +350,7 @@
size="small"
type="primary"
link
- @click="handleClick(row.$index, row, '详情')"
+ @click="handleEdit(row)"
>
详情
@@ -356,7 +358,7 @@
size="small"
link
type="primary"
- @click="handleClick(row.$index, row, '提醒')"
+ @click="warnClick(row)"
>
提醒
@@ -374,10 +376,6 @@
-
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/all.vue b/src/views/device/deviceMaintenance/components/listApply/all.vue
new file mode 100644
index 0000000..d124307
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/all.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue b/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue
new file mode 100644
index 0000000..8a7a8bc
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue
@@ -0,0 +1,16 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/canceled.vue b/src/views/device/deviceMaintenance/components/listApply/canceled.vue
new file mode 100644
index 0000000..3b9657c
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/canceled.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/draftBox.vue b/src/views/device/deviceMaintenance/components/listApply/draftBox.vue
new file mode 100644
index 0000000..43d7b75
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/draftBox.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue b/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue
new file mode 100644
index 0000000..c13f95a
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/listPage.vue b/src/views/device/deviceMaintenance/components/listApply/listPage.vue
new file mode 100644
index 0000000..df90882
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/listPage.vue
@@ -0,0 +1,493 @@
+
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue b/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue
new file mode 100644
index 0000000..eb506ec
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue
@@ -0,0 +1,1021 @@
+
+
+
+
+
+
+ 基本信息
+
+
+
+ {{ item }}
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 上传
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 完成
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/notPass.vue b/src/views/device/deviceMaintenance/components/listApply/notPass.vue
new file mode 100644
index 0000000..5a4b817
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/notPass.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/passed.vue b/src/views/device/deviceMaintenance/components/listApply/passed.vue
new file mode 100644
index 0000000..31cd21c
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/passed.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/maintenanceCheckList.vue b/src/views/device/deviceMaintenance/maintenanceCheckList.vue
index 84224db..c6edd5e 100644
--- a/src/views/device/deviceMaintenance/maintenanceCheckList.vue
+++ b/src/views/device/deviceMaintenance/maintenanceCheckList.vue
@@ -1,11 +1,10 @@
-
- 设备检修保养验收单
-
+
diff --git a/src/views/device/standardEquipment/components/listApply/notPass.vue b/src/views/device/standardEquipment/components/listApply/notPass.vue
index 5a4b817..bf1d8ac 100644
--- a/src/views/device/standardEquipment/components/listApply/notPass.vue
+++ b/src/views/device/standardEquipment/components/listApply/notPass.vue
@@ -6,5 +6,5 @@
-
+
diff --git a/src/views/device/standardEquipment/components/listApply/passed.vue b/src/views/device/standardEquipment/components/listApply/passed.vue
index 31cd21c..1e31fc6 100644
--- a/src/views/device/standardEquipment/components/listApply/passed.vue
+++ b/src/views/device/standardEquipment/components/listApply/passed.vue
@@ -6,5 +6,5 @@
-
+
diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
index c47ad1d..aa13225 100644
--- a/src/views/device/standardEquipment/components/standardList/baseInfo.vue
+++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
@@ -214,7 +214,7 @@
formInline.value.laboratoryOwnerContact = null
formInline.value.laboratoryOwner = null
}
-// 获取详情信息
+// 获取detail信息
const getInfo = () => {
getStandardListDetail({ id: props.infoId }).then((res) => {
Object.keys(res.data).map((item) => {
@@ -225,7 +225,7 @@
formInline.value = res.data
})
}
-if (props.buttonType !== '') {
+if (props.buttonType !== 'add') {
getInfo()
}
watch(() => formInline.value, (newVal) => {
@@ -266,7 +266,7 @@
@@ -275,7 +275,7 @@
@@ -284,7 +284,7 @@
@@ -295,7 +295,7 @@
@@ -307,7 +307,7 @@
@@ -318,7 +318,7 @@
clearable
placeholder="标准负责人"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -347,7 +347,7 @@
clearable
placeholder="类别"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -413,18 +413,18 @@
placeholder="请选择筹建日期"
format="YYYY/MM/DD HH:mm:ss"
value-format="YYYY-MM-DD h:m:s"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
-
+
-
+
@@ -451,7 +451,7 @@
@@ -464,7 +464,7 @@
clearable
placeholder="管理状态"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -510,7 +510,7 @@
placeholder="请选择考核日期"
format="YYYY/MM/DD HH:mm:ss"
value-format="YYYY-MM-DD h:m:s"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -522,7 +522,7 @@
v-model.trim="formInline.uncertainty"
style="width: 500px;"
placeholder="不确定度"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -534,7 +534,7 @@
v-model.trim="formInline.mesureRange"
placeholder="测量范围"
style="width: 500px;"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -548,7 +548,7 @@
@@ -557,7 +557,7 @@
@@ -621,7 +621,7 @@
:on-change="handleFileChange"
:limit="1"
>
-
+
上传
@@ -635,7 +635,7 @@
v-model.trim="formInline.remark"
style="width: 500px;"
placeholder="备注"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue
index 348bb41..eb7ced3 100644
--- a/src/views/device/standardEquipment/components/standardListAdd.vue
+++ b/src/views/device/standardEquipment/components/standardListAdd.vue
@@ -9,17 +9,23 @@
import { getTypeSelect } from '@/api/system/price'
import { getStandardLisUpdate, getStandardListAdd, getStandardListDetail, getUsersDept } from '@/api/device/standard'
import { UploadFile } from '@/api/measure/file'
-const props = defineProps({
- infoId: {
- type: String,
- default: '0',
- },
- buttonType: {
- type: String,
- default: '',
- },
-})
-const emit = defineEmits(['close'])
+const loading = ref(false) // 表单加载状态
+const infoId = ref('') // id
+const pageType = ref('add') // 页面类型: add,edit, detail
+const buttonLoading = ref(false) // 按钮加载状态
+const textMap: { [key: string]: string } = {
+ edit: '编辑',
+ add: '新建',
+ detail: '详情',
+}// 字典
+// 从路由中获取页面类型参数
+const $route = useRoute()
+if ($route.params && $route.params.type) {
+ pageType.value = $route.params.type as string
+ if ($route.params.id) {
+ infoId.value = $route.params.id as string
+ }
+}
// 定义数据
const formInline = ref({})
// 关闭
@@ -42,17 +48,19 @@
watch(current, (newValue) => {
currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp
})
-// 关闭
+// 初始化router
+const $router = useRouter()
+// 关闭新增页面的回调
const close = () => {
- emit('close')
+ $router.back()
}
const setData = (newValue: object) => {
formInline.value = newValue
}
// 编辑获取详情的提交按钮
const submitFormDetail = () => {
- if (props.buttonType === '编辑') {
- formInline.value.id = props.infoId
+ if (pageType.value === 'edit') {
+ formInline.value.id = infoId.value
getStandardLisUpdate(formInline.value).then((res) => {
if (res.code === 200) {
close()
@@ -73,7 +81,7 @@
}
// 提交
const submitForm = () => {
- if (props.buttonType === '详情') { return submitFormDetail() }
+ if (pageType.value === 'detail') { return submitFormDetail() }
ElMessageBox.confirm(
'确认提交吗?',
'提示',
@@ -85,7 +93,7 @@
).then(() => {
current.value = '基本信息'
currentCompRef.value.submitForm().validate().then(() => {
- props.buttonType === ''
+ pageType.value === ''
? getStandardListAdd(formInline.value).then((res) => {
if (res.code === 200) {
close()
@@ -101,15 +109,15 @@
- 测量标准装置
+ {{ `测量标准装置-${textMap[pageType]}` }}
- {{ buttonType === '详情' ? '打印' : '提交' }}
+ {{ pageType === 'detail' ? '打印' : '提交' }}
关闭
@@ -125,7 +133,7 @@
-
+
diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue
index 1826c22..94520ba 100644
--- a/src/views/device/standardEquipment/expirationRemind.vue
+++ b/src/views/device/standardEquipment/expirationRemind.vue
@@ -116,6 +116,8 @@
getSelectList('standardCategory') // 获取类别下拉框
getSelectList('standardManagerState') // 获取管理状态下拉框
+// 初始化路由
+const $router = useRouter()
// 获取部门信息
getUsersDept({
createTime: '',
@@ -238,12 +240,12 @@
})
})
}
-// 点击编辑或详情
-const handleClick = (index: number, row: rowReturn, text: string) => {
- infoId.value = row.id
- buttonType.value = text
- isShow.value = false
+// 点击编辑/详情
+const handleEdit = (row: rowReturn) => {
+ $router.push(`/standard/detail/${row.id}`)
}
+// 提醒函数
+const warnClick = (row: object) => {}
@@ -348,7 +350,7 @@
size="small"
type="primary"
link
- @click="handleClick(row.$index, row, '详情')"
+ @click="handleEdit(row)"
>
详情
@@ -356,7 +358,7 @@
size="small"
link
type="primary"
- @click="handleClick(row.$index, row, '提醒')"
+ @click="warnClick(row)"
>
提醒
@@ -374,10 +376,6 @@
-
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/all.vue b/src/views/device/deviceMaintenance/components/listApply/all.vue
new file mode 100644
index 0000000..d124307
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/all.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue b/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue
new file mode 100644
index 0000000..8a7a8bc
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/approvalPending.vue
@@ -0,0 +1,16 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/canceled.vue b/src/views/device/deviceMaintenance/components/listApply/canceled.vue
new file mode 100644
index 0000000..3b9657c
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/canceled.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/draftBox.vue b/src/views/device/deviceMaintenance/components/listApply/draftBox.vue
new file mode 100644
index 0000000..43d7b75
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/draftBox.vue
@@ -0,0 +1,15 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue b/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue
new file mode 100644
index 0000000..c13f95a
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/examineAndApprove.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/listPage.vue b/src/views/device/deviceMaintenance/components/listApply/listPage.vue
new file mode 100644
index 0000000..df90882
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/listPage.vue
@@ -0,0 +1,493 @@
+
+
+
+
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue b/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue
new file mode 100644
index 0000000..eb506ec
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/listPageAdd.vue
@@ -0,0 +1,1021 @@
+
+
+
+
+
+
+ 基本信息
+
+
+
+ {{ item }}
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 上传
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 完成
+
+
+
+
+
+
+
+ 同意
+
+
+ 驳回
+
+
+ 拒绝
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提交
+
+
+ 取消
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/notPass.vue b/src/views/device/deviceMaintenance/components/listApply/notPass.vue
new file mode 100644
index 0000000..5a4b817
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/notPass.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/components/listApply/passed.vue b/src/views/device/deviceMaintenance/components/listApply/passed.vue
new file mode 100644
index 0000000..31cd21c
--- /dev/null
+++ b/src/views/device/deviceMaintenance/components/listApply/passed.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
diff --git a/src/views/device/deviceMaintenance/maintenanceCheckList.vue b/src/views/device/deviceMaintenance/maintenanceCheckList.vue
index 84224db..c6edd5e 100644
--- a/src/views/device/deviceMaintenance/maintenanceCheckList.vue
+++ b/src/views/device/deviceMaintenance/maintenanceCheckList.vue
@@ -1,11 +1,10 @@
-
- 设备检修保养验收单
-
+
diff --git a/src/views/device/standardEquipment/components/listApply/notPass.vue b/src/views/device/standardEquipment/components/listApply/notPass.vue
index 5a4b817..bf1d8ac 100644
--- a/src/views/device/standardEquipment/components/listApply/notPass.vue
+++ b/src/views/device/standardEquipment/components/listApply/notPass.vue
@@ -6,5 +6,5 @@
-
+
diff --git a/src/views/device/standardEquipment/components/listApply/passed.vue b/src/views/device/standardEquipment/components/listApply/passed.vue
index 31cd21c..1e31fc6 100644
--- a/src/views/device/standardEquipment/components/listApply/passed.vue
+++ b/src/views/device/standardEquipment/components/listApply/passed.vue
@@ -6,5 +6,5 @@
-
+
diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
index c47ad1d..aa13225 100644
--- a/src/views/device/standardEquipment/components/standardList/baseInfo.vue
+++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
@@ -214,7 +214,7 @@
formInline.value.laboratoryOwnerContact = null
formInline.value.laboratoryOwner = null
}
-// 获取详情信息
+// 获取detail信息
const getInfo = () => {
getStandardListDetail({ id: props.infoId }).then((res) => {
Object.keys(res.data).map((item) => {
@@ -225,7 +225,7 @@
formInline.value = res.data
})
}
-if (props.buttonType !== '') {
+if (props.buttonType !== 'add') {
getInfo()
}
watch(() => formInline.value, (newVal) => {
@@ -266,7 +266,7 @@
@@ -275,7 +275,7 @@
@@ -284,7 +284,7 @@
@@ -295,7 +295,7 @@
@@ -307,7 +307,7 @@
@@ -318,7 +318,7 @@
clearable
placeholder="标准负责人"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -347,7 +347,7 @@
clearable
placeholder="类别"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -413,18 +413,18 @@
placeholder="请选择筹建日期"
format="YYYY/MM/DD HH:mm:ss"
value-format="YYYY-MM-DD h:m:s"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
-
+
-
+
@@ -451,7 +451,7 @@
@@ -464,7 +464,7 @@
clearable
placeholder="管理状态"
size="default"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
>
@@ -510,7 +510,7 @@
placeholder="请选择考核日期"
format="YYYY/MM/DD HH:mm:ss"
value-format="YYYY-MM-DD h:m:s"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -522,7 +522,7 @@
v-model.trim="formInline.uncertainty"
style="width: 500px;"
placeholder="不确定度"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -534,7 +534,7 @@
v-model.trim="formInline.mesureRange"
placeholder="测量范围"
style="width: 500px;"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
@@ -548,7 +548,7 @@
@@ -557,7 +557,7 @@
@@ -621,7 +621,7 @@
:on-change="handleFileChange"
:limit="1"
>
-
+
上传
@@ -635,7 +635,7 @@
v-model.trim="formInline.remark"
style="width: 500px;"
placeholder="备注"
- :disabled="buttonType === '详情'"
+ :disabled="buttonType === 'detail'"
/>
diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue
index 348bb41..eb7ced3 100644
--- a/src/views/device/standardEquipment/components/standardListAdd.vue
+++ b/src/views/device/standardEquipment/components/standardListAdd.vue
@@ -9,17 +9,23 @@
import { getTypeSelect } from '@/api/system/price'
import { getStandardLisUpdate, getStandardListAdd, getStandardListDetail, getUsersDept } from '@/api/device/standard'
import { UploadFile } from '@/api/measure/file'
-const props = defineProps({
- infoId: {
- type: String,
- default: '0',
- },
- buttonType: {
- type: String,
- default: '',
- },
-})
-const emit = defineEmits(['close'])
+const loading = ref(false) // 表单加载状态
+const infoId = ref('') // id
+const pageType = ref('add') // 页面类型: add,edit, detail
+const buttonLoading = ref(false) // 按钮加载状态
+const textMap: { [key: string]: string } = {
+ edit: '编辑',
+ add: '新建',
+ detail: '详情',
+}// 字典
+// 从路由中获取页面类型参数
+const $route = useRoute()
+if ($route.params && $route.params.type) {
+ pageType.value = $route.params.type as string
+ if ($route.params.id) {
+ infoId.value = $route.params.id as string
+ }
+}
// 定义数据
const formInline = ref({})
// 关闭
@@ -42,17 +48,19 @@
watch(current, (newValue) => {
currentComp.value = menu.value.filter(item => item.name === newValue)[0].comp
})
-// 关闭
+// 初始化router
+const $router = useRouter()
+// 关闭新增页面的回调
const close = () => {
- emit('close')
+ $router.back()
}
const setData = (newValue: object) => {
formInline.value = newValue
}
// 编辑获取详情的提交按钮
const submitFormDetail = () => {
- if (props.buttonType === '编辑') {
- formInline.value.id = props.infoId
+ if (pageType.value === 'edit') {
+ formInline.value.id = infoId.value
getStandardLisUpdate(formInline.value).then((res) => {
if (res.code === 200) {
close()
@@ -73,7 +81,7 @@
}
// 提交
const submitForm = () => {
- if (props.buttonType === '详情') { return submitFormDetail() }
+ if (pageType.value === 'detail') { return submitFormDetail() }
ElMessageBox.confirm(
'确认提交吗?',
'提示',
@@ -85,7 +93,7 @@
).then(() => {
current.value = '基本信息'
currentCompRef.value.submitForm().validate().then(() => {
- props.buttonType === ''
+ pageType.value === ''
? getStandardListAdd(formInline.value).then((res) => {
if (res.code === 200) {
close()
@@ -101,15 +109,15 @@
- 测量标准装置
+ {{ `测量标准装置-${textMap[pageType]}` }}
- {{ buttonType === '详情' ? '打印' : '提交' }}
+ {{ pageType === 'detail' ? '打印' : '提交' }}
关闭
@@ -125,7 +133,7 @@
-
+
diff --git a/src/views/device/standardEquipment/expirationRemind.vue b/src/views/device/standardEquipment/expirationRemind.vue
index 1826c22..94520ba 100644
--- a/src/views/device/standardEquipment/expirationRemind.vue
+++ b/src/views/device/standardEquipment/expirationRemind.vue
@@ -116,6 +116,8 @@
getSelectList('standardCategory') // 获取类别下拉框
getSelectList('standardManagerState') // 获取管理状态下拉框
+// 初始化路由
+const $router = useRouter()
// 获取部门信息
getUsersDept({
createTime: '',
@@ -238,12 +240,12 @@
})
})
}
-// 点击编辑或详情
-const handleClick = (index: number, row: rowReturn, text: string) => {
- infoId.value = row.id
- buttonType.value = text
- isShow.value = false
+// 点击编辑/详情
+const handleEdit = (row: rowReturn) => {
+ $router.push(`/standard/detail/${row.id}`)
}
+// 提醒函数
+const warnClick = (row: object) => {}
@@ -348,7 +350,7 @@
size="small"
type="primary"
link
- @click="handleClick(row.$index, row, '详情')"
+ @click="handleEdit(row)"
>
详情
@@ -356,7 +358,7 @@
size="small"
link
type="primary"
- @click="handleClick(row.$index, row, '提醒')"
+ @click="warnClick(row)"
>
提醒
@@ -374,10 +376,6 @@
-