|
@@ -27,14 +27,11 @@
|
27
|
27
|
>
|
28
|
28
|
<cube-form-group>
|
29
|
29
|
<cube-form-item
|
30
|
|
- :field="fields[24]"
|
31
|
|
- class="btn_plcaeholde"
|
32
|
|
- ></cube-form-item>
|
33
|
|
- <cube-form-item
|
34
|
30
|
:field="fields[20]"
|
35
|
31
|
v-if="valConfig == 2"
|
36
|
32
|
class="btn_plcaeholde btn_local"
|
37
|
33
|
>
|
|
34
|
+ <!-- <cube-button @click="showPlacePicker()">{{selectedPlaceTxt?selectedPlaceTxt:'请输入故障地点'}}</cube-button> -->
|
38
|
35
|
<input
|
39
|
36
|
type="text"
|
40
|
37
|
class="inp_local"
|
|
@@ -45,20 +42,6 @@
|
45
|
42
|
/>
|
46
|
43
|
</cube-form-item>
|
47
|
44
|
<cube-form-item
|
48
|
|
- :field="fields[25]"
|
49
|
|
- v-if="valConfig == 2"
|
50
|
|
- class="btn_plcaeholde btn_local"
|
51
|
|
- >
|
52
|
|
- <input
|
53
|
|
- type="text"
|
54
|
|
- class="inp_local"
|
55
|
|
- placeholder="请输入报修人"
|
56
|
|
- v-model="userInpVal"
|
57
|
|
- @input="changeUserList()"
|
58
|
|
- @click="showUserPicker()"
|
59
|
|
- />
|
60
|
|
- </cube-form-item>
|
61
|
|
- <cube-form-item
|
62
|
45
|
v-if="valConfig == 1"
|
63
|
46
|
:field="fields[0]"
|
64
|
47
|
></cube-form-item>
|
|
@@ -335,9 +318,8 @@ const solution = {
|
335
|
318
|
export default {
|
336
|
319
|
data() {
|
337
|
320
|
return {
|
338
|
|
- selectDeptIndex:[0],
|
339
|
|
- selectUserIndex:[0],
|
340
|
321
|
validity: {},
|
|
322
|
+
|
341
|
323
|
valid: undefined,
|
342
|
324
|
action: {
|
343
|
325
|
target:
|
|
@@ -367,27 +349,22 @@ export default {
|
367
|
349
|
incidentTitle: "", //事件主题
|
368
|
350
|
referenceInfo: {}, //引用信息
|
369
|
351
|
placeSelectData: [], //区域地点下拉框选项
|
370
|
|
- // inpLocalVal: "", //故障地点输入框
|
|
352
|
+ inpLocalVal: "", //故障地点输入框
|
371
|
353
|
faultLocationList: [], //区域地点拼接下拉框选项
|
372
|
354
|
deptInpVal: "", //报修科室输入框
|
373
|
355
|
deptList: [], //报修科室下拉选项
|
374
|
356
|
deptRes: "", //下拉框科室信息
|
375
|
|
- userInpVal: "", //报修人输入框
|
376
|
|
- userList: [], //报修人下拉选项
|
377
|
|
- userRes: "", //下拉框报修人信息
|
378
|
357
|
model: {
|
379
|
358
|
contactsInformation: "",
|
380
|
359
|
placeValue: [],
|
381
|
360
|
address: "", //故障地点
|
382
|
361
|
requester: "", //报修科室
|
383
|
|
- requesterUser: "", //报修人
|
384
|
362
|
houseNumber: "", //详细地址
|
385
|
363
|
description: "", //事件描述
|
386
|
364
|
// bxcode: "",
|
387
|
365
|
assetId: "", //资产
|
388
|
366
|
category: [],
|
389
|
367
|
source: "", //事件来源
|
390
|
|
- branch: "", //院区
|
391
|
368
|
title: "", //事件主题
|
392
|
369
|
priority: "", //优先级
|
393
|
370
|
emergency: "", //紧急度
|
|
@@ -400,7 +377,7 @@ export default {
|
400
|
377
|
candidateGroups: "", //处理组
|
401
|
378
|
solutionType: [], //知识库类型
|
402
|
379
|
handleUserOrGroup: false, //处理人or处理组
|
403
|
|
- room: "", //房间号
|
|
380
|
+ room: "" //房间号
|
404
|
381
|
},
|
405
|
382
|
selectedCategoryTxt: "", //事件分类选中展示
|
406
|
383
|
selectedPlaceTxt: "", //区域地点选中展示
|
|
@@ -408,7 +385,6 @@ export default {
|
408
|
385
|
promptingConent: "",
|
409
|
386
|
promptingStatus: "",
|
410
|
387
|
order: 1, //处理方式 1:直接处理,2:派单
|
411
|
|
- branchArr: [], //院区数组
|
412
|
388
|
sourceArr: [], //事件来源数组
|
413
|
389
|
priorityArr: [], //优先级数组
|
414
|
390
|
emergencyArr: [], //紧急度数组
|
|
@@ -718,7 +694,7 @@ export default {
|
718
|
694
|
modelKey: "requester",
|
719
|
695
|
label: "报修科室:",
|
720
|
696
|
props: {
|
721
|
|
- options: [],
|
|
697
|
+ options: this.requesterList,
|
722
|
698
|
title: "请选择报修科室",
|
723
|
699
|
placeholder: "请选择报修科室"
|
724
|
700
|
},
|
|
@@ -760,42 +736,7 @@ export default {
|
760
|
736
|
rules: {
|
761
|
737
|
required: false
|
762
|
738
|
}
|
763
|
|
- },
|
764
|
|
- {
|
765
|
|
- type: "select",
|
766
|
|
- modelKey: "branch",
|
767
|
|
- label: "院区:",
|
768
|
|
- props: {
|
769
|
|
- options: this.branchArr,
|
770
|
|
- title: "请选择院区",
|
771
|
|
- placeholder: "请选择院区"
|
772
|
|
- },
|
773
|
|
- events: {
|
774
|
|
- change: (value, index, text) => {
|
775
|
|
- console.log(value, index, text);
|
776
|
|
- console.log(this.model);
|
777
|
|
- if (this.valConfig == 2) {
|
778
|
|
- this.getDept();
|
779
|
|
- }
|
780
|
|
- }
|
781
|
|
- },
|
782
|
|
- rules: {
|
783
|
|
- required: true
|
784
|
|
- }
|
785
|
|
- },
|
786
|
|
- {
|
787
|
|
- type: "select",
|
788
|
|
- modelKey: "requesterUser",
|
789
|
|
- label: "报修人:",
|
790
|
|
- props: {
|
791
|
|
- options: [],
|
792
|
|
- title: "请选择报修人",
|
793
|
|
- placeholder: "请选择报修人"
|
794
|
|
- },
|
795
|
|
- rules: {
|
796
|
|
- required: false
|
797
|
|
- }
|
798
|
|
- },
|
|
739
|
+ }
|
799
|
740
|
]
|
800
|
741
|
};
|
801
|
742
|
},
|
|
@@ -884,31 +825,6 @@ export default {
|
884
|
825
|
that.fields[5].props.options = that.sourceArr;
|
885
|
826
|
});
|
886
|
827
|
},
|
887
|
|
- // 获取院区
|
888
|
|
- getBranch() {
|
889
|
|
- this.$http
|
890
|
|
- .post("service/user/data/fetchDataList/branch", {"idx":0,"sum":100})
|
891
|
|
- .then((res) => {
|
892
|
|
- if(res.data.status == 200){
|
893
|
|
- res.data.list.forEach((v) => {
|
894
|
|
- this.branchArr.push({
|
895
|
|
- text: v.hosName,
|
896
|
|
- value: v.id
|
897
|
|
- });
|
898
|
|
- });
|
899
|
|
- this.fields[24].props.options = this.branchArr;
|
900
|
|
- if(this.loginUser.duty){
|
901
|
|
- this.model.branch = this.loginUser.duty.branch;
|
902
|
|
- }else if(this.loginUser.branch){
|
903
|
|
- this.model.branch = this.loginUser.branch.id;
|
904
|
|
- }
|
905
|
|
- // 获取报修科室
|
906
|
|
- // if (this.valConfig == 2) {
|
907
|
|
- // this.getDept();
|
908
|
|
- // }
|
909
|
|
- }
|
910
|
|
- });
|
911
|
|
- },
|
912
|
828
|
// 获取优先级
|
913
|
829
|
getPriority() {
|
914
|
830
|
var that = this;
|
|
@@ -997,7 +913,6 @@ export default {
|
997
|
913
|
});
|
998
|
914
|
});
|
999
|
915
|
that.fields[12].props.options = that.closecodeArr;
|
1000
|
|
- that.model.closecode = 1572;//设计如此,默认“完全解决”
|
1001
|
916
|
});
|
1002
|
917
|
},
|
1003
|
918
|
// 获取处理人
|
|
@@ -1214,19 +1129,19 @@ export default {
|
1214
|
1129
|
that.$route.params.abnormal;
|
1215
|
1130
|
}
|
1216
|
1131
|
} else {
|
1217
|
|
- // that.name = that.loginUser.name;
|
1218
|
|
- // that.model.contactsInformation = that.loginUser.phone;
|
1219
|
|
- // that.model.contacts = that.loginUser.name;
|
1220
|
|
- // that.model.houseNumber = that.loginUser.houseNumber;
|
|
1132
|
+ that.name = that.loginUser.name;
|
|
1133
|
+ that.model.contactsInformation = that.loginUser.phone;
|
|
1134
|
+ that.model.contacts = that.loginUser.name;
|
|
1135
|
+ that.model.houseNumber = that.loginUser.houseNumber;
|
|
1136
|
+ }
|
|
1137
|
+ if (that.loginUser.place && that.loginUser.place.length) {
|
|
1138
|
+ if (that.loginUser.place.id) {
|
|
1139
|
+ if (that.loginUser.place.area) {
|
|
1140
|
+ that.model.placeValue[0] = that.loginUser.place.area.id;
|
|
1141
|
+ }
|
|
1142
|
+ that.model.placeValue[1] = that.loginUser.place.id;
|
|
1143
|
+ }
|
1221
|
1144
|
}
|
1222
|
|
- // if (that.loginUser.place && that.loginUser.place.length) {
|
1223
|
|
- // if (that.loginUser.place.id) {
|
1224
|
|
- // if (that.loginUser.place.area) {
|
1225
|
|
- // that.model.placeValue[0] = that.loginUser.place.area.id;
|
1226
|
|
- // }
|
1227
|
|
- // that.model.placeValue[1] = that.loginUser.place.id;
|
1228
|
|
- // }
|
1229
|
|
- // }
|
1230
|
1145
|
|
1231
|
1146
|
if (localStorage.getItem("model")) {
|
1232
|
1147
|
that.model = JSON.parse(localStorage.getItem("model"));
|
|
@@ -1749,38 +1664,25 @@ export default {
|
1749
|
1664
|
},
|
1750
|
1665
|
// 报修科室
|
1751
|
1666
|
showDeptPicker() {
|
1752
|
|
- this.deptList = [];
|
1753
|
1667
|
this.deptPicker.show();
|
1754
|
|
- this.getDept(true);
|
1755
|
|
- },
|
1756
|
|
- // 报修人
|
1757
|
|
- showUserPicker() {
|
1758
|
|
- this.userList = [];
|
1759
|
|
- this.userPicker.show();
|
1760
|
|
- this.getUser(true);
|
1761
|
1668
|
},
|
1762
|
1669
|
// 选中报修科室
|
1763
|
1670
|
selectDeptHandler(selectedVal, selectedIndex, selectedTxt) {
|
1764
|
1671
|
console.log(selectedVal, selectedIndex, selectedTxt);
|
1765
|
|
- this.deptInpVal = selectedTxt[0];
|
1766
|
|
- this.selectDeptIndex = selectedIndex;
|
1767
|
|
- if(!selectedVal[0]){
|
1768
|
|
- return;
|
1769
|
|
- }
|
1770
|
|
- let index = selectedIndex[0].toString();
|
1771
|
|
- this.model.requester = this.deptRes[index];
|
1772
|
|
- console.log(this.deptRes[index]);
|
1773
|
|
- // this.inpLocalVal = this.model.address = this.deptRes[index].place
|
1774
|
|
- // .area
|
1775
|
|
- // ? this.deptRes[index].place.area.area
|
1776
|
|
- // ? this.deptRes[index].place.place
|
1777
|
|
- // ? this.deptRes[index].place.area.area +
|
1778
|
|
- // this.deptRes[index].place.place
|
1779
|
|
- // : this.deptRes[index].place.area.area
|
1780
|
|
- // : this.deptRes[index].place.area
|
1781
|
|
- // : this.deptRes[index].place.place;
|
1782
|
|
- if (this.deptRes[index].phone) {
|
1783
|
|
- this.model.contactsInformation = this.deptRes[index].phone;
|
|
1672
|
+ this.deptInpVal = selectedTxt;
|
|
1673
|
+ this.model.requester = this.deptRes[selectedIndex];
|
|
1674
|
+ console.log(this.deptRes[selectedIndex]);
|
|
1675
|
+ this.inpLocalVal = this.model.address = this.deptRes[selectedIndex].place
|
|
1676
|
+ .area
|
|
1677
|
+ ? this.deptRes[selectedIndex].place.area.area
|
|
1678
|
+ ? this.deptRes[selectedIndex].place.place
|
|
1679
|
+ ? this.deptRes[selectedIndex].place.area.area +
|
|
1680
|
+ this.deptRes[selectedIndex].place.place
|
|
1681
|
+ : this.deptRes[selectedIndex].place.area.area
|
|
1682
|
+ : this.deptRes[selectedIndex].place.area
|
|
1683
|
+ : this.deptRes[selectedIndex].place.place;
|
|
1684
|
+ if (this.deptRes[selectedIndex].phone) {
|
|
1685
|
+ this.model.contactsInformation = this.deptRes[selectedIndex].phone;
|
1784
|
1686
|
}
|
1785
|
1687
|
// this.model.houseNumber = this.selectedPlaceTxt = selectedTxt.join(" ");
|
1786
|
1688
|
// var place = {
|
|
@@ -1804,30 +1706,6 @@ export default {
|
1804
|
1706
|
// };
|
1805
|
1707
|
// localStorage.setItem("place", JSON.stringify(place));
|
1806
|
1708
|
},
|
1807
|
|
- // 选中报修人
|
1808
|
|
- selectUserHandler(selectedVal, selectedIndex, selectedTxt) {
|
1809
|
|
- console.log(selectedVal, selectedIndex, selectedTxt);
|
1810
|
|
- this.userInpVal = selectedTxt[0];
|
1811
|
|
- this.selectUserIndex = selectedIndex;
|
1812
|
|
- if(!selectedVal[0]){
|
1813
|
|
- return;
|
1814
|
|
- }
|
1815
|
|
- let index = selectedIndex[0].toString();
|
1816
|
|
- this.model.requesterUser = this.userRes[index];
|
1817
|
|
- console.log(this.userRes[index]);
|
1818
|
|
- if (this.userRes[index].phone) {
|
1819
|
|
- this.model.contactsInformation = this.userRes[index].phone;
|
1820
|
|
- }
|
1821
|
|
- },
|
1822
|
|
- // 取消选中报修人
|
1823
|
|
- cancelUserHandler() {
|
1824
|
|
- if (this.model.requesterUser) {
|
1825
|
|
- this.userInpVal = this.model.requesterUser.name + '('+ this.model.requesterUser.account +')';
|
1826
|
|
- } else if (!this.model.requesterUser) {
|
1827
|
|
- this.userInpVal = "";
|
1828
|
|
- this.model.requesterUser = "";
|
1829
|
|
- }
|
1830
|
|
- },
|
1831
|
1709
|
getAreaData() {
|
1832
|
1710
|
this.$http
|
1833
|
1711
|
.post("service/user/data/fetchDataList/area", {
|
|
@@ -1934,85 +1812,47 @@ export default {
|
1934
|
1812
|
}, 600);
|
1935
|
1813
|
},
|
1936
|
1814
|
// 报修科室
|
1937
|
|
- getDept(isFirst) {
|
|
1815
|
+ getDept(type) {
|
|
1816
|
+ var that = this;
|
1938
|
1817
|
this.$http
|
1939
|
1818
|
.post("service/user/data/fetchDataList/department", {
|
1940
|
1819
|
idx: 0,
|
1941
|
|
- sum: 1000,
|
1942
|
|
- department: {
|
1943
|
|
- branch: this.model.branch,
|
1944
|
|
- selectType:"pinyin_qs",
|
1945
|
|
- dept: isFirst ? '': (this.deptInpVal || "")
|
1946
|
|
- }
|
|
1820
|
+ sum: 50,
|
|
1821
|
+ department: { dept: that.deptInpVal || "" }
|
1947
|
1822
|
})
|
1948
|
|
- .then((res) => {
|
|
1823
|
+ .then(function(res) {
|
1949
|
1824
|
var data = res.data.list;
|
1950
|
|
- this.deptRes = res.data.list;
|
1951
|
|
- this.deptList = [];
|
1952
|
|
- for (var i = 0; i < data.length; i++) {
|
1953
|
|
- this.deptList.push({
|
1954
|
|
- text: data[i].dept,
|
1955
|
|
- value: data[i].id
|
1956
|
|
- });
|
1957
|
|
- }
|
1958
|
|
- console.log(this.deptList)
|
1959
|
|
- this.deptPicker.setData(this.deptList, isFirst?this.selectDeptIndex:[0])
|
1960
|
|
- });
|
1961
|
|
- },
|
1962
|
|
- // 报修人
|
1963
|
|
- getUser(isFirst) {
|
1964
|
|
- this.$http
|
1965
|
|
- .post("service/user/data/fetchDataList/requester", {
|
1966
|
|
- idx: 0,
|
1967
|
|
- sum: 1000,
|
1968
|
|
- requester: {
|
1969
|
|
- searchKey: isFirst ? '': (this.userInpVal || "")
|
|
1825
|
+ if (type == 1) {
|
|
1826
|
+ that.deptList.length = 0;
|
|
1827
|
+ that.$set(that.deptList, true, []);
|
|
1828
|
+ that.deptList;
|
1970
|
1829
|
}
|
1971
|
|
- })
|
1972
|
|
- .then((res) => {
|
1973
|
|
- var data = res.data.list;
|
1974
|
|
- this.userRes = res.data.list;
|
1975
|
|
- this.userList = [];
|
|
1830
|
+ that.deptRes = res.data.list;
|
1976
|
1831
|
for (var i = 0; i < data.length; i++) {
|
1977
|
|
- this.userList.push({
|
1978
|
|
- text: data[i].name + '('+ data[i].account +')',
|
|
1832
|
+ that.deptList.push({
|
|
1833
|
+ text: data[i].dept,
|
1979
|
1834
|
value: data[i].id
|
1980
|
1835
|
});
|
1981
|
1836
|
}
|
1982
|
|
- console.log(this.userList)
|
1983
|
|
- this.userPicker.setData(this.userList, isFirst?this.selectUserIndex:[0])
|
|
1837
|
+
|
|
1838
|
+ that.deptPicker = that.$createCascadePicker({
|
|
1839
|
+ title: "报修科室选择",
|
|
1840
|
+ data: that.deptList,
|
|
1841
|
+ onSelect: that.selectDeptHandler,
|
|
1842
|
+ onCancel: that.cancelDeptHandler
|
|
1843
|
+ });
|
1984
|
1844
|
});
|
1985
|
1845
|
},
|
1986
|
1846
|
changeDeptList() {
|
1987
|
1847
|
var that = this;
|
1988
|
1848
|
clearTimeout(that.timer);
|
1989
|
1849
|
that.timer = setTimeout(() => {
|
1990
|
|
- this.getDept();
|
1991
|
|
- }, 600);
|
1992
|
|
- },
|
1993
|
|
- changeUserList() {
|
1994
|
|
- clearTimeout(this.timer);
|
1995
|
|
- this.timer = setTimeout(() => {
|
1996
|
|
- this.getUser();
|
|
1850
|
+ this.getDept(1);
|
1997
|
1851
|
}, 600);
|
1998
|
1852
|
}
|
1999
|
1853
|
},
|
2000
|
1854
|
created() {
|
2001
|
1855
|
console.log(this.$route.params.data);
|
2002
|
|
- this.deptPicker = this.$createCascadePicker({
|
2003
|
|
- title: "报修科室选择",
|
2004
|
|
- data: this.deptList,
|
2005
|
|
- onSelect: this.selectDeptHandler,
|
2006
|
|
- onCancel: this.cancelDeptHandler
|
2007
|
|
- });
|
2008
|
|
- this.userPicker = this.$createCascadePicker({
|
2009
|
|
- title: "报修人选择",
|
2010
|
|
- data: this.userList,
|
2011
|
|
- onSelect: this.selectUserHandler,
|
2012
|
|
- onCancel: this.cancelUserHandler
|
2013
|
|
- });
|
2014
|
|
- //获取院区
|
2015
|
|
- this.getBranch();
|
2016
|
1856
|
//获取事件来源
|
2017
|
1857
|
this.getSource();
|
2018
|
1858
|
// 优先级
|
|
@@ -2039,6 +1879,9 @@ export default {
|
2039
|
1879
|
this.getPlaceData();
|
2040
|
1880
|
// 获取故障地点
|
2041
|
1881
|
// this.getFaultLocation();
|
|
1882
|
+ if (this.valConfig == 2) {
|
|
1883
|
+ this.getDept();
|
|
1884
|
+ }
|
2042
|
1885
|
},
|
2043
|
1886
|
beforeRouteLeave(to, from, next) {
|
2044
|
1887
|
console.log(to);
|
|
@@ -2082,9 +1925,9 @@ export default {
|
2082
|
1925
|
border: none;
|
2083
|
1926
|
}
|
2084
|
1927
|
|
2085
|
|
-/* .btn_local {
|
2086
|
|
- z-index: 101;
|
2087
|
|
-} */
|
|
1928
|
+.btn_local {
|
|
1929
|
+ /* z-index: 101; */
|
|
1930
|
+}
|
2088
|
1931
|
.inp_local {
|
2089
|
1932
|
outline: none;
|
2090
|
1933
|
width: 100%;
|