|
@@ -93,7 +93,11 @@
|
|
<el-button text size="small" @click.stop="edittask(scope.row)"
|
|
<el-button text size="small" @click.stop="edittask(scope.row)"
|
|
>修改
|
|
>修改
|
|
</el-button>
|
|
</el-button>
|
|
- <el-button text size="small" @click.stop="deltask(scope.row)">删除</el-button>
|
|
|
|
|
|
+ <el-popconfirm title="确定删除?" @confirm="deltask(scope.row)">
|
|
|
|
+ <template #reference>
|
|
|
|
+ <el-button text size="small" @click.stop="">删除</el-button>
|
|
|
|
+ </template>
|
|
|
|
+ </el-popconfirm>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
@@ -123,7 +127,11 @@
|
|
<el-dialog
|
|
<el-dialog
|
|
v-model="showadd"
|
|
v-model="showadd"
|
|
v-loading="loading"
|
|
v-loading="loading"
|
|
- :title="`${ (taskinfo.taskId==null||taskinfo.taskId==undefined) ?'新增任务':'编辑任务'}`"
|
|
|
|
|
|
+ :title="`${
|
|
|
|
+ taskinfo.taskId == null || taskinfo.taskId == undefined
|
|
|
|
+ ? '新增任务'
|
|
|
|
+ : '编辑任务'
|
|
|
|
+ }`"
|
|
width="70%"
|
|
width="70%"
|
|
draggable
|
|
draggable
|
|
>
|
|
>
|
|
@@ -137,9 +145,6 @@
|
|
</span>
|
|
</span>
|
|
</template>
|
|
</template>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -163,7 +168,7 @@ import { cloneDeep } from "lodash";
|
|
import { isArray } from "@vue/shared";
|
|
import { isArray } from "@vue/shared";
|
|
import { useRoute } from "vue-router";
|
|
import { useRoute } from "vue-router";
|
|
|
|
|
|
-const formlocation = ref({ addr: "", locations: ""});
|
|
|
|
|
|
+const formlocation = ref({ addr: "", locations: "" });
|
|
|
|
|
|
const {
|
|
const {
|
|
task_status,
|
|
task_status,
|
|
@@ -190,31 +195,33 @@ const showadd = ref(false);
|
|
const qdate = ref([]);
|
|
const qdate = ref([]);
|
|
const tableData = ref([]);
|
|
const tableData = ref([]);
|
|
const pagedata = ref({});
|
|
const pagedata = ref({});
|
|
-const taskinfo = ref({taskName: null,
|
|
|
|
- taskContent: null,
|
|
|
|
- taskAddr: null,
|
|
|
|
- taskLocation: null,
|
|
|
|
- taskCode: null,
|
|
|
|
- taskType: null,
|
|
|
|
- taskEventType: null,
|
|
|
|
- taskEventCategory: null,
|
|
|
|
- taskFromRemark: null,
|
|
|
|
- taskAddrRoad: null,
|
|
|
|
- taskOtherId: null,
|
|
|
|
- taskTime: null,
|
|
|
|
- taskArea: "1",
|
|
|
|
- taskReqCompleteTime: null,
|
|
|
|
- status: 1,
|
|
|
|
- taskId:null,
|
|
|
|
- remark: "",
|
|
|
|
- taskCreater: null,
|
|
|
|
- taskReporter: null,
|
|
|
|
- taskPics: null,
|
|
|
|
- taskVideos: null,
|
|
|
|
- taskComplainConnect: null,
|
|
|
|
- taskDeptRange: "",
|
|
|
|
- taskFacilitieCode: "",
|
|
|
|
- remark: "",});
|
|
|
|
|
|
+const taskinfo = ref({
|
|
|
|
+ taskName: null,
|
|
|
|
+ taskContent: null,
|
|
|
|
+ taskAddr: null,
|
|
|
|
+ taskLocation: null,
|
|
|
|
+ taskCode: null,
|
|
|
|
+ taskType: null,
|
|
|
|
+ taskEventType: null,
|
|
|
|
+ taskEventCategory: null,
|
|
|
|
+ taskFromRemark: null,
|
|
|
|
+ taskAddrRoad: null,
|
|
|
|
+ taskOtherId: null,
|
|
|
|
+ taskTime: null,
|
|
|
|
+ taskArea: "1",
|
|
|
|
+ taskReqCompleteTime: null,
|
|
|
|
+ status: 1,
|
|
|
|
+ taskId: null,
|
|
|
|
+ remark: "",
|
|
|
|
+ taskCreater: null,
|
|
|
|
+ taskReporter: null,
|
|
|
|
+ taskPics: null,
|
|
|
|
+ taskVideos: null,
|
|
|
|
+ taskComplainConnect: null,
|
|
|
|
+ taskDeptRange: "",
|
|
|
|
+ taskFacilitieCode: "",
|
|
|
|
+ remark: "",
|
|
|
|
+});
|
|
const taskaddref = ref();
|
|
const taskaddref = ref();
|
|
const route = useRoute();
|
|
const route = useRoute();
|
|
const currentstatus = computed(() => route.params.status);
|
|
const currentstatus = computed(() => route.params.status);
|
|
@@ -268,9 +275,9 @@ const ontaskadd = async () => {
|
|
loading.value = true;
|
|
loading.value = true;
|
|
|
|
|
|
if (taskobj.taskId) {
|
|
if (taskobj.taskId) {
|
|
- await updateTask(taskobj);
|
|
|
|
|
|
+ await updateTask(taskobj);
|
|
} else {
|
|
} else {
|
|
- await addTask(taskobj);
|
|
|
|
|
|
+ await addTask(taskobj);
|
|
}
|
|
}
|
|
|
|
|
|
loading.value = false;
|
|
loading.value = false;
|
|
@@ -299,14 +306,13 @@ const edittask = (row) => {
|
|
taskinfo.value = cloneDeep(row);
|
|
taskinfo.value = cloneDeep(row);
|
|
showadd.value = true;
|
|
showadd.value = true;
|
|
taskaddref.value?.doinit(taskinfo.value);
|
|
taskaddref.value?.doinit(taskinfo.value);
|
|
-}
|
|
|
|
|
|
+};
|
|
const deltask = (row) => {
|
|
const deltask = (row) => {
|
|
- delTask(row.taskId).then(res => {
|
|
|
|
|
|
+ delTask(row.taskId).then((res) => {
|
|
ElMessage.success("删除成功");
|
|
ElMessage.success("删除成功");
|
|
getList();
|
|
getList();
|
|
- })
|
|
|
|
-
|
|
|
|
-}
|
|
|
|
|
|
+ });
|
|
|
|
+};
|
|
|
|
|
|
onMounted(() => {});
|
|
onMounted(() => {});
|
|
</script>
|
|
</script>
|