|
@@ -187,9 +187,11 @@
|
187
|
187
|
:conents="promptingConent"
|
188
|
188
|
:status="promptingStatus"
|
189
|
189
|
></promp-ting>
|
|
190
|
+ <seiminModel ref="seiminModel"></seiminModel>
|
190
|
191
|
</div>
|
191
|
192
|
</template>
|
192
|
193
|
<script>
|
|
194
|
+import seiminModel from "./../custom/seiminModel";
|
193
|
195
|
import CubePage from "./../components/cube-page.vue";
|
194
|
196
|
import CubeButtonGroup from "./../components/cube-button-group.vue";
|
195
|
197
|
import DatePicker from "./../components/date-picker.vue";
|
|
@@ -335,6 +337,7 @@ export default {
|
335
|
337
|
wxIncidentWithCmdb: localStorage.getItem("wxIncidentWithCmdb"), //是否绑定资产
|
336
|
338
|
ifRoom: localStorage.getItem("ifRoom"), //是否增加房间号选择
|
337
|
339
|
loginUser: JSON.parse(localStorage.getItem("loginUser")),
|
|
340
|
+ integralMechanism: localStorage.getItem("integralMechanism"),
|
338
|
341
|
valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
|
339
|
342
|
name: "",
|
340
|
343
|
phone: "",
|
|
@@ -1180,9 +1183,89 @@ export default {
|
1180
|
1183
|
if (this.$route.params.data && this.$route.params.data.id) {
|
1181
|
1184
|
that.modelData.flow = this.$route.params.data.id;
|
1182
|
1185
|
}
|
|
1186
|
+ if (
|
|
1187
|
+ this.order == 1 &&
|
|
1188
|
+ (this.integralMechanism == 1 ||
|
|
1189
|
+ (this.integralMechanism == 2 && this.loginUser.userType.value == 2))
|
|
1190
|
+ ) {
|
|
1191
|
+ // 直接处理,积分机制
|
|
1192
|
+ let category = this.initSjList.find(
|
|
1193
|
+ v => v.id == this.modelData.incident.category.id
|
|
1194
|
+ );
|
|
1195
|
+ this.$refs.seiminModel.show({
|
|
1196
|
+ category,
|
|
1197
|
+ type: "now",
|
|
1198
|
+ btns: [
|
|
1199
|
+ {
|
|
1200
|
+ click: () => {
|
|
1201
|
+ this.loadShow = false;
|
|
1202
|
+ this.$refs.seiminModel.close();
|
|
1203
|
+ }
|
|
1204
|
+ },
|
|
1205
|
+ {
|
|
1206
|
+ click: () => {
|
|
1207
|
+ if (!this.$refs.seiminModel.complexity) {
|
|
1208
|
+ this.$createDialog({
|
|
1209
|
+ type: "alert",
|
|
1210
|
+ title: "操作失败",
|
|
1211
|
+ content: "请选择工时!",
|
|
1212
|
+ icon: "cubeic-wrong"
|
|
1213
|
+ }).show();
|
|
1214
|
+ return;
|
|
1215
|
+ }
|
|
1216
|
+ if (!this.$refs.seiminModel.updateReason.trim()) {
|
|
1217
|
+ this.$createDialog({
|
|
1218
|
+ type: "alert",
|
|
1219
|
+ title: "操作失败",
|
|
1220
|
+ content: "请填写升级原因!",
|
|
1221
|
+ icon: "cubeic-wrong"
|
|
1222
|
+ }).show();
|
|
1223
|
+ return;
|
|
1224
|
+ }
|
|
1225
|
+ this.$refs.seiminModel.close();
|
|
1226
|
+ console.log("确定");
|
|
1227
|
+ this.handlerFn();
|
|
1228
|
+ }
|
|
1229
|
+ }
|
|
1230
|
+ ]
|
|
1231
|
+ });
|
|
1232
|
+ } else {
|
|
1233
|
+ this.handlerFn();
|
|
1234
|
+ }
|
|
1235
|
+ event.preventDefault();
|
|
1236
|
+ },
|
|
1237
|
+ commonFn() {
|
|
1238
|
+ let that = this;
|
|
1239
|
+ $("#fade").fadeIn();
|
|
1240
|
+ that.promptingConent = "恭喜您,新建报修成功!";
|
|
1241
|
+ that.promptingStatus = true;
|
|
1242
|
+ that.dialog = that
|
|
1243
|
+ .$createDialog({
|
|
1244
|
+ type: "alert",
|
|
1245
|
+ title: "新建成功",
|
|
1246
|
+ content: "点击返回首页",
|
|
1247
|
+ icon: "cubeic-right",
|
|
1248
|
+ onConfirm: (e, promptValue) => {
|
|
1249
|
+ that.$router.push({ path: "/main" });
|
|
1250
|
+ }
|
|
1251
|
+ })
|
|
1252
|
+ .show();
|
|
1253
|
+ localStorage.removeItem("category");
|
|
1254
|
+ localStorage.removeItem("model");
|
|
1255
|
+ localStorage.removeItem("modelData");
|
|
1256
|
+ localStorage.removeItem("placeIndex");
|
|
1257
|
+ localStorage.removeItem("referenceInfo");
|
|
1258
|
+ localStorage.removeItem("solution");
|
|
1259
|
+ localStorage.removeItem("order");
|
|
1260
|
+ setTimeout(function() {
|
|
1261
|
+ $("#fade").fadeOut();
|
|
1262
|
+ }, 2000);
|
|
1263
|
+ },
|
|
1264
|
+ handlerFn() {
|
|
1265
|
+ let that = this;
|
1183
|
1266
|
that.$http
|
1184
|
|
- .post("/service/bpm/bpm/start/bpm_incident", that.modelData)
|
1185
|
|
- .then(function(res) {
|
|
1267
|
+ .post("service/bpm/bpm/start/bpm_incident", that.modelData)
|
|
1268
|
+ .then(res => {
|
1186
|
1269
|
if (res.data) {
|
1187
|
1270
|
that.action.target = that.action.target + res.data.id;
|
1188
|
1271
|
that.action1.target = that.action1.target + res.data.id;
|
|
@@ -1192,30 +1275,51 @@ export default {
|
1192
|
1275
|
that.$refs.upload1.start();
|
1193
|
1276
|
}
|
1194
|
1277
|
}, 100);
|
1195
|
|
- $("#fade").fadeIn();
|
1196
|
|
- that.promptingConent = "恭喜您,新建报修成功!";
|
1197
|
|
- that.promptingStatus = true;
|
1198
|
|
- that.dialog = that
|
1199
|
|
- .$createDialog({
|
1200
|
|
- type: "alert",
|
1201
|
|
- title: "新建成功",
|
1202
|
|
- content: "点击返回首页",
|
1203
|
|
- icon: "cubeic-right",
|
1204
|
|
- onConfirm: (e, promptValue) => {
|
1205
|
|
- that.$router.push({ path: "/main" });
|
1206
|
|
- }
|
1207
|
|
- })
|
1208
|
|
- .show();
|
1209
|
|
- localStorage.removeItem("category");
|
1210
|
|
- localStorage.removeItem("model");
|
1211
|
|
- localStorage.removeItem("modelData");
|
1212
|
|
- localStorage.removeItem("placeIndex");
|
1213
|
|
- localStorage.removeItem("referenceInfo");
|
1214
|
|
- localStorage.removeItem("solution");
|
1215
|
|
- localStorage.removeItem("order");
|
1216
|
|
- setTimeout(function() {
|
1217
|
|
- $("#fade").fadeOut();
|
1218
|
|
- }, 2000);
|
|
1278
|
+ if (
|
|
1279
|
+ this.order == 1 &&
|
|
1280
|
+ (this.integralMechanism == 1 ||
|
|
1281
|
+ (this.integralMechanism == 2 &&
|
|
1282
|
+ this.loginUser.userType.value == 2))
|
|
1283
|
+ ) {
|
|
1284
|
+ //liaomingming
|
|
1285
|
+ this.$http
|
|
1286
|
+ .post("service/common/common/getDictionary", {
|
|
1287
|
+ key: "incident_integral_state",
|
|
1288
|
+ type: "list"
|
|
1289
|
+ })
|
|
1290
|
+ .then(result => {
|
|
1291
|
+ result = result.data;
|
|
1292
|
+ let auditState = result.find(v => v.value == 0);
|
|
1293
|
+ let postData = {
|
|
1294
|
+ incidentIntegral: {
|
|
1295
|
+ incidentId: res.data.bussId,
|
|
1296
|
+ auditState: auditState,
|
|
1297
|
+ handlerUser: this.loginUser.id,
|
|
1298
|
+ handlerUserName: this.loginUser.name,
|
|
1299
|
+ sourceScore: this.$refs.seiminModel.complexitySource,
|
|
1300
|
+ currentScore: this.$refs.seiminModel.complexity,
|
|
1301
|
+ updateReason:
|
|
1302
|
+ this.$refs.seiminModel.updateReason.trim() || undefined
|
|
1303
|
+ }
|
|
1304
|
+ };
|
|
1305
|
+ this.$http
|
|
1306
|
+ .post("service/bpm/data/addData/incidentIntegral", postData)
|
|
1307
|
+ .then(result1 => {
|
|
1308
|
+ if (result1.data.status == 200) {
|
|
1309
|
+ this.commonFn();
|
|
1310
|
+ } else {
|
|
1311
|
+ this.$createDialog({
|
|
1312
|
+ type: "alert",
|
|
1313
|
+ title: "系统错误,请稍后再试!",
|
|
1314
|
+ content: "",
|
|
1315
|
+ icon: "cubeic-wrong"
|
|
1316
|
+ }).show();
|
|
1317
|
+ }
|
|
1318
|
+ });
|
|
1319
|
+ });
|
|
1320
|
+ } else {
|
|
1321
|
+ this.commonFn();
|
|
1322
|
+ }
|
1219
|
1323
|
} else {
|
1220
|
1324
|
$("#fade").fadeIn();
|
1221
|
1325
|
that.promptingConent = "系统错误,请稍后再试!";
|
|
@@ -1237,7 +1341,6 @@ export default {
|
1237
|
1341
|
}, 2000);
|
1238
|
1342
|
}
|
1239
|
1343
|
});
|
1240
|
|
- event.preventDefault();
|
1241
|
1344
|
},
|
1242
|
1345
|
validateHandler(result) {
|
1243
|
1346
|
// this.submitHandler()
|
|
@@ -1685,6 +1788,7 @@ export default {
|
1685
|
1788
|
}
|
1686
|
1789
|
},
|
1687
|
1790
|
components: {
|
|
1791
|
+ seiminModel,
|
1688
|
1792
|
CubePage,
|
1689
|
1793
|
CubeButtonGroup,
|
1690
|
1794
|
DatePicker,
|