diff --git a/.env.development b/.env.development index 95707e0..ad705fc 100644 --- a/.env.development +++ b/.env.development @@ -3,10 +3,10 @@ VITE_SYS_TITLE = 受检设备管理系统 # 接口请求地址,会设置到 axios 的 baseURL 参数上 # VITE_APP_API_BASEURL = http://139.198.29.133:8089 -VITE_APP_API_BASEURL = http://192.168.8.102:5909 +VITE_APP_API_BASEURL = http://111.198.10.15:21611 # VITE_APP_API_BASEURL = http://192.168.8.100:5909 # VITE_METER_API_BASEURL = http://111.198.10.15:21606 -VITE_METER_API_BASEURL = http://192.168.8.102:5909 +VITE_METER_API_BASEURL = http://111.198.10.15:21606 # VITE_APP_API_BASEURL = http://111.198.10.15:21611 # VITE_APP_API_BASEURL = http://192.168.8.107:5909 # VITE_APP_API_BASEURL = http://111.198.10.15:21710 diff --git a/.env.development b/.env.development index 95707e0..ad705fc 100644 --- a/.env.development +++ b/.env.development @@ -3,10 +3,10 @@ VITE_SYS_TITLE = 受检设备管理系统 # 接口请求地址,会设置到 axios 的 baseURL 参数上 # VITE_APP_API_BASEURL = http://139.198.29.133:8089 -VITE_APP_API_BASEURL = http://192.168.8.102:5909 +VITE_APP_API_BASEURL = http://111.198.10.15:21611 # VITE_APP_API_BASEURL = http://192.168.8.100:5909 # VITE_METER_API_BASEURL = http://111.198.10.15:21606 -VITE_METER_API_BASEURL = http://192.168.8.102:5909 +VITE_METER_API_BASEURL = http://111.198.10.15:21606 # VITE_APP_API_BASEURL = http://111.198.10.15:21611 # VITE_APP_API_BASEURL = http://192.168.8.107:5909 # VITE_APP_API_BASEURL = http://111.198.10.15:21710 diff --git a/src/api/eqpt/device/group.ts b/src/api/eqpt/device/group.ts index d534327..d2c2999 100644 --- a/src/api/eqpt/device/group.ts +++ b/src/api/eqpt/device/group.ts @@ -3,11 +3,11 @@ */ import request from '@/api/index' // 分组列表 -export function getGroupList(params: object) { +export function getGroupList(params: any) { return request({ - url: '/equipment/group/listPage', - method: 'get', - params, + url: `/equipment/group/listPage?limit=${params.limit}&offset=${params.offset}`, + method: 'post', + data: params, }) } // 编辑 diff --git a/.env.development b/.env.development index 95707e0..ad705fc 100644 --- a/.env.development +++ b/.env.development @@ -3,10 +3,10 @@ VITE_SYS_TITLE = 受检设备管理系统 # 接口请求地址,会设置到 axios 的 baseURL 参数上 # VITE_APP_API_BASEURL = http://139.198.29.133:8089 -VITE_APP_API_BASEURL = http://192.168.8.102:5909 +VITE_APP_API_BASEURL = http://111.198.10.15:21611 # VITE_APP_API_BASEURL = http://192.168.8.100:5909 # VITE_METER_API_BASEURL = http://111.198.10.15:21606 -VITE_METER_API_BASEURL = http://192.168.8.102:5909 +VITE_METER_API_BASEURL = http://111.198.10.15:21606 # VITE_APP_API_BASEURL = http://111.198.10.15:21611 # VITE_APP_API_BASEURL = http://192.168.8.107:5909 # VITE_APP_API_BASEURL = http://111.198.10.15:21710 diff --git a/src/api/eqpt/device/group.ts b/src/api/eqpt/device/group.ts index d534327..d2c2999 100644 --- a/src/api/eqpt/device/group.ts +++ b/src/api/eqpt/device/group.ts @@ -3,11 +3,11 @@ */ import request from '@/api/index' // 分组列表 -export function getGroupList(params: object) { +export function getGroupList(params: any) { return request({ - url: '/equipment/group/listPage', - method: 'get', - params, + url: `/equipment/group/listPage?limit=${params.limit}&offset=${params.offset}`, + method: 'post', + data: params, }) } // 编辑 diff --git a/src/api/eqpt/device/info.ts b/src/api/eqpt/device/info.ts index a46fd4c..3c33423 100644 --- a/src/api/eqpt/device/info.ts +++ b/src/api/eqpt/device/info.ts @@ -161,3 +161,19 @@ data, }) } +// 获取检定去向 +export function defaultCheckDestination(data: object) { + return request({ + url: '/equipment/model/defaultCheckDestination', + method: 'get', + params: data, + }) +} +// 编辑 -计量室 - 直接保存 +export function editInfoNoApproval(data: object) { + return request({ + url: '/equipment/info/update', + method: 'post', + data, + }) +} diff --git a/.env.development b/.env.development index 95707e0..ad705fc 100644 --- a/.env.development +++ b/.env.development @@ -3,10 +3,10 @@ VITE_SYS_TITLE = 受检设备管理系统 # 接口请求地址,会设置到 axios 的 baseURL 参数上 # VITE_APP_API_BASEURL = http://139.198.29.133:8089 -VITE_APP_API_BASEURL = http://192.168.8.102:5909 +VITE_APP_API_BASEURL = http://111.198.10.15:21611 # VITE_APP_API_BASEURL = http://192.168.8.100:5909 # VITE_METER_API_BASEURL = http://111.198.10.15:21606 -VITE_METER_API_BASEURL = http://192.168.8.102:5909 +VITE_METER_API_BASEURL = http://111.198.10.15:21606 # VITE_APP_API_BASEURL = http://111.198.10.15:21611 # VITE_APP_API_BASEURL = http://192.168.8.107:5909 # VITE_APP_API_BASEURL = http://111.198.10.15:21710 diff --git a/src/api/eqpt/device/group.ts b/src/api/eqpt/device/group.ts index d534327..d2c2999 100644 --- a/src/api/eqpt/device/group.ts +++ b/src/api/eqpt/device/group.ts @@ -3,11 +3,11 @@ */ import request from '@/api/index' // 分组列表 -export function getGroupList(params: object) { +export function getGroupList(params: any) { return request({ - url: '/equipment/group/listPage', - method: 'get', - params, + url: `/equipment/group/listPage?limit=${params.limit}&offset=${params.offset}`, + method: 'post', + data: params, }) } // 编辑 diff --git a/src/api/eqpt/device/info.ts b/src/api/eqpt/device/info.ts index a46fd4c..3c33423 100644 --- a/src/api/eqpt/device/info.ts +++ b/src/api/eqpt/device/info.ts @@ -161,3 +161,19 @@ data, }) } +// 获取检定去向 +export function defaultCheckDestination(data: object) { + return request({ + url: '/equipment/model/defaultCheckDestination', + method: 'get', + params: data, + }) +} +// 编辑 -计量室 - 直接保存 +export function editInfoNoApproval(data: object) { + return request({ + url: '/equipment/info/update', + method: 'post', + data, + }) +} diff --git a/src/api/system/dept.ts b/src/api/system/dept.ts index 64fd8c5..8474420 100644 --- a/src/api/system/dept.ts +++ b/src/api/system/dept.ts @@ -13,7 +13,7 @@ }) } // 组织机构树列表 -export function getDeptTreeList(params?: { deptType: string }) { +export function getDeptTreeList(params?: any) { return request1({ url: `${prefix}/dept/tree`, method: 'get', diff --git a/.env.development b/.env.development index 95707e0..ad705fc 100644 --- a/.env.development +++ b/.env.development @@ -3,10 +3,10 @@ VITE_SYS_TITLE = 受检设备管理系统 # 接口请求地址,会设置到 axios 的 baseURL 参数上 # VITE_APP_API_BASEURL = http://139.198.29.133:8089 -VITE_APP_API_BASEURL = http://192.168.8.102:5909 +VITE_APP_API_BASEURL = http://111.198.10.15:21611 # VITE_APP_API_BASEURL = http://192.168.8.100:5909 # VITE_METER_API_BASEURL = http://111.198.10.15:21606 -VITE_METER_API_BASEURL = http://192.168.8.102:5909 +VITE_METER_API_BASEURL = http://111.198.10.15:21606 # VITE_APP_API_BASEURL = http://111.198.10.15:21611 # VITE_APP_API_BASEURL = http://192.168.8.107:5909 # VITE_APP_API_BASEURL = http://111.198.10.15:21710 diff --git a/src/api/eqpt/device/group.ts b/src/api/eqpt/device/group.ts index d534327..d2c2999 100644 --- a/src/api/eqpt/device/group.ts +++ b/src/api/eqpt/device/group.ts @@ -3,11 +3,11 @@ */ import request from '@/api/index' // 分组列表 -export function getGroupList(params: object) { +export function getGroupList(params: any) { return request({ - url: '/equipment/group/listPage', - method: 'get', - params, + url: `/equipment/group/listPage?limit=${params.limit}&offset=${params.offset}`, + method: 'post', + data: params, }) } // 编辑 diff --git a/src/api/eqpt/device/info.ts b/src/api/eqpt/device/info.ts index a46fd4c..3c33423 100644 --- a/src/api/eqpt/device/info.ts +++ b/src/api/eqpt/device/info.ts @@ -161,3 +161,19 @@ data, }) } +// 获取检定去向 +export function defaultCheckDestination(data: object) { + return request({ + url: '/equipment/model/defaultCheckDestination', + method: 'get', + params: data, + }) +} +// 编辑 -计量室 - 直接保存 +export function editInfoNoApproval(data: object) { + return request({ + url: '/equipment/info/update', + method: 'post', + data, + }) +} diff --git a/src/api/system/dept.ts b/src/api/system/dept.ts index 64fd8c5..8474420 100644 --- a/src/api/system/dept.ts +++ b/src/api/system/dept.ts @@ -13,7 +13,7 @@ }) } // 组织机构树列表 -export function getDeptTreeList(params?: { deptType: string }) { +export function getDeptTreeList(params?: any) { return request1({ url: `${prefix}/dept/tree`, method: 'get', diff --git a/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue b/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue index ac3c413..4cdf591 100644 --- a/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue +++ b/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue @@ -5,8 +5,10 @@ import { getDictByCode } from '@/api/system/dict' import { getInfoListPage } from '@/api/eqpt/device/info' import { getDeptTreeList } from '@/api/system/dept' +import useUserStore from '@/store/modules/user' import { toTreeList } from '@/utils/structure' const emits = defineEmits(['add']) +const userStore = useUserStore() const dialogFormVisible = ref(false) // 查询条件 const listQuery = ref({ @@ -17,9 +19,20 @@ deptIds: '', // 使用部门 certificateValidStart: '', certificateValidEnd: '', + directorId: userStore.id, limit: 5, offset: 1, }) +// 我负责的 +const checked = ref(true) +watch(() => checked.value, (newVal) => { + if (newVal) { + listQuery.value.directorId = userStore.id + } + else { + listQuery.value.directorId = '' + } +}) const loadingTable = ref(false) const list = ref([]) // 表格数据 const total = ref(0) @@ -119,9 +132,11 @@ deptIds: '', // 使用部门 certificateValidStart: '', certificateValidEnd: '', + directorId: userStore.id, limit: 5, offset: 1, } + checked.value = true search() } // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 @@ -219,6 +234,11 @@ format="YYYY-MM-DD" range-separator="至" start-placeholder="证书有效期开始时间" end-placeholder="证书有效期结束时间" /> + + + 只看我负责的 + +
diff --git a/.env.development b/.env.development index 95707e0..ad705fc 100644 --- a/.env.development +++ b/.env.development @@ -3,10 +3,10 @@ VITE_SYS_TITLE = 受检设备管理系统 # 接口请求地址,会设置到 axios 的 baseURL 参数上 # VITE_APP_API_BASEURL = http://139.198.29.133:8089 -VITE_APP_API_BASEURL = http://192.168.8.102:5909 +VITE_APP_API_BASEURL = http://111.198.10.15:21611 # VITE_APP_API_BASEURL = http://192.168.8.100:5909 # VITE_METER_API_BASEURL = http://111.198.10.15:21606 -VITE_METER_API_BASEURL = http://192.168.8.102:5909 +VITE_METER_API_BASEURL = http://111.198.10.15:21606 # VITE_APP_API_BASEURL = http://111.198.10.15:21611 # VITE_APP_API_BASEURL = http://192.168.8.107:5909 # VITE_APP_API_BASEURL = http://111.198.10.15:21710 diff --git a/src/api/eqpt/device/group.ts b/src/api/eqpt/device/group.ts index d534327..d2c2999 100644 --- a/src/api/eqpt/device/group.ts +++ b/src/api/eqpt/device/group.ts @@ -3,11 +3,11 @@ */ import request from '@/api/index' // 分组列表 -export function getGroupList(params: object) { +export function getGroupList(params: any) { return request({ - url: '/equipment/group/listPage', - method: 'get', - params, + url: `/equipment/group/listPage?limit=${params.limit}&offset=${params.offset}`, + method: 'post', + data: params, }) } // 编辑 diff --git a/src/api/eqpt/device/info.ts b/src/api/eqpt/device/info.ts index a46fd4c..3c33423 100644 --- a/src/api/eqpt/device/info.ts +++ b/src/api/eqpt/device/info.ts @@ -161,3 +161,19 @@ data, }) } +// 获取检定去向 +export function defaultCheckDestination(data: object) { + return request({ + url: '/equipment/model/defaultCheckDestination', + method: 'get', + params: data, + }) +} +// 编辑 -计量室 - 直接保存 +export function editInfoNoApproval(data: object) { + return request({ + url: '/equipment/info/update', + method: 'post', + data, + }) +} diff --git a/src/api/system/dept.ts b/src/api/system/dept.ts index 64fd8c5..8474420 100644 --- a/src/api/system/dept.ts +++ b/src/api/system/dept.ts @@ -13,7 +13,7 @@ }) } // 组织机构树列表 -export function getDeptTreeList(params?: { deptType: string }) { +export function getDeptTreeList(params?: any) { return request1({ url: `${prefix}/dept/tree`, method: 'get', diff --git a/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue b/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue index ac3c413..4cdf591 100644 --- a/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue +++ b/src/views/tested/MeasurementPlan/plan/components/selectDevice.vue @@ -5,8 +5,10 @@ import { getDictByCode } from '@/api/system/dict' import { getInfoListPage } from '@/api/eqpt/device/info' import { getDeptTreeList } from '@/api/system/dept' +import useUserStore from '@/store/modules/user' import { toTreeList } from '@/utils/structure' const emits = defineEmits(['add']) +const userStore = useUserStore() const dialogFormVisible = ref(false) // 查询条件 const listQuery = ref({ @@ -17,9 +19,20 @@ deptIds: '', // 使用部门 certificateValidStart: '', certificateValidEnd: '', + directorId: userStore.id, limit: 5, offset: 1, }) +// 我负责的 +const checked = ref(true) +watch(() => checked.value, (newVal) => { + if (newVal) { + listQuery.value.directorId = userStore.id + } + else { + listQuery.value.directorId = '' + } +}) const loadingTable = ref(false) const list = ref([]) // 表格数据 const total = ref(0) @@ -119,9 +132,11 @@ deptIds: '', // 使用部门 certificateValidStart: '', certificateValidEnd: '', + directorId: userStore.id, limit: 5, offset: 1, } + checked.value = true search() } // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 @@ -219,6 +234,11 @@ format="YYYY-MM-DD" range-separator="至" start-placeholder="证书有效期开始时间" end-placeholder="证书有效期结束时间" /> + + + 只看我负责的 + +
diff --git a/src/views/tested/device/group/components/edit.vue b/src/views/tested/device/group/components/edit.vue index a9e83f8..285a137 100644 --- a/src/views/tested/device/group/components/edit.vue +++ b/src/views/tested/device/group/components/edit.vue @@ -4,6 +4,7 @@ import { ElLoading, ElMessage, ElMessageBox } from 'element-plus' import dayjs from 'dayjs' import tableList from './tableList.vue' +import { getPostList } from '@/api/system/post' import { addGroup, detailGroup, updateGroup } from '@/api/eqpt/device/group' import { getDictByCode } from '@/api/system/dict' import useUserStore from '@/store/modules/user' @@ -31,11 +32,13 @@ id: '', updateTime: '', remark: '', + positionId: '', }, }) // 表单 const rules = ref({ groupName: [{ required: true, message: '分组名称必填', trigger: 'blur' }], remark: [{ required: true, message: '备注必填', trigger: 'blur' }], + positionId: [{ required: true, message: '使用岗位必选', trigger: 'blur' }], }) // 表单验证规则 // 弹窗初始化 const initDialog = () => { @@ -102,6 +105,16 @@ formEl?.resetFields() close() } +// 使用岗位 +const usePositionList = ref([]) +// 获取字典 +const fetchDict = () => { + // 使用岗位 + getPostList({}).then((res) => { + usePositionList.value = res.data + }) +} +fetchDict()