diff --git a/.env.development b/.env.development index debe1a8..f2fee42 100644 --- a/.env.development +++ b/.env.development @@ -4,7 +4,7 @@ # 接口请求地址,会设置到 axios 的 baseURL 参数上 # VITE_APP_API_BASEURL = http://139.198.29.133:8089 # VITE_APP_API_BASEURL = http://111.198.10.15:21611 -VITE_APP_API_BASEURL = http://127.0.0.1:5909 +VITE_APP_API_BASEURL = http://192.168.8.101:5909 # 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 debe1a8..f2fee42 100644 --- a/.env.development +++ b/.env.development @@ -4,7 +4,7 @@ # 接口请求地址,会设置到 axios 的 baseURL 参数上 # VITE_APP_API_BASEURL = http://139.198.29.133:8089 # VITE_APP_API_BASEURL = http://111.198.10.15:21611 -VITE_APP_API_BASEURL = http://127.0.0.1:5909 +VITE_APP_API_BASEURL = http://192.168.8.101:5909 # 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/public/config/config.json b/public/config/config.json index 3bd0a89..313fcf7 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,4 +1,4 @@ { "title":"计量业务系统", - "baseUrl": "http://111.198.10.15:21611" + "baseUrl": "http://192.168.8.101:5909" } diff --git a/.env.development b/.env.development index debe1a8..f2fee42 100644 --- a/.env.development +++ b/.env.development @@ -4,7 +4,7 @@ # 接口请求地址,会设置到 axios 的 baseURL 参数上 # VITE_APP_API_BASEURL = http://139.198.29.133:8089 # VITE_APP_API_BASEURL = http://111.198.10.15:21611 -VITE_APP_API_BASEURL = http://127.0.0.1:5909 +VITE_APP_API_BASEURL = http://192.168.8.101:5909 # 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/public/config/config.json b/public/config/config.json index 3bd0a89..313fcf7 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,4 +1,4 @@ { "title":"计量业务系统", - "baseUrl": "http://111.198.10.15:21611" + "baseUrl": "http://192.168.8.101:5909" } diff --git a/src/api/eqpt/device/model.ts b/src/api/eqpt/device/model.ts new file mode 100644 index 0000000..a8fa0f1 --- /dev/null +++ b/src/api/eqpt/device/model.ts @@ -0,0 +1,61 @@ +/** + * 设备型号规格管理相关 + */ +import request from '@/api/index' + +// 列表 +export function getModelList(params: any) { + return request({ + url: `/equipment/model/listPage?limit=${params.limit}&offset=${params.offset}`, + method: 'post', + data: params, + }) +} +// 列表-不分页 +export function getModelAllList(params: any) { + return request({ + url: '/equipment/model/list', + method: 'post', + data: params, + }) +} +// 设备名称列表/equipment/model/listEquipmentName +export function getDeviceNameList(params: any) { + return request({ + url: '/equipment/model/listEquipmentName', + method: 'get', + params, + }) +} +// 导出 +export function exportModelList(data: any) { + return request({ + url: '/equipment/model/export', + method: 'post', + data, + }) +} +// 新建或编辑 +export function handlerFunApi(type: string, data: any) { + if (type === 'create') { + return request({ + url: '/equipment/model/add', + method: 'post', + data, + }) + } + else if (type === 'update') { + return request({ + url: '/equipment/model/update', + method: 'post', + data, + }) + } +} +// 删除 +export function deleteModel(data: any) { + return request({ + url: `/equipment/model/delete?id=${data.id}`, + method: 'post', + }) +} diff --git a/.env.development b/.env.development index debe1a8..f2fee42 100644 --- a/.env.development +++ b/.env.development @@ -4,7 +4,7 @@ # 接口请求地址,会设置到 axios 的 baseURL 参数上 # VITE_APP_API_BASEURL = http://139.198.29.133:8089 # VITE_APP_API_BASEURL = http://111.198.10.15:21611 -VITE_APP_API_BASEURL = http://127.0.0.1:5909 +VITE_APP_API_BASEURL = http://192.168.8.101:5909 # 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/public/config/config.json b/public/config/config.json index 3bd0a89..313fcf7 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,4 +1,4 @@ { "title":"计量业务系统", - "baseUrl": "http://111.198.10.15:21611" + "baseUrl": "http://192.168.8.101:5909" } diff --git a/src/api/eqpt/device/model.ts b/src/api/eqpt/device/model.ts new file mode 100644 index 0000000..a8fa0f1 --- /dev/null +++ b/src/api/eqpt/device/model.ts @@ -0,0 +1,61 @@ +/** + * 设备型号规格管理相关 + */ +import request from '@/api/index' + +// 列表 +export function getModelList(params: any) { + return request({ + url: `/equipment/model/listPage?limit=${params.limit}&offset=${params.offset}`, + method: 'post', + data: params, + }) +} +// 列表-不分页 +export function getModelAllList(params: any) { + return request({ + url: '/equipment/model/list', + method: 'post', + data: params, + }) +} +// 设备名称列表/equipment/model/listEquipmentName +export function getDeviceNameList(params: any) { + return request({ + url: '/equipment/model/listEquipmentName', + method: 'get', + params, + }) +} +// 导出 +export function exportModelList(data: any) { + return request({ + url: '/equipment/model/export', + method: 'post', + data, + }) +} +// 新建或编辑 +export function handlerFunApi(type: string, data: any) { + if (type === 'create') { + return request({ + url: '/equipment/model/add', + method: 'post', + data, + }) + } + else if (type === 'update') { + return request({ + url: '/equipment/model/update', + method: 'post', + data, + }) + } +} +// 删除 +export function deleteModel(data: any) { + return request({ + url: `/equipment/model/delete?id=${data.id}`, + method: 'post', + }) +} diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue index 14ec12e..64e6f48 100644 --- a/src/components/ApprovalRecord/ApprovalRecordTable.vue +++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue @@ -55,11 +55,12 @@ // listQuery.value.offset = 1 // } fetchApproval({ processId: listQuery.value.processId }).then((response) => { + console.log(response.data, 'response') response.data.forEach((item: Array, index: number) => { item.forEach((i: any) => { list.value.push({ cindex: index, - nodeNumber: i.approvalStatus === '发起人' ? 0 : list.value[i.cindex].nodeNumber + 1, + nodeNumber: i.approvalStatus === '发起人' ? 0 : list.value[index - 1].nodeNumber + 1, assigneeName: i.assigneeName, // 姓名 approvalStatus: i.approvalStatus, // 审批类型 finishTime: i.finishTime ? i.finishTime : '-', // 完成时间 diff --git a/.env.development b/.env.development index debe1a8..f2fee42 100644 --- a/.env.development +++ b/.env.development @@ -4,7 +4,7 @@ # 接口请求地址,会设置到 axios 的 baseURL 参数上 # VITE_APP_API_BASEURL = http://139.198.29.133:8089 # VITE_APP_API_BASEURL = http://111.198.10.15:21611 -VITE_APP_API_BASEURL = http://127.0.0.1:5909 +VITE_APP_API_BASEURL = http://192.168.8.101:5909 # 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/public/config/config.json b/public/config/config.json index 3bd0a89..313fcf7 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,4 +1,4 @@ { "title":"计量业务系统", - "baseUrl": "http://111.198.10.15:21611" + "baseUrl": "http://192.168.8.101:5909" } diff --git a/src/api/eqpt/device/model.ts b/src/api/eqpt/device/model.ts new file mode 100644 index 0000000..a8fa0f1 --- /dev/null +++ b/src/api/eqpt/device/model.ts @@ -0,0 +1,61 @@ +/** + * 设备型号规格管理相关 + */ +import request from '@/api/index' + +// 列表 +export function getModelList(params: any) { + return request({ + url: `/equipment/model/listPage?limit=${params.limit}&offset=${params.offset}`, + method: 'post', + data: params, + }) +} +// 列表-不分页 +export function getModelAllList(params: any) { + return request({ + url: '/equipment/model/list', + method: 'post', + data: params, + }) +} +// 设备名称列表/equipment/model/listEquipmentName +export function getDeviceNameList(params: any) { + return request({ + url: '/equipment/model/listEquipmentName', + method: 'get', + params, + }) +} +// 导出 +export function exportModelList(data: any) { + return request({ + url: '/equipment/model/export', + method: 'post', + data, + }) +} +// 新建或编辑 +export function handlerFunApi(type: string, data: any) { + if (type === 'create') { + return request({ + url: '/equipment/model/add', + method: 'post', + data, + }) + } + else if (type === 'update') { + return request({ + url: '/equipment/model/update', + method: 'post', + data, + }) + } +} +// 删除 +export function deleteModel(data: any) { + return request({ + url: `/equipment/model/delete?id=${data.id}`, + method: 'post', + }) +} diff --git a/src/components/ApprovalRecord/ApprovalRecordTable.vue b/src/components/ApprovalRecord/ApprovalRecordTable.vue index 14ec12e..64e6f48 100644 --- a/src/components/ApprovalRecord/ApprovalRecordTable.vue +++ b/src/components/ApprovalRecord/ApprovalRecordTable.vue @@ -55,11 +55,12 @@ // listQuery.value.offset = 1 // } fetchApproval({ processId: listQuery.value.processId }).then((response) => { + console.log(response.data, 'response') response.data.forEach((item: Array, index: number) => { item.forEach((i: any) => { list.value.push({ cindex: index, - nodeNumber: i.approvalStatus === '发起人' ? 0 : list.value[i.cindex].nodeNumber + 1, + nodeNumber: i.approvalStatus === '发起人' ? 0 : list.value[index - 1].nodeNumber + 1, assigneeName: i.assigneeName, // 姓名 approvalStatus: i.approvalStatus, // 审批类型 finishTime: i.finishTime ? i.finishTime : '-', // 完成时间 diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue index f08078d..aefbd8b 100644 --- a/src/components/NormalTable/index.vue +++ b/src/components/NormalTable/index.vue @@ -90,8 +90,16 @@ type: String, default: 'default', }, // 表格大小,默认,small,mini等,与el-table条件相同 + // 排序 + sort: { + type: Object, + default() { + return { + } + }, + }, }) -const emit = defineEmits(['change', 'selectionChange', 'rowClick', 'multiSelect']) +const emit = defineEmits(['change', 'selectionChange', 'rowClick', 'multiSelect', 'sortChange']) // -------定义数据-------------- interface columnsCheckInfo { text: string @@ -139,6 +147,10 @@ function selectionChange(selection: []) { emit('selectionChange', selection) } +// 点击排序 +function sortClick(column: any, prop: any, order: any) { + emit('sortChange', { column, prop, order }) +} // 点击行 function rowClick(row: object, column?: any, event?: any) { emit('rowClick', row) @@ -196,11 +208,13 @@ border stripe :size="size" + :default-sort="props.sort" :show-header="showHeader" style="width: 100%;" @selection-change="handleSelectionChange" @select="selectClick" @row-click="rowClick" + @sort-change="sortClick" > @@ -210,7 +224,7 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +