diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts
index 5ae03f9..28b50ba 100644
--- a/src/api/device/standard.ts
+++ b/src/api/device/standard.ts
@@ -4,7 +4,7 @@
import request from '../index'
const prefix = '/meter'
// 列表查询
-export function getStandardList(data: object) {
+export function getStandardList(data: { offset: number; limit: number }) {
return request({
url: `${prefix}/standard/listPage?offset=${data.offset}&limit=${data.limit}`,
method: 'post',
@@ -47,7 +47,7 @@
}
// 获取部门信息
-export function getUsersDept(data: object) {
+export function getUsersDept(data: { offset: number; limit: number }) {
return request({
url: `/meter/organize/listPage?offset=${data.offset}&limit=${data.limit}`,
method: 'post',
@@ -56,7 +56,7 @@
}
// 获取申请列表
-export function getstandardEquipmentApplyList(data: object) {
+export function getstandardEquipmentApplyList(data: { offset: number; limit: number }) {
return request({
url: `/standard/standardEquipmentApplyList?offset=${data.offset}&limit=${data.limit}`,
method: 'post',
diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts
index 5ae03f9..28b50ba 100644
--- a/src/api/device/standard.ts
+++ b/src/api/device/standard.ts
@@ -4,7 +4,7 @@
import request from '../index'
const prefix = '/meter'
// 列表查询
-export function getStandardList(data: object) {
+export function getStandardList(data: { offset: number; limit: number }) {
return request({
url: `${prefix}/standard/listPage?offset=${data.offset}&limit=${data.limit}`,
method: 'post',
@@ -47,7 +47,7 @@
}
// 获取部门信息
-export function getUsersDept(data: object) {
+export function getUsersDept(data: { offset: number; limit: number }) {
return request({
url: `/meter/organize/listPage?offset=${data.offset}&limit=${data.limit}`,
method: 'post',
@@ -56,7 +56,7 @@
}
// 获取申请列表
-export function getstandardEquipmentApplyList(data: object) {
+export function getstandardEquipmentApplyList(data: { offset: number; limit: number }) {
return request({
url: `/standard/standardEquipmentApplyList?offset=${data.offset}&limit=${data.limit}`,
method: 'post',
diff --git a/src/views/device/deviceMaintenance/checkList_interface.ts b/src/views/device/deviceMaintenance/checkList_interface.ts
index b6f5cf3..fc2cfa7 100644
--- a/src/views/device/deviceMaintenance/checkList_interface.ts
+++ b/src/views/device/deviceMaintenance/checkList_interface.ts
@@ -15,6 +15,7 @@
checkResultName: string
createTime: null | string
createUser: string
+ createUserName: string
fileList: [
{
checkId: string
diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts
index 5ae03f9..28b50ba 100644
--- a/src/api/device/standard.ts
+++ b/src/api/device/standard.ts
@@ -4,7 +4,7 @@
import request from '../index'
const prefix = '/meter'
// 列表查询
-export function getStandardList(data: object) {
+export function getStandardList(data: { offset: number; limit: number }) {
return request({
url: `${prefix}/standard/listPage?offset=${data.offset}&limit=${data.limit}`,
method: 'post',
@@ -47,7 +47,7 @@
}
// 获取部门信息
-export function getUsersDept(data: object) {
+export function getUsersDept(data: { offset: number; limit: number }) {
return request({
url: `/meter/organize/listPage?offset=${data.offset}&limit=${data.limit}`,
method: 'post',
@@ -56,7 +56,7 @@
}
// 获取申请列表
-export function getstandardEquipmentApplyList(data: object) {
+export function getstandardEquipmentApplyList(data: { offset: number; limit: number }) {
return request({
url: `/standard/standardEquipmentApplyList?offset=${data.offset}&limit=${data.limit}`,
method: 'post',
diff --git a/src/views/device/deviceMaintenance/checkList_interface.ts b/src/views/device/deviceMaintenance/checkList_interface.ts
index b6f5cf3..fc2cfa7 100644
--- a/src/views/device/deviceMaintenance/checkList_interface.ts
+++ b/src/views/device/deviceMaintenance/checkList_interface.ts
@@ -15,6 +15,7 @@
checkResultName: string
createTime: null | string
createUser: string
+ createUserName: string
fileList: [
{
checkId: string
diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue
index 0c3445d..5143309 100644
--- a/src/views/device/deviceMaintenance/components/manageAdd.vue
+++ b/src/views/device/deviceMaintenance/components/manageAdd.vue
@@ -13,12 +13,12 @@
import { validatePhone } from '@/utils/validate'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { IAddress } from '@/components/AddressSelect/address-interface'
-import { useUserStore } from '@/store/modules/user'
+import useUserStore from '@/store/modules/user'
const loading = ref(false) // 表单加载状态
const infoId = ref('') // id
const pageType = ref('add') // 页面类型: add,edit, detail
const buttonLoading = ref(false) // 按钮加载状态
-// const { id } = useUserStore()
+const userInfo = useUserStore()
const textMap: { [key: string]: string } = {
edit: '编辑',
add: '新建',
@@ -40,7 +40,8 @@
checkResult: '',
checkResultName: '',
createTime: null,
- createUser: '',
+ createUser: userInfo.id,
+ createUserName: userInfo.username,
fileList: [
{
checkId: '',
@@ -117,9 +118,18 @@
).then(() => {
if (pageType.value === 'add') {
getselectCheckInfo(formInline.value).then((res) => {
- console.log(res)
+ if (res.code === '200') {
+ close()
+ }
})
}
+ else if (pageType.value === 'edit') { // 编辑
+ // getselectCheckInfo(formInline.value).then((res) => {
+ // if (res.code === '200') {
+ // close()
+ // }
+ // })
+ }
})
}
})
@@ -182,9 +192,6 @@
打印
-
提交
@@ -259,7 +266,7 @@
{
if (pageType.value === 'add') {
getselectCheckInfo(formInline.value).then((res) => {
- console.log(res)
+ if (res.code === '200') {
+ close()
+ }
})
}
+ else if (pageType.value === 'edit') { // 编辑
+ // getselectCheckInfo(formInline.value).then((res) => {
+ // if (res.code === '200') {
+ // close()
+ // }
+ // })
+ }
})
}
})
@@ -182,9 +192,6 @@
打印
-
提交
@@ -259,7 +266,7 @@
0) {
- printJSON(list.value, properties, '溯源供方列表')
+ printJSON(list.value, properties, '设备管理点检查列表')
}
else if (checkoutList.value.length > 0) {
const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id))
- printJSON(printList, properties, '溯源供方列表')
+ printJSON(printList, properties, '设备管理点检查列表')
}
else {
ElMessage.warning('无可打印内容')
diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts
index 5ae03f9..28b50ba 100644
--- a/src/api/device/standard.ts
+++ b/src/api/device/standard.ts
@@ -4,7 +4,7 @@
import request from '../index'
const prefix = '/meter'
// 列表查询
-export function getStandardList(data: object) {
+export function getStandardList(data: { offset: number; limit: number }) {
return request({
url: `${prefix}/standard/listPage?offset=${data.offset}&limit=${data.limit}`,
method: 'post',
@@ -47,7 +47,7 @@
}
// 获取部门信息
-export function getUsersDept(data: object) {
+export function getUsersDept(data: { offset: number; limit: number }) {
return request({
url: `/meter/organize/listPage?offset=${data.offset}&limit=${data.limit}`,
method: 'post',
@@ -56,7 +56,7 @@
}
// 获取申请列表
-export function getstandardEquipmentApplyList(data: object) {
+export function getstandardEquipmentApplyList(data: { offset: number; limit: number }) {
return request({
url: `/standard/standardEquipmentApplyList?offset=${data.offset}&limit=${data.limit}`,
method: 'post',
diff --git a/src/views/device/deviceMaintenance/checkList_interface.ts b/src/views/device/deviceMaintenance/checkList_interface.ts
index b6f5cf3..fc2cfa7 100644
--- a/src/views/device/deviceMaintenance/checkList_interface.ts
+++ b/src/views/device/deviceMaintenance/checkList_interface.ts
@@ -15,6 +15,7 @@
checkResultName: string
createTime: null | string
createUser: string
+ createUserName: string
fileList: [
{
checkId: string
diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue
index 0c3445d..5143309 100644
--- a/src/views/device/deviceMaintenance/components/manageAdd.vue
+++ b/src/views/device/deviceMaintenance/components/manageAdd.vue
@@ -13,12 +13,12 @@
import { validatePhone } from '@/utils/validate'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { IAddress } from '@/components/AddressSelect/address-interface'
-import { useUserStore } from '@/store/modules/user'
+import useUserStore from '@/store/modules/user'
const loading = ref(false) // 表单加载状态
const infoId = ref('') // id
const pageType = ref('add') // 页面类型: add,edit, detail
const buttonLoading = ref(false) // 按钮加载状态
-// const { id } = useUserStore()
+const userInfo = useUserStore()
const textMap: { [key: string]: string } = {
edit: '编辑',
add: '新建',
@@ -40,7 +40,8 @@
checkResult: '',
checkResultName: '',
createTime: null,
- createUser: '',
+ createUser: userInfo.id,
+ createUserName: userInfo.username,
fileList: [
{
checkId: '',
@@ -117,9 +118,18 @@
).then(() => {
if (pageType.value === 'add') {
getselectCheckInfo(formInline.value).then((res) => {
- console.log(res)
+ if (res.code === '200') {
+ close()
+ }
})
}
+ else if (pageType.value === 'edit') { // 编辑
+ // getselectCheckInfo(formInline.value).then((res) => {
+ // if (res.code === '200') {
+ // close()
+ // }
+ // })
+ }
})
}
})
@@ -182,9 +192,6 @@
打印
-
提交
@@ -259,7 +266,7 @@
0) {
- printJSON(list.value, properties, '溯源供方列表')
+ printJSON(list.value, properties, '设备管理点检查列表')
}
else if (checkoutList.value.length > 0) {
const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id))
- printJSON(printList, properties, '溯源供方列表')
+ printJSON(printList, properties, '设备管理点检查列表')
}
else {
ElMessage.warning('无可打印内容')
diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue
index 5234d0b..8882124 100644
--- a/src/views/device/standardEquipment/components/listApply/listPage.vue
+++ b/src/views/device/standardEquipment/components/listApply/listPage.vue
@@ -135,7 +135,7 @@
const loadingTable = ref(false)
// 获取部门信息
getUsersDept({
- createTime: '',
+ createTime: null,
director: '',
meterMajor: '',
organizeName: '',
diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts
index 5ae03f9..28b50ba 100644
--- a/src/api/device/standard.ts
+++ b/src/api/device/standard.ts
@@ -4,7 +4,7 @@
import request from '../index'
const prefix = '/meter'
// 列表查询
-export function getStandardList(data: object) {
+export function getStandardList(data: { offset: number; limit: number }) {
return request({
url: `${prefix}/standard/listPage?offset=${data.offset}&limit=${data.limit}`,
method: 'post',
@@ -47,7 +47,7 @@
}
// 获取部门信息
-export function getUsersDept(data: object) {
+export function getUsersDept(data: { offset: number; limit: number }) {
return request({
url: `/meter/organize/listPage?offset=${data.offset}&limit=${data.limit}`,
method: 'post',
@@ -56,7 +56,7 @@
}
// 获取申请列表
-export function getstandardEquipmentApplyList(data: object) {
+export function getstandardEquipmentApplyList(data: { offset: number; limit: number }) {
return request({
url: `/standard/standardEquipmentApplyList?offset=${data.offset}&limit=${data.limit}`,
method: 'post',
diff --git a/src/views/device/deviceMaintenance/checkList_interface.ts b/src/views/device/deviceMaintenance/checkList_interface.ts
index b6f5cf3..fc2cfa7 100644
--- a/src/views/device/deviceMaintenance/checkList_interface.ts
+++ b/src/views/device/deviceMaintenance/checkList_interface.ts
@@ -15,6 +15,7 @@
checkResultName: string
createTime: null | string
createUser: string
+ createUserName: string
fileList: [
{
checkId: string
diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue
index 0c3445d..5143309 100644
--- a/src/views/device/deviceMaintenance/components/manageAdd.vue
+++ b/src/views/device/deviceMaintenance/components/manageAdd.vue
@@ -13,12 +13,12 @@
import { validatePhone } from '@/utils/validate'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { IAddress } from '@/components/AddressSelect/address-interface'
-import { useUserStore } from '@/store/modules/user'
+import useUserStore from '@/store/modules/user'
const loading = ref(false) // 表单加载状态
const infoId = ref('') // id
const pageType = ref('add') // 页面类型: add,edit, detail
const buttonLoading = ref(false) // 按钮加载状态
-// const { id } = useUserStore()
+const userInfo = useUserStore()
const textMap: { [key: string]: string } = {
edit: '编辑',
add: '新建',
@@ -40,7 +40,8 @@
checkResult: '',
checkResultName: '',
createTime: null,
- createUser: '',
+ createUser: userInfo.id,
+ createUserName: userInfo.username,
fileList: [
{
checkId: '',
@@ -117,9 +118,18 @@
).then(() => {
if (pageType.value === 'add') {
getselectCheckInfo(formInline.value).then((res) => {
- console.log(res)
+ if (res.code === '200') {
+ close()
+ }
})
}
+ else if (pageType.value === 'edit') { // 编辑
+ // getselectCheckInfo(formInline.value).then((res) => {
+ // if (res.code === '200') {
+ // close()
+ // }
+ // })
+ }
})
}
})
@@ -182,9 +192,6 @@
打印
-
提交
@@ -259,7 +266,7 @@
0) {
- printJSON(list.value, properties, '溯源供方列表')
+ printJSON(list.value, properties, '设备管理点检查列表')
}
else if (checkoutList.value.length > 0) {
const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id))
- printJSON(printList, properties, '溯源供方列表')
+ printJSON(printList, properties, '设备管理点检查列表')
}
else {
ElMessage.warning('无可打印内容')
diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue
index 5234d0b..8882124 100644
--- a/src/views/device/standardEquipment/components/listApply/listPage.vue
+++ b/src/views/device/standardEquipment/components/listApply/listPage.vue
@@ -135,7 +135,7 @@
const loadingTable = ref(false)
// 获取部门信息
getUsersDept({
- createTime: '',
+ createTime: null,
director: '',
meterMajor: '',
organizeName: '',
diff --git a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue
index c25a836..b397cbb 100644
--- a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue
+++ b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue
@@ -143,7 +143,7 @@
getSelectList('standardCategory') // 获取类别下拉框
// 获取部门信息
getUsersDept({
- createTime: '',
+ createTime: null,
director: '',
meterMajor: '',
organizeName: '',
diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts
index 5ae03f9..28b50ba 100644
--- a/src/api/device/standard.ts
+++ b/src/api/device/standard.ts
@@ -4,7 +4,7 @@
import request from '../index'
const prefix = '/meter'
// 列表查询
-export function getStandardList(data: object) {
+export function getStandardList(data: { offset: number; limit: number }) {
return request({
url: `${prefix}/standard/listPage?offset=${data.offset}&limit=${data.limit}`,
method: 'post',
@@ -47,7 +47,7 @@
}
// 获取部门信息
-export function getUsersDept(data: object) {
+export function getUsersDept(data: { offset: number; limit: number }) {
return request({
url: `/meter/organize/listPage?offset=${data.offset}&limit=${data.limit}`,
method: 'post',
@@ -56,7 +56,7 @@
}
// 获取申请列表
-export function getstandardEquipmentApplyList(data: object) {
+export function getstandardEquipmentApplyList(data: { offset: number; limit: number }) {
return request({
url: `/standard/standardEquipmentApplyList?offset=${data.offset}&limit=${data.limit}`,
method: 'post',
diff --git a/src/views/device/deviceMaintenance/checkList_interface.ts b/src/views/device/deviceMaintenance/checkList_interface.ts
index b6f5cf3..fc2cfa7 100644
--- a/src/views/device/deviceMaintenance/checkList_interface.ts
+++ b/src/views/device/deviceMaintenance/checkList_interface.ts
@@ -15,6 +15,7 @@
checkResultName: string
createTime: null | string
createUser: string
+ createUserName: string
fileList: [
{
checkId: string
diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue
index 0c3445d..5143309 100644
--- a/src/views/device/deviceMaintenance/components/manageAdd.vue
+++ b/src/views/device/deviceMaintenance/components/manageAdd.vue
@@ -13,12 +13,12 @@
import { validatePhone } from '@/utils/validate'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { IAddress } from '@/components/AddressSelect/address-interface'
-import { useUserStore } from '@/store/modules/user'
+import useUserStore from '@/store/modules/user'
const loading = ref(false) // 表单加载状态
const infoId = ref('') // id
const pageType = ref('add') // 页面类型: add,edit, detail
const buttonLoading = ref(false) // 按钮加载状态
-// const { id } = useUserStore()
+const userInfo = useUserStore()
const textMap: { [key: string]: string } = {
edit: '编辑',
add: '新建',
@@ -40,7 +40,8 @@
checkResult: '',
checkResultName: '',
createTime: null,
- createUser: '',
+ createUser: userInfo.id,
+ createUserName: userInfo.username,
fileList: [
{
checkId: '',
@@ -117,9 +118,18 @@
).then(() => {
if (pageType.value === 'add') {
getselectCheckInfo(formInline.value).then((res) => {
- console.log(res)
+ if (res.code === '200') {
+ close()
+ }
})
}
+ else if (pageType.value === 'edit') { // 编辑
+ // getselectCheckInfo(formInline.value).then((res) => {
+ // if (res.code === '200') {
+ // close()
+ // }
+ // })
+ }
})
}
})
@@ -182,9 +192,6 @@
打印
-
提交
@@ -259,7 +266,7 @@
0) {
- printJSON(list.value, properties, '溯源供方列表')
+ printJSON(list.value, properties, '设备管理点检查列表')
}
else if (checkoutList.value.length > 0) {
const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id))
- printJSON(printList, properties, '溯源供方列表')
+ printJSON(printList, properties, '设备管理点检查列表')
}
else {
ElMessage.warning('无可打印内容')
diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue
index 5234d0b..8882124 100644
--- a/src/views/device/standardEquipment/components/listApply/listPage.vue
+++ b/src/views/device/standardEquipment/components/listApply/listPage.vue
@@ -135,7 +135,7 @@
const loadingTable = ref(false)
// 获取部门信息
getUsersDept({
- createTime: '',
+ createTime: null,
director: '',
meterMajor: '',
organizeName: '',
diff --git a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue
index c25a836..b397cbb 100644
--- a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue
+++ b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue
@@ -143,7 +143,7 @@
getSelectList('standardCategory') // 获取类别下拉框
// 获取部门信息
getUsersDept({
- createTime: '',
+ createTime: null,
director: '',
meterMajor: '',
organizeName: '',
diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
index a75d816..fb10946 100644
--- a/src/views/device/standardEquipment/components/standardList/baseInfo.vue
+++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
@@ -98,7 +98,7 @@
getSelectList('standardCategory') // 获取类别下拉框
// 获取部门信息
getUsersDept({
- createTime: '',
+ createTime: null,
director: '',
meterMajor: '',
organizeName: '',
@@ -259,7 +259,7 @@
@@ -269,7 +269,7 @@
@@ -279,7 +279,7 @@
@@ -291,7 +291,7 @@
@@ -304,7 +304,7 @@
>
@@ -315,7 +315,7 @@
@@ -346,7 +346,7 @@
@@ -415,7 +415,7 @@
@@ -458,7 +458,7 @@
@@ -471,7 +471,7 @@
@@ -520,7 +520,7 @@
v-model="formInline.assessDate"
type="datetime"
style="width: 100%;"
- placeholder="请选择考核日期"
+ :placeholder="buttonType === 'detail' ? '' : '请选择考核日期'"
format="YYYY/MM/DD HH:mm:ss"
value-format="YYYY-MM-DD h:m:s"
:disabled="buttonType === 'detail'"
@@ -534,7 +534,7 @@
@@ -545,7 +545,7 @@
@@ -560,7 +560,7 @@
@@ -569,7 +569,7 @@
@@ -581,7 +581,7 @@
diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts
index 5ae03f9..28b50ba 100644
--- a/src/api/device/standard.ts
+++ b/src/api/device/standard.ts
@@ -4,7 +4,7 @@
import request from '../index'
const prefix = '/meter'
// 列表查询
-export function getStandardList(data: object) {
+export function getStandardList(data: { offset: number; limit: number }) {
return request({
url: `${prefix}/standard/listPage?offset=${data.offset}&limit=${data.limit}`,
method: 'post',
@@ -47,7 +47,7 @@
}
// 获取部门信息
-export function getUsersDept(data: object) {
+export function getUsersDept(data: { offset: number; limit: number }) {
return request({
url: `/meter/organize/listPage?offset=${data.offset}&limit=${data.limit}`,
method: 'post',
@@ -56,7 +56,7 @@
}
// 获取申请列表
-export function getstandardEquipmentApplyList(data: object) {
+export function getstandardEquipmentApplyList(data: { offset: number; limit: number }) {
return request({
url: `/standard/standardEquipmentApplyList?offset=${data.offset}&limit=${data.limit}`,
method: 'post',
diff --git a/src/views/device/deviceMaintenance/checkList_interface.ts b/src/views/device/deviceMaintenance/checkList_interface.ts
index b6f5cf3..fc2cfa7 100644
--- a/src/views/device/deviceMaintenance/checkList_interface.ts
+++ b/src/views/device/deviceMaintenance/checkList_interface.ts
@@ -15,6 +15,7 @@
checkResultName: string
createTime: null | string
createUser: string
+ createUserName: string
fileList: [
{
checkId: string
diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue
index 0c3445d..5143309 100644
--- a/src/views/device/deviceMaintenance/components/manageAdd.vue
+++ b/src/views/device/deviceMaintenance/components/manageAdd.vue
@@ -13,12 +13,12 @@
import { validatePhone } from '@/utils/validate'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { IAddress } from '@/components/AddressSelect/address-interface'
-import { useUserStore } from '@/store/modules/user'
+import useUserStore from '@/store/modules/user'
const loading = ref(false) // 表单加载状态
const infoId = ref('') // id
const pageType = ref('add') // 页面类型: add,edit, detail
const buttonLoading = ref(false) // 按钮加载状态
-// const { id } = useUserStore()
+const userInfo = useUserStore()
const textMap: { [key: string]: string } = {
edit: '编辑',
add: '新建',
@@ -40,7 +40,8 @@
checkResult: '',
checkResultName: '',
createTime: null,
- createUser: '',
+ createUser: userInfo.id,
+ createUserName: userInfo.username,
fileList: [
{
checkId: '',
@@ -117,9 +118,18 @@
).then(() => {
if (pageType.value === 'add') {
getselectCheckInfo(formInline.value).then((res) => {
- console.log(res)
+ if (res.code === '200') {
+ close()
+ }
})
}
+ else if (pageType.value === 'edit') { // 编辑
+ // getselectCheckInfo(formInline.value).then((res) => {
+ // if (res.code === '200') {
+ // close()
+ // }
+ // })
+ }
})
}
})
@@ -182,9 +192,6 @@
打印
-
提交
@@ -259,7 +266,7 @@
0) {
- printJSON(list.value, properties, '溯源供方列表')
+ printJSON(list.value, properties, '设备管理点检查列表')
}
else if (checkoutList.value.length > 0) {
const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id))
- printJSON(printList, properties, '溯源供方列表')
+ printJSON(printList, properties, '设备管理点检查列表')
}
else {
ElMessage.warning('无可打印内容')
diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue
index 5234d0b..8882124 100644
--- a/src/views/device/standardEquipment/components/listApply/listPage.vue
+++ b/src/views/device/standardEquipment/components/listApply/listPage.vue
@@ -135,7 +135,7 @@
const loadingTable = ref(false)
// 获取部门信息
getUsersDept({
- createTime: '',
+ createTime: null,
director: '',
meterMajor: '',
organizeName: '',
diff --git a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue
index c25a836..b397cbb 100644
--- a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue
+++ b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue
@@ -143,7 +143,7 @@
getSelectList('standardCategory') // 获取类别下拉框
// 获取部门信息
getUsersDept({
- createTime: '',
+ createTime: null,
director: '',
meterMajor: '',
organizeName: '',
diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
index a75d816..fb10946 100644
--- a/src/views/device/standardEquipment/components/standardList/baseInfo.vue
+++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
@@ -98,7 +98,7 @@
getSelectList('standardCategory') // 获取类别下拉框
// 获取部门信息
getUsersDept({
- createTime: '',
+ createTime: null,
director: '',
meterMajor: '',
organizeName: '',
@@ -259,7 +259,7 @@
@@ -269,7 +269,7 @@
@@ -279,7 +279,7 @@
@@ -291,7 +291,7 @@
@@ -304,7 +304,7 @@
>
@@ -315,7 +315,7 @@
@@ -346,7 +346,7 @@
@@ -415,7 +415,7 @@
@@ -458,7 +458,7 @@
@@ -471,7 +471,7 @@
@@ -520,7 +520,7 @@
v-model="formInline.assessDate"
type="datetime"
style="width: 100%;"
- placeholder="请选择考核日期"
+ :placeholder="buttonType === 'detail' ? '' : '请选择考核日期'"
format="YYYY/MM/DD HH:mm:ss"
value-format="YYYY-MM-DD h:m:s"
:disabled="buttonType === 'detail'"
@@ -534,7 +534,7 @@
@@ -545,7 +545,7 @@
@@ -560,7 +560,7 @@
@@ -569,7 +569,7 @@
@@ -581,7 +581,7 @@
diff --git a/src/views/device/standardEquipment/components/standardList/templateTable.vue b/src/views/device/standardEquipment/components/standardList/templateTable.vue
index 79cc061..c378549 100644
--- a/src/views/device/standardEquipment/components/standardList/templateTable.vue
+++ b/src/views/device/standardEquipment/components/standardList/templateTable.vue
@@ -20,13 +20,21 @@
type: Number,
default: 0,
},
+ buttonType: { // 控制增加行按钮是否显示
+ type: String,
+ default: '',
+ },
+ title: { // 控制增加行按钮是否显示
+ type: String,
+ default: '',
+ },
})
-const emits = defineEmits(['changePage'])
+const emits = defineEmits(['changePage', 'addRow', 'deleteRow', 'handleSelectionChange', 'selectPerson'])
const searchQuery = ref({
limit: 10,
offset: 1,
})
-console.log(props.list, '6666')
+
// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写
const changePage = (val: { size?: number; page?: number }) => {
if (val && val.size) {
@@ -37,16 +45,60 @@
}
emits('changePage', searchQuery)
}
+// 点击增加行
+const addRow = () => {
+ emits('addRow')
+}
+// 点击删除行
+const deleteRow = () => {
+ emits('deleteRow', props.title)
+}
+// 多选发生改变
+const handleSelectionChange = (object: object[]) => {
+ emits('handleSelectionChange', object, props.title)
+}
+// 点击选择的时候
+const selectPerson = (index: string, text: string) => {
+ emits('selectPerson', index, text)
+}
-
-
-
+
+
+
+ 删除行
+
+
+ 增加行
+
+
+
+
+
+
+
+ *{{ item.text }}
+
+
+
+
+
+ 选择
+
+
+
+
+
+
+
+
+
+
diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts
index 5ae03f9..28b50ba 100644
--- a/src/api/device/standard.ts
+++ b/src/api/device/standard.ts
@@ -4,7 +4,7 @@
import request from '../index'
const prefix = '/meter'
// 列表查询
-export function getStandardList(data: object) {
+export function getStandardList(data: { offset: number; limit: number }) {
return request({
url: `${prefix}/standard/listPage?offset=${data.offset}&limit=${data.limit}`,
method: 'post',
@@ -47,7 +47,7 @@
}
// 获取部门信息
-export function getUsersDept(data: object) {
+export function getUsersDept(data: { offset: number; limit: number }) {
return request({
url: `/meter/organize/listPage?offset=${data.offset}&limit=${data.limit}`,
method: 'post',
@@ -56,7 +56,7 @@
}
// 获取申请列表
-export function getstandardEquipmentApplyList(data: object) {
+export function getstandardEquipmentApplyList(data: { offset: number; limit: number }) {
return request({
url: `/standard/standardEquipmentApplyList?offset=${data.offset}&limit=${data.limit}`,
method: 'post',
diff --git a/src/views/device/deviceMaintenance/checkList_interface.ts b/src/views/device/deviceMaintenance/checkList_interface.ts
index b6f5cf3..fc2cfa7 100644
--- a/src/views/device/deviceMaintenance/checkList_interface.ts
+++ b/src/views/device/deviceMaintenance/checkList_interface.ts
@@ -15,6 +15,7 @@
checkResultName: string
createTime: null | string
createUser: string
+ createUserName: string
fileList: [
{
checkId: string
diff --git a/src/views/device/deviceMaintenance/components/manageAdd.vue b/src/views/device/deviceMaintenance/components/manageAdd.vue
index 0c3445d..5143309 100644
--- a/src/views/device/deviceMaintenance/components/manageAdd.vue
+++ b/src/views/device/deviceMaintenance/components/manageAdd.vue
@@ -13,12 +13,12 @@
import { validatePhone } from '@/utils/validate'
import { SCHEDULE } from '@/utils/scheduleDict'
import type { IAddress } from '@/components/AddressSelect/address-interface'
-import { useUserStore } from '@/store/modules/user'
+import useUserStore from '@/store/modules/user'
const loading = ref(false) // 表单加载状态
const infoId = ref('') // id
const pageType = ref('add') // 页面类型: add,edit, detail
const buttonLoading = ref(false) // 按钮加载状态
-// const { id } = useUserStore()
+const userInfo = useUserStore()
const textMap: { [key: string]: string } = {
edit: '编辑',
add: '新建',
@@ -40,7 +40,8 @@
checkResult: '',
checkResultName: '',
createTime: null,
- createUser: '',
+ createUser: userInfo.id,
+ createUserName: userInfo.username,
fileList: [
{
checkId: '',
@@ -117,9 +118,18 @@
).then(() => {
if (pageType.value === 'add') {
getselectCheckInfo(formInline.value).then((res) => {
- console.log(res)
+ if (res.code === '200') {
+ close()
+ }
})
}
+ else if (pageType.value === 'edit') { // 编辑
+ // getselectCheckInfo(formInline.value).then((res) => {
+ // if (res.code === '200') {
+ // close()
+ // }
+ // })
+ }
})
}
})
@@ -182,9 +192,6 @@
打印
-
提交
@@ -259,7 +266,7 @@
0) {
- printJSON(list.value, properties, '溯源供方列表')
+ printJSON(list.value, properties, '设备管理点检查列表')
}
else if (checkoutList.value.length > 0) {
const printList = list.value.filter((item: ISupplier) => checkoutList.value.includes(item.id))
- printJSON(printList, properties, '溯源供方列表')
+ printJSON(printList, properties, '设备管理点检查列表')
}
else {
ElMessage.warning('无可打印内容')
diff --git a/src/views/device/standardEquipment/components/listApply/listPage.vue b/src/views/device/standardEquipment/components/listApply/listPage.vue
index 5234d0b..8882124 100644
--- a/src/views/device/standardEquipment/components/listApply/listPage.vue
+++ b/src/views/device/standardEquipment/components/listApply/listPage.vue
@@ -135,7 +135,7 @@
const loadingTable = ref(false)
// 获取部门信息
getUsersDept({
- createTime: '',
+ createTime: null,
director: '',
meterMajor: '',
organizeName: '',
diff --git a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue
index c25a836..b397cbb 100644
--- a/src/views/device/standardEquipment/components/listApply/listPageAdd.vue
+++ b/src/views/device/standardEquipment/components/listApply/listPageAdd.vue
@@ -143,7 +143,7 @@
getSelectList('standardCategory') // 获取类别下拉框
// 获取部门信息
getUsersDept({
- createTime: '',
+ createTime: null,
director: '',
meterMajor: '',
organizeName: '',
diff --git a/src/views/device/standardEquipment/components/standardList/baseInfo.vue b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
index a75d816..fb10946 100644
--- a/src/views/device/standardEquipment/components/standardList/baseInfo.vue
+++ b/src/views/device/standardEquipment/components/standardList/baseInfo.vue
@@ -98,7 +98,7 @@
getSelectList('standardCategory') // 获取类别下拉框
// 获取部门信息
getUsersDept({
- createTime: '',
+ createTime: null,
director: '',
meterMajor: '',
organizeName: '',
@@ -259,7 +259,7 @@
@@ -269,7 +269,7 @@
@@ -279,7 +279,7 @@
@@ -291,7 +291,7 @@
@@ -304,7 +304,7 @@
>
@@ -315,7 +315,7 @@
@@ -346,7 +346,7 @@
@@ -415,7 +415,7 @@
@@ -458,7 +458,7 @@
@@ -471,7 +471,7 @@
@@ -520,7 +520,7 @@
v-model="formInline.assessDate"
type="datetime"
style="width: 100%;"
- placeholder="请选择考核日期"
+ :placeholder="buttonType === 'detail' ? '' : '请选择考核日期'"
format="YYYY/MM/DD HH:mm:ss"
value-format="YYYY-MM-DD h:m:s"
:disabled="buttonType === 'detail'"
@@ -534,7 +534,7 @@
@@ -545,7 +545,7 @@
@@ -560,7 +560,7 @@
@@ -569,7 +569,7 @@
@@ -581,7 +581,7 @@
diff --git a/src/views/device/standardEquipment/components/standardList/templateTable.vue b/src/views/device/standardEquipment/components/standardList/templateTable.vue
index 79cc061..c378549 100644
--- a/src/views/device/standardEquipment/components/standardList/templateTable.vue
+++ b/src/views/device/standardEquipment/components/standardList/templateTable.vue
@@ -20,13 +20,21 @@
type: Number,
default: 0,
},
+ buttonType: { // 控制增加行按钮是否显示
+ type: String,
+ default: '',
+ },
+ title: { // 控制增加行按钮是否显示
+ type: String,
+ default: '',
+ },
})
-const emits = defineEmits(['changePage'])
+const emits = defineEmits(['changePage', 'addRow', 'deleteRow', 'handleSelectionChange', 'selectPerson'])
const searchQuery = ref({
limit: 10,
offset: 1,
})
-console.log(props.list, '6666')
+
// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写
const changePage = (val: { size?: number; page?: number }) => {
if (val && val.size) {
@@ -37,16 +45,60 @@
}
emits('changePage', searchQuery)
}
+// 点击增加行
+const addRow = () => {
+ emits('addRow')
+}
+// 点击删除行
+const deleteRow = () => {
+ emits('deleteRow', props.title)
+}
+// 多选发生改变
+const handleSelectionChange = (object: object[]) => {
+ emits('handleSelectionChange', object, props.title)
+}
+// 点击选择的时候
+const selectPerson = (index: string, text: string) => {
+ emits('selectPerson', index, text)
+}
-
-
-
+
+
+
+ 删除行
+
+
+ 增加行
+
+
+
+
+
+
+
+ *{{ item.text }}
+
+
+
+
+
+ 选择
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/device/standardEquipment/components/standardListAdd.vue b/src/views/device/standardEquipment/components/standardListAdd.vue
index bcdcf3b..f04e55b 100644
--- a/src/views/device/standardEquipment/components/standardListAdd.vue
+++ b/src/views/device/standardEquipment/components/standardListAdd.vue
@@ -5,6 +5,7 @@
import type { IOptions } from '../standard_interface'
import baseInfo from './standardList/baseInfo.vue'
import TemplateTable from './standardList/templateTable.vue'
+import userListDialog from '@/views/measure/person/components/userListDialog.vue'
import { getStaffList } from '@/api/measure/person'
import { getTypeSelect } from '@/api/system/price'
import { getStandardLisUpdate, getStandardListAdd, getStandardListDetail, getUsersDept } from '@/api/device/standard'
@@ -80,7 +81,7 @@
const measurementPersonnelColumns = ref([
{ text: '姓名', value: 'name', align: 'center' },
{ text: '计量人员编号', value: 'staffNo', align: 'center' },
- { text: '工作部门', value: 'deptId', align: 'center' },
+ { text: '工作部门', value: 'deptName', align: 'center' },
{ text: '计量专业', value: 'major', align: 'center' },
{ text: '证书编号', value: 'verifierCertificateNo', align: 'center' },
{ text: '证书有效期', value: 'certificateDate', align: 'center' },
@@ -232,6 +233,81 @@
})
})
}
+const measurementPersonnelSelectionList = ref