|
@@ -4,7 +4,28 @@
|
|
<el-row>
|
|
<el-row>
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
<el-form-item label="工单号:">
|
|
<el-form-item label="工单号:">
|
|
- <el-input v-model="taskinfo.taskCode" />
|
|
|
|
|
|
+ <el-input v-model="taskinfo.taskCode" />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+
|
|
|
|
+ <el-col :span="12">
|
|
|
|
+ <el-form-item label="行政区:">
|
|
|
|
+ <el-select
|
|
|
|
+ v-model="taskinfo.taskArea"
|
|
|
|
+ class="m-1"
|
|
|
|
+ placeholder="请选择"
|
|
|
|
+ >
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in sys_area"
|
|
|
|
+ :label="item.label"
|
|
|
|
+ :value="item.value"
|
|
|
|
+ ></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="12">
|
|
|
|
+ <el-form-item label="其他工单号">
|
|
|
|
+ <el-input v-model="taskinfo.taskOtherId" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
@@ -17,12 +38,22 @@
|
|
<el-option
|
|
<el-option
|
|
v-for="item in task_type"
|
|
v-for="item in task_type"
|
|
:label="item.label"
|
|
:label="item.label"
|
|
- :value=" parseInt(item.value)"
|
|
|
|
|
|
+ :value="parseInt(item.value)"
|
|
></el-option>
|
|
></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
|
+ <el-form-item label="道路名">
|
|
|
|
+ <el-input v-model="taskinfo.taskAddrRoad" />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="12">
|
|
|
|
+ <el-form-item label="投诉人电话">
|
|
|
|
+ <el-input v-model="taskinfo.taskComplainConnect" />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="12">
|
|
<el-form-item label="班组区域:">
|
|
<el-form-item label="班组区域:">
|
|
<el-tree-select
|
|
<el-tree-select
|
|
v-model="taskinfo.taskDeptRange"
|
|
v-model="taskinfo.taskDeptRange"
|
|
@@ -30,10 +61,6 @@
|
|
:data="treedept"
|
|
:data="treedept"
|
|
check-strictly="true"
|
|
check-strictly="true"
|
|
/>
|
|
/>
|
|
-
|
|
|
|
- <!-- <el-select v-model="taskinfo.taskDeptRange" class="m-1" placeholder="请选择">
|
|
|
|
- <el-option v-for="item in alldept" :label="item.deptName" :value="item.deptId"></el-option>
|
|
|
|
- </el-select> -->
|
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
@@ -95,55 +122,48 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
- <el-col :span="12">
|
|
|
|
|
|
+ <!-- <el-col :span="12">
|
|
<el-form-item label="设施编号:">
|
|
<el-form-item label="设施编号:">
|
|
<el-input v-model="taskinfo.taskFacilitieCode" />
|
|
<el-input v-model="taskinfo.taskFacilitieCode" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- </el-col>
|
|
|
|
-
|
|
|
|
- <el-col :span="12">
|
|
|
|
- <el-form-item label="来件备注:">
|
|
|
|
- <el-input v-model="taskinfo.taskFromRemark" />
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-col>
|
|
|
|
-
|
|
|
|
- <el-col :span="12">
|
|
|
|
- <el-form-item label="投诉人电话">
|
|
|
|
- <el-input v-model="taskinfo.taskComplainConnect" />
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-col>
|
|
|
|
|
|
+ </el-col> -->
|
|
|
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
- <el-form-item label="道路名">
|
|
|
|
- <el-input v-model="taskinfo.taskAddrRoad" />
|
|
|
|
|
|
+ <el-form-item label="是否需要确认:">
|
|
|
|
+ <el-select
|
|
|
|
+ v-model="taskinfo.remark"
|
|
|
|
+ class="m-1"
|
|
|
|
+ placeholder="请选择"
|
|
|
|
+ >
|
|
|
|
+ <el-option label="是" value="1"></el-option>
|
|
|
|
+ <el-option label="否" value="0"></el-option>
|
|
|
|
+ </el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
- <el-form-item label="其他工单号">
|
|
|
|
- <el-input v-model="taskinfo.taskOtherId" />
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="12">
|
|
|
|
- <el-form-item label="行政区属:">
|
|
|
|
|
|
+ <el-form-item label="接单人员">
|
|
<el-select
|
|
<el-select
|
|
- v-model="taskinfo.taskArea"
|
|
|
|
- class="m-1"
|
|
|
|
- placeholder="请选择"
|
|
|
|
|
|
+ v-model="taskinfo.taskReporter"
|
|
|
|
+ placeholder="请选择人员"
|
|
|
|
+ style="width: 100%"
|
|
|
|
+ filterable
|
|
|
|
+ allow-create
|
|
>
|
|
>
|
|
<el-option
|
|
<el-option
|
|
- v-for="item in sys_area"
|
|
|
|
- :label="item.label"
|
|
|
|
- :value="item.value"
|
|
|
|
- ></el-option>
|
|
|
|
|
|
+ v-for="item in allusers"
|
|
|
|
+ :label="item.nickName"
|
|
|
|
+ :value="item.userId"
|
|
|
|
+ />
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
- <!-- <el-col :span="24">
|
|
|
|
- <el-form-item label="备注">
|
|
|
|
- <el-input type="textarea" v-model="taskinfo.remark" />
|
|
|
|
|
|
+
|
|
|
|
+ <el-col :span="24">
|
|
|
|
+ <el-form-item label="来件备注:">
|
|
|
|
+ <el-input v-model="taskinfo.taskFromRemark" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- </el-col> -->
|
|
|
|
|
|
+ </el-col>
|
|
|
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
<el-form-item label="事件地址">
|
|
<el-form-item label="事件地址">
|
|
@@ -162,7 +182,7 @@
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
- <el-form-item label="照片附件"> </el-form-item>
|
|
|
|
|
|
+ <el-form-item label="照片附件(4张)"> </el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
@@ -183,9 +203,16 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import { ref, watch, defineComponent, onMounted } from "vue";
|
|
import { ref, watch, defineComponent, onMounted } from "vue";
|
|
|
|
+import { listTask } from "@/api/system/task";
|
|
import {
|
|
import {
|
|
- listTask,
|
|
|
|
-} from "@/api/system/task";
|
|
|
|
|
|
+ changeUserStatus,
|
|
|
|
+ listUser,
|
|
|
|
+ resetUserPwd,
|
|
|
|
+ delUser,
|
|
|
|
+ getUser,
|
|
|
|
+ updateUser,
|
|
|
|
+ addUser,
|
|
|
|
+} from "@/api/system/user";
|
|
import { useDict } from "@/utils/dict";
|
|
import { useDict } from "@/utils/dict";
|
|
import { cloneDeep } from "lodash";
|
|
import { cloneDeep } from "lodash";
|
|
import { listDept, getDept } from "@/api/system/dept";
|
|
import { listDept, getDept } from "@/api/system/dept";
|
|
@@ -217,11 +244,12 @@ export default defineComponent({
|
|
"task_event_type",
|
|
"task_event_type",
|
|
"task_event_category",
|
|
"task_event_category",
|
|
"sys_area"
|
|
"sys_area"
|
|
- );
|
|
|
|
|
|
+ );
|
|
const taskinfo = ref({});
|
|
const taskinfo = ref({});
|
|
- listTask({ taskCode: moment().year() + "" }).then(res => {
|
|
|
|
- taskinfo.value.taskCode = moment().year()+(Array(3).join(0) + (res.total+1)).slice(-3)
|
|
|
|
- })
|
|
|
|
|
|
+ listTask({ taskCode: moment().year() + "" }).then((res) => {
|
|
|
|
+ taskinfo.value.taskCode =
|
|
|
|
+ moment().year() + (Array(3).join(0) + (res.total + 1)).slice(-3);
|
|
|
|
+ });
|
|
|
|
|
|
watch(
|
|
watch(
|
|
() => formlocation.value.addr,
|
|
() => formlocation.value.addr,
|
|
@@ -234,19 +262,25 @@ export default defineComponent({
|
|
() => {
|
|
() => {
|
|
taskinfo.value.taskLocation = formlocation.value.locations;
|
|
taskinfo.value.taskLocation = formlocation.value.locations;
|
|
if (formlocation.value.locations != "") {
|
|
if (formlocation.value.locations != "") {
|
|
- mapSelect.value.getlocationaddr(formlocation.value.locations, (data) => {
|
|
|
|
- var qu = data.regeocode.addressComponent.district;
|
|
|
|
- if (qu) {
|
|
|
|
- for (var i in sys_area.value) {
|
|
|
|
- if (sys_area.value[i].label == qu) {
|
|
|
|
- taskinfo.value.taskArea = sys_area.value[i].value
|
|
|
|
|
|
+ mapSelect.value.getlocationaddr(
|
|
|
|
+ formlocation.value.locations,
|
|
|
|
+ (data) => {
|
|
|
|
+ var qu = data.regeocode.addressComponent.district;
|
|
|
|
+ if (qu) {
|
|
|
|
+ for (var i in sys_area.value) {
|
|
|
|
+ if (sys_area.value[i].label == qu) {
|
|
|
|
+ taskinfo.value.taskArea = sys_area.value[i].value;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- })
|
|
|
|
- }
|
|
|
|
|
|
+ );
|
|
|
|
+ }
|
|
}
|
|
}
|
|
);
|
|
);
|
|
|
|
+ const store = useStore();
|
|
|
|
+ const getters = computed(() => store.getters);
|
|
|
|
+
|
|
|
|
|
|
const searchaddr = () => {
|
|
const searchaddr = () => {
|
|
if (taskinfo.value.taskAddr) {
|
|
if (taskinfo.value.taskAddr) {
|
|
@@ -259,32 +293,54 @@ export default defineComponent({
|
|
listDept().then((response) => {
|
|
listDept().then((response) => {
|
|
alldept.value = cloneDeep(response.data);
|
|
alldept.value = cloneDeep(response.data);
|
|
});
|
|
});
|
|
-
|
|
|
|
|
|
+ const allusers = ref([]);
|
|
|
|
+ listUser({ pageSize: 1000 }).then((res) => {
|
|
|
|
+ allusers.value = res.rows;
|
|
|
|
+ });
|
|
const doinit = (data) => {
|
|
const doinit = (data) => {
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+ // console.log(getters.value)
|
|
taskinfo.value = data;
|
|
taskinfo.value = data;
|
|
|
|
|
|
if (data.taskId == null) {
|
|
if (data.taskId == null) {
|
|
fileList.value = "";
|
|
fileList.value = "";
|
|
formlocation.value = { addr: "", locations: "" };
|
|
formlocation.value = { addr: "", locations: "" };
|
|
|
|
+ taskinfo.value.taskReporter = getters.value.userId;
|
|
|
|
+
|
|
} else {
|
|
} else {
|
|
- if (taskinfo.value.taskDeptRange!=null && taskinfo.value.taskDeptRange!="" && taskinfo.value.taskDeptRange!=undefined && !Array.isArray(taskinfo.value.taskDeptRange)) {
|
|
|
|
- taskinfo.value.taskDeptRange = taskinfo.value.taskDeptRange.split(",").map(i => parseInt(i));
|
|
|
|
|
|
+ if (
|
|
|
|
+ taskinfo.value.taskDeptRange != null &&
|
|
|
|
+ taskinfo.value.taskDeptRange != "" &&
|
|
|
|
+ taskinfo.value.taskDeptRange != undefined &&
|
|
|
|
+ !Array.isArray(taskinfo.value.taskDeptRange)
|
|
|
|
+ ) {
|
|
|
|
+ taskinfo.value.taskDeptRange = taskinfo.value.taskDeptRange
|
|
|
|
+ .split(",")
|
|
|
|
+ .map((i) => parseInt(i));
|
|
|
|
+ }
|
|
|
|
+ if (taskinfo.value.taskReporter == null ||
|
|
|
|
+ taskinfo.value.taskReporter == "" ||
|
|
|
|
+ taskinfo.value.taskReporter == undefined) {
|
|
|
|
+ taskinfo.value.taskReporter = getters.value.userId;
|
|
}
|
|
}
|
|
- if (taskinfo.value.taskPics!=null && taskinfo.value.taskPics!="" && taskinfo.value.taskPics!=undefined) {
|
|
|
|
|
|
+ if (
|
|
|
|
+ taskinfo.value.taskPics != null &&
|
|
|
|
+ taskinfo.value.taskPics != "" &&
|
|
|
|
+ taskinfo.value.taskPics != undefined
|
|
|
|
+ ) {
|
|
fileList.value = taskinfo.value.taskPics;
|
|
fileList.value = taskinfo.value.taskPics;
|
|
}
|
|
}
|
|
- if (taskinfo.value.taskAddr != null && taskinfo.value.taskAddr != "" && taskinfo.value.taskAddr != undefined) {
|
|
|
|
|
|
+ if (
|
|
|
|
+ taskinfo.value.taskAddr != null &&
|
|
|
|
+ taskinfo.value.taskAddr != "" &&
|
|
|
|
+ taskinfo.value.taskAddr != undefined
|
|
|
|
+ ) {
|
|
formlocation.value.addr = taskinfo.value.taskAddr;
|
|
formlocation.value.addr = taskinfo.value.taskAddr;
|
|
formlocation.value.locations = taskinfo.value.taskLocation;
|
|
formlocation.value.locations = taskinfo.value.taskLocation;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
};
|
|
};
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
- doinit(props.taskinfo);
|
|
|
|
|
|
+ doinit(props.taskinfo);
|
|
});
|
|
});
|
|
|
|
|
|
const fileList = ref([]);
|
|
const fileList = ref([]);
|
|
@@ -295,8 +351,8 @@ export default defineComponent({
|
|
}
|
|
}
|
|
);
|
|
);
|
|
const updateallvalue = () => {
|
|
const updateallvalue = () => {
|
|
- context.emit("update:taskinfo", taskinfo.value);
|
|
|
|
- }
|
|
|
|
|
|
+ context.emit("update:taskinfo", taskinfo.value);
|
|
|
|
+ };
|
|
|
|
|
|
function setdatakey(dept) {
|
|
function setdatakey(dept) {
|
|
if (dept.children) {
|
|
if (dept.children) {
|
|
@@ -322,8 +378,6 @@ export default defineComponent({
|
|
treedept.value = [setdatakey(res.data[0])];
|
|
treedept.value = [setdatakey(res.data[0])];
|
|
});
|
|
});
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
return {
|
|
return {
|
|
mapSelect,
|
|
mapSelect,
|
|
MapSelect,
|
|
MapSelect,
|
|
@@ -331,6 +385,7 @@ export default defineComponent({
|
|
taskinfo,
|
|
taskinfo,
|
|
searchaddr,
|
|
searchaddr,
|
|
alldept,
|
|
alldept,
|
|
|
|
+ allusers,
|
|
treedept,
|
|
treedept,
|
|
task_status,
|
|
task_status,
|
|
task_type,
|
|
task_type,
|