diff --git a/src/api/app.js b/src/api/app.js
index c191ce4d..95c827de 100644
--- a/src/api/app.js
+++ b/src/api/app.js
@@ -20,7 +20,7 @@ export const getDeviceList = (query) => {
// app 警告分析
export const getWarningAnalysis = (query) => {
return request({
- url: '/app/tenant/index/warning-analysis',
+ url: '/app/index/warning-analysis',
method: 'get',
params: query
})
@@ -29,7 +29,7 @@ export const getWarningAnalysis = (query) => {
// 首页数据
export function homeCount(query) {
return request({
- url: '/app/tenant/index',
+ url: '/app/index',
method: 'get',
params: query
})
@@ -38,7 +38,7 @@ export function homeCount(query) {
// app 项目设备
export function appProjectDeviceList(query) {
return request({
- url: '/app/tenant/device/table',
+ url: '/app/device/table',
method: 'get',
params: query
})
@@ -47,7 +47,7 @@ export function appProjectDeviceList(query) {
// app 项目列表
export function appProjectList(query) {
return request({
- url: '/app/tenant/project/list',
+ url: '/app/project/list',
method: 'get',
params: query
})
@@ -56,7 +56,7 @@ export function appProjectList(query) {
// app 告警列表
export function appAlarmRecordList(query) {
return request({
- url: '/app/tenant/alarm/table',
+ url: '/app/alarm/table',
method: 'get',
params: query
})
@@ -65,7 +65,7 @@ export function appAlarmRecordList(query) {
// app 模型统计
export function appDeviceStatistics(query) {
return request({
- url: '/app/tenant/index/device-statistics',
+ url: '/app/index/device-statistics',
method: 'get',
params: query
})
diff --git a/src/api/iot/device.js b/src/api/iot/device.js
index d3a98c4c..e766b982 100644
--- a/src/api/iot/device.js
+++ b/src/api/iot/device.js
@@ -9,6 +9,16 @@ export function listDevice(query) {
});
}
+// 查询设备列表
+export function myListDevice(query) {
+ return request({
+ url: "/iot/device/my/list",
+ method: "get",
+ params: query
+ });
+}
+
+
// 查询设备详细
export function getDevice(deviceId) {
return request({
diff --git a/src/api/system/home.js b/src/api/system/home.js
index e96a8797..9f09dcb1 100644
--- a/src/api/system/home.js
+++ b/src/api/system/home.js
@@ -3,7 +3,7 @@ import request from '@/utils/request'
// 首页数据
export function homeCount(query) {
return request({
- url: '/app/tenant/index',
+ url: '/app/index',
method: 'get',
params: query
})
diff --git a/src/api/system/user.js b/src/api/system/user.js
index 75026c26..a519c37b 100644
--- a/src/api/system/user.js
+++ b/src/api/system/user.js
@@ -144,3 +144,12 @@ export function roleOptionselectList(tenantId) {
method: 'get'
})
}
+
+// 查询工单处理人列表
+export function gdListUser(query) {
+ return request({
+ url: '/app/maintenance/maintenance-user',
+ method: 'get',
+ params: query
+ })
+}
diff --git a/src/views/iot/alarm/type/index.vue b/src/views/iot/alarm/type/index.vue
index ec216b04..c991429a 100644
--- a/src/views/iot/alarm/type/index.vue
+++ b/src/views/iot/alarm/type/index.vue
@@ -113,7 +113,7 @@
/>
- 启用
+ 启用
停用
diff --git a/src/views/power/maintenance/index.vue b/src/views/power/maintenance/index.vue
index 0c53fea0..b16be0d5 100644
--- a/src/views/power/maintenance/index.vue
+++ b/src/views/power/maintenance/index.vue
@@ -17,7 +17,12 @@
/>
-
+
-
+
- 搜索
- 重置
+ 搜索
+ 重置
-
+ >新增
+
导出
+ >导出
-
+
-
+
-
-
+
+
- {{ parseTime(scope.row.handleTime, '{y}-{m}-{d}') }}
+ {{ parseTime(scope.row.handleTime, "{y}-{m}-{d}") }}
-
+
{{ workStateList[scope.row.workOrderStatus] }}
-
+
- 工单追踪
+ 工单追踪
删除
+ >删除
-
+
-
+
-
+
-
+
-
+ /> -->
+
+
+
-
+
@@ -196,8 +283,18 @@
/>
@@ -210,7 +307,11 @@
width="800px"
>
-
+
@@ -223,24 +324,24 @@ import {
delMaintenance,
addMaintenance,
updateMaintenance,
- exportMaintenance
+ exportMaintenance,
} from "@/api/power/maintenance";
-import { listDevice } from "@/api/iot/device";
-import { listUser } from "@/api/system/user";
+import { myListDevice } from "@/api/iot/device";
+import { listUser, gdListUser } from "@/api/system/user";
import { listDept } from "@/api/system/dept";
-import DetailsWrap from '../mywork/details'
+import DetailsWrap from "../mywork/details";
import Treeselect from "@riophae/vue-treeselect";
import SelectTableWrap from "@/components/SelectTable/index";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
// 工单状态(0:上报人创建工单 1:驳回上报人工单 2:处理人确认工单 3:处理人完成工单 4:驳回处理人工单 5:领导审批通过流程结束)
const workStateList = {
- "0": "工单已创建",
- "1": "退回工单",
- "2": "确认工单",
- "3": "处理完成",
- "4": "退回处理",
- "5": "审核通过"
+ 0: "工单已创建",
+ 1: "退回工单",
+ 2: "确认工单",
+ 3: "处理完成",
+ 4: "退回处理",
+ 5: "审核通过",
};
export default {
@@ -248,7 +349,7 @@ export default {
components: {
Treeselect,
SelectTableWrap,
- DetailsWrap
+ DetailsWrap,
},
data() {
return {
@@ -294,22 +395,23 @@ export default {
scenePictures: null,
feedbackInformation: null,
advice: null,
- maintenanceStatus: null
+ maintenanceStatus: null,
},
// 表单参数
form: {},
// 表单校验
rules: {},
- deptOptions: []
+ deptOptions: [],
+ gdUserList: [],
};
},
created() {
// 获取故障类型(字典)
- this.getDicts("fault_type").then(response => {
+ this.getDicts("fault_type").then((response) => {
this.faultTypeOptions = response.data;
});
this.getList();
- this.getTreeselect();
+ // this.getTreeselect();
},
methods: {
dialogCloes() {
@@ -325,7 +427,7 @@ export default {
this.selectResult = {};
this.tableSelectOption = {
otherOption: {
- tableType: "device"
+ tableType: "device",
},
queryOpt: {
disable: false,
@@ -334,12 +436,12 @@ export default {
deviceName: "",
modelId: "",
parentId: 0,
- deviceType: "GATEWAY_CONTROLLER"
+ deviceType: "GATEWAY_CONTROLLER",
},
page: {
pageSize: 10,
pageNum: 1,
- total: 0
+ total: 0,
},
inline: true,
queryChilds: [
@@ -351,9 +453,9 @@ export default {
type: "input",
key: "deviceName",
size: "small",
- value: ""
- }
- ]
+ value: "",
+ },
+ ],
},
tableOpt: {
loading: false,
@@ -369,7 +471,7 @@ export default {
align: "left",
width: "",
"show-overflow-tooltip": false,
- tempType: "span"
+ tempType: "span",
},
{
style: "",
@@ -379,7 +481,7 @@ export default {
align: "left",
width: "",
"show-overflow-tooltip": false,
- tempType: "span"
+ tempType: "span",
},
{
style: "",
@@ -389,7 +491,7 @@ export default {
align: "left",
width: "",
"show-overflow-tooltip": false,
- tempType: "span"
+ tempType: "span",
},
{
style: "",
@@ -399,21 +501,21 @@ export default {
align: "center",
width: "160",
"show-overflow-tooltip": false,
- tempType: "span"
- }
+ tempType: "span",
+ },
],
tableList: {
- type: Array
- }
+ type: Array,
+ },
},
- tableList: []
+ tableList: [],
};
this.selectTableShow = true;
},
// 查询回调
childGetList(data) {
- listDevice(Object.assign(data.page, data.param, { selected: 1 })).then(
- response => {
+ myListDevice(Object.assign(data.page, data.param, { selected: 1 })).then(
+ (response) => {
this.tableSelectOption.tableList = response.rows;
this.tableSelectOption.queryOpt.page.total = Number(response.total);
}
@@ -437,14 +539,20 @@ export default {
this.form.deviceName = this.selectResult.deviceName;
this.selectTableShow = false;
},
+ // 获取 工单 处理人列表
+ gdListUser() {
+ gdListUser().then((response) => {
+ this.gdUserList = response.data;
+ });
+ },
// 获取到用户列表 并且赋值到 部门表
getUserList(data) {
var userList = [];
var _this = this;
- listUser().then(response => {
+ listUser().then((response) => {
userList = response.rows;
if (userList) {
- userList.forEach(v => {
+ userList.forEach((v) => {
if (v.deptId) {
let deptId = v.deptId;
v.deptId = v.userId;
@@ -458,7 +566,7 @@ export default {
},
/** 查询部门人员列表 */
getTreeselect() {
- listDept({ pageNum: 1, pageSize: 99999 }).then(response => {
+ listDept({ pageNum: 1, pageSize: 99999 }).then((response) => {
this.getUserList(response.data);
});
},
@@ -469,7 +577,7 @@ export default {
return {
id: node.deptId,
label: node.deptName ? node.deptName : node.nickName,
- children: node.children
+ children: node.children,
};
},
treeselect(node, instanceId) {
@@ -487,7 +595,7 @@ export default {
/** 查询工单信息列表 */
getList() {
this.loading = true;
- listMaintenance(this.queryParams).then(response => {
+ listMaintenance(this.queryParams).then((response) => {
this.maintenanceList = response.rows;
this.total = response.total;
this.loading = false;
@@ -521,7 +629,7 @@ export default {
createTime: null,
updateId: null,
updateTime: null,
- remark: null
+ remark: null,
};
this.resetForm("form");
},
@@ -537,13 +645,14 @@ export default {
},
// 多选框选中数据
handleSelectionChange(selection) {
- this.ids = selection.map(item => item.maintenanceId);
+ this.ids = selection.map((item) => item.maintenanceId);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
+ this.gdListUser();
this.form.reporterName = this.$store.getters.name;
this.open = true;
this.title = "添加工单信息";
@@ -552,24 +661,25 @@ export default {
handleUpdate(row) {
this.reset();
const maintenanceId = row.maintenanceId || this.ids;
- getMaintenance(maintenanceId).then(response => {
+ getMaintenance(maintenanceId).then((response) => {
this.form = response.data;
+ this.gdListUser();
this.open = true;
this.title = "修改工单信息";
});
},
/** 提交按钮 */
submitForm() {
- this.$refs["form"].validate(valid => {
+ this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.maintenanceId != null) {
- updateMaintenance(this.form).then(response => {
+ updateMaintenance(this.form).then((response) => {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
- addMaintenance(this.form).then(response => {
+ addMaintenance(this.form).then((response) => {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
@@ -584,9 +694,9 @@ export default {
this.$confirm("是否删除该选项?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
- type: "warning"
+ type: "warning",
})
- .then(function() {
+ .then(function () {
return delMaintenance(maintenanceIds);
})
.then(() => {
@@ -600,16 +710,16 @@ export default {
this.$confirm("是否确认导出所有工单信息数据项?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
- type: "warning"
+ type: "warning",
})
- .then(function() {
+ .then(function () {
return exportMaintenance(queryParams);
})
- .then(response => {
+ .then((response) => {
this.download(response.msg);
});
- }
- }
+ },
+ },
};