parent
d0ff48e23f
commit
5128d13f8b
@ -1,2 +0,0 @@
|
||||
export { default as operation } from './components/operation.vue'
|
||||
export { default as chargeBack } from './components/chargeBack.vue'
|
@ -1,324 +0,0 @@
|
||||
<template>
|
||||
<!-- 加根元素防止控制台报错 -->
|
||||
<section style="height: 100%">
|
||||
<tablePage @handlerAdd="handlerAdd()" @handlerExport="handlerExport()">
|
||||
<template #search>
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
label-width="68px"
|
||||
class="search-form"
|
||||
>
|
||||
<el-form-item label="工单地址" prop="gdms">
|
||||
<el-input
|
||||
v-model="queryParams.gdms"
|
||||
placeholder="请输入"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="工单类型" prop="gdType">
|
||||
<el-input
|
||||
v-model="queryParams.gdType"
|
||||
placeholder="请输入"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="工单等级" prop="gdLevel">
|
||||
<el-input
|
||||
v-model="queryParams.gdLevel"
|
||||
placeholder="请输入"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="工单状态" prop="status">
|
||||
<el-input
|
||||
v-model="queryParams.status"
|
||||
placeholder="请输入"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="录入时间" prop="userName">
|
||||
<el-input
|
||||
v-model="queryParams.userName"
|
||||
placeholder="请输入"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
<template #table>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="list"
|
||||
height="100%"
|
||||
:header-cell-style="proxy.getTableHeaderStyle"
|
||||
:cell-style="proxy.getTablerowStyle"
|
||||
>
|
||||
<!-- <el-table-column type="selection" width="50" align="center" /> -->
|
||||
<el-table-column
|
||||
label="工单地址"
|
||||
align="center"
|
||||
key="address"
|
||||
prop="address"
|
||||
/>
|
||||
<el-table-column
|
||||
label="工单类型"
|
||||
align="center"
|
||||
key="gdType"
|
||||
prop="gdType"
|
||||
>
|
||||
<template #default="scope">
|
||||
<dict-tag :options="gdlx" :value="scope.row.gdType" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="工单等级"
|
||||
align="center"
|
||||
key="gdLevel"
|
||||
prop="gdLevel"
|
||||
>
|
||||
<template #default="scope">
|
||||
<dict-tag :options="gdlevel" :value="scope.row.gdLevel" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="录入时间"
|
||||
align="center"
|
||||
key="createTime"
|
||||
prop="createTime"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="工单状态"
|
||||
align="center"
|
||||
key="status"
|
||||
prop="status"
|
||||
>
|
||||
<template #default="scope">
|
||||
<dict-tag :options="gd_status" :value="scope.row.status" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
width="400"
|
||||
class-name="small-padding fixed-width "
|
||||
>
|
||||
<template #default="scope">
|
||||
<div class="table-operation-row">
|
||||
<section v-show="scope.row.status == 0">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="FolderAdd"
|
||||
@click="handlerEdit(scope.row, 1)"
|
||||
>勘察录入</el-button
|
||||
>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="FolderRemove"
|
||||
@click="handlerRetreat(scope.row) "
|
||||
>退单</el-button
|
||||
>
|
||||
</section>
|
||||
<section v-show="scope.row.status == 1">
|
||||
<el-button link type="primary" icon="User">派发</el-button>
|
||||
<el-button link type="primary" icon="Edit">编辑</el-button>
|
||||
</section>
|
||||
<section v-show="scope.row.status == 4">
|
||||
<el-button link type="primary" icon="ChatRound"
|
||||
>处理反馈</el-button
|
||||
>
|
||||
<el-button link type="primary" icon="Bell"
|
||||
>消息催办</el-button
|
||||
>
|
||||
<el-button link type="primary" icon="Switch">转派</el-button>
|
||||
</section>
|
||||
<section>
|
||||
<el-button link type="primary" icon="View">查看</el-button>
|
||||
</section>
|
||||
<!-- v-show="scope.row.status != 0 && scope.row.status != 3" -->
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="Delete"
|
||||
@click="handlerDel(scope.row.id)"
|
||||
>删除</el-button
|
||||
>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
<template #pagination>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.current"
|
||||
v-model:limit="queryParams.size"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</template>
|
||||
</tablePage>
|
||||
<!-- 工单 -->
|
||||
<operation
|
||||
:dict="{
|
||||
gdlx,
|
||||
dflx,
|
||||
gdlevel,
|
||||
clfa,
|
||||
zyxt,
|
||||
gdms,
|
||||
}"
|
||||
v-model="open"
|
||||
:id="workId"
|
||||
:title="title"
|
||||
@confirm="getList()"
|
||||
></operation>
|
||||
<!-- 退单 -->
|
||||
<chargeBack v-model="retreat" :id="workId" :dictReason="reason" @confirm="getList()"></chargeBack>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { operation, chargeBack } from "./index";
|
||||
import { getyjList, delyj } from "@/api/emergency-rescue";
|
||||
import { ref } from "vue";
|
||||
import { onMounted } from "vue";
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { gdlx, gdms, gdlevel, clfa, zyxt, dflx, gd_status, reason } =
|
||||
proxy.useDict(
|
||||
"gdlx",
|
||||
"gdms",
|
||||
"gdlevel",
|
||||
"clfa",
|
||||
"zyxt",
|
||||
"dflx",
|
||||
"gd_status",
|
||||
"reason"
|
||||
);
|
||||
|
||||
const workId = ref(null);
|
||||
const loading = ref(false);
|
||||
const list = ref([]);
|
||||
const open = ref(false);
|
||||
const retreat = ref(false);
|
||||
|
||||
const title = ref("");
|
||||
const total = ref(0);
|
||||
const router = useRouter();
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
gdms: undefined,
|
||||
gdType: undefined,
|
||||
gdLevel: undefined,
|
||||
status: undefined,
|
||||
current: 1,
|
||||
size: 10,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
|
||||
/**
|
||||
* 获取列表数据
|
||||
*/
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
const res = await getyjList(queryParams.value);
|
||||
loading.value = false;
|
||||
list.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
};
|
||||
|
||||
/**
|
||||
* 搜索
|
||||
*/
|
||||
const handleQuery = () => {
|
||||
queryParams.value.pageNum = 1;
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* 重置查询条件
|
||||
*/
|
||||
const resetQuery = () => {
|
||||
proxy.resetForm("queryRef");
|
||||
handleQuery();
|
||||
};
|
||||
|
||||
/**
|
||||
* 退单
|
||||
* @param id
|
||||
*/
|
||||
const handlerRetreat =(row)=>{
|
||||
workId.value = row.id;
|
||||
retreat.value = true
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* 勘察录入
|
||||
* @param row
|
||||
*/
|
||||
const handlerEdit = (row, status) => {
|
||||
workId.value = row.id;
|
||||
open.value = true;
|
||||
title.value = "勘察录入";
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
const handlerAdd = () => {
|
||||
workId.value = null;
|
||||
open.value = true;
|
||||
title.value = "抢险工单录入";
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param id
|
||||
*/
|
||||
const handlerDel = (id) => {
|
||||
proxy.$modal
|
||||
.confirm('是否确认删除参数编号为"' + id + '"的数据项?')
|
||||
.then(function () {
|
||||
return delyj({ idList: id });
|
||||
})
|
||||
.then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
};
|
||||
/**
|
||||
* 导出
|
||||
*/
|
||||
const handlerExport = () => {};
|
||||
|
||||
const handlerInfo = () => {
|
||||
proxy.setActiveMenu();
|
||||
router.push({ path: "/emergency-rescue/workInfo-info" });
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
@ -0,0 +1,114 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
:title="title"
|
||||
v-model="visible"
|
||||
width="25%"
|
||||
class="x-dialog"
|
||||
:destroy-on-close="true"
|
||||
>
|
||||
<el-form
|
||||
class="dialog-data"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
ref="formRef"
|
||||
label-width="88px"
|
||||
>
|
||||
<el-form-item label="选择班组:" prop="deptId">
|
||||
<el-cascader
|
||||
v-model="form.deptId"
|
||||
:options="deptList"
|
||||
:props="cascaderProps"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="handlerClose()" icon="CloseBold">取消</el-button>
|
||||
<el-button type="primary" icon="Select" @click="confirm()"
|
||||
>确定</el-button
|
||||
>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
const { proxy } = getCurrentInstance();
|
||||
import { distributeyj } from "@/api/emergency-rescue";
|
||||
const props = defineProps({
|
||||
title: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
deptList: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
id: {
|
||||
type: Number,
|
||||
},
|
||||
modelValue: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
});
|
||||
const emit = defineEmits(["update:modelValue", "confirm"]);
|
||||
const cascaderProps = {
|
||||
value: "deptId",
|
||||
label: "deptName",
|
||||
};
|
||||
const data = reactive({
|
||||
form: {
|
||||
deptId: [],
|
||||
},
|
||||
|
||||
rules: {
|
||||
deptId: [{ required: true, message: "请选择办组人员", trigger: "blur" }],
|
||||
},
|
||||
});
|
||||
const { form, rules } = toRefs(data);
|
||||
|
||||
const visible = ref(props.modelValue);
|
||||
|
||||
const handlerClose = () => {
|
||||
visible.value = false;
|
||||
proxy.resetForm("formRef");
|
||||
};
|
||||
|
||||
const confirm = () => {
|
||||
proxy.$refs["formRef"].validate(async (valid) => {
|
||||
if (valid) {
|
||||
const deptId = form.value.deptId[form.value.deptId.length - 1];
|
||||
await distributeyj({
|
||||
id: props.id,
|
||||
deptId: deptId,
|
||||
});
|
||||
proxy.$modal.msgSuccess(`${title}成功`);
|
||||
emit("confirm");
|
||||
handlerClose();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
// 监听外部 modelValue 变化
|
||||
watch(
|
||||
() => props.modelValue,
|
||||
(val) => {
|
||||
visible.value = val;
|
||||
}
|
||||
);
|
||||
watch(visible, (val) => {
|
||||
emit("update:modelValue", val);
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.dialog-data {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
& > div {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,103 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
:title="title"
|
||||
v-model="visible"
|
||||
width="25%"
|
||||
class="x-dialog"
|
||||
:destroy-on-close="true"
|
||||
>
|
||||
<el-form
|
||||
class="dialog-data"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
ref="formRef"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item label="处理描述:" prop="clms">
|
||||
<el-input
|
||||
v-model="form.clms"
|
||||
:rows="2"
|
||||
type="textarea"
|
||||
placeholder="请填写"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="处理后照片:" prop="clhtp">
|
||||
<ImageUpload v-model="form.clhtp"></ImageUpload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="handlerClose()" icon="CloseBold">取消</el-button>
|
||||
<el-button type="primary" icon="Select" @click="confirm()"
|
||||
>确定</el-button
|
||||
>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
const { proxy } = getCurrentInstance();
|
||||
import { feedBackyj } from "@/api/emergency-rescue";
|
||||
const props = defineProps({
|
||||
title: {
|
||||
type: String,
|
||||
default: "工单处理反馈",
|
||||
},
|
||||
|
||||
id: {
|
||||
type: Number,
|
||||
},
|
||||
modelValue: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
});
|
||||
const emit = defineEmits(["update:modelValue", "confirm"]);
|
||||
|
||||
const data = reactive({
|
||||
form: {
|
||||
id: null,
|
||||
clhtp: undefined,
|
||||
clms: undefined,
|
||||
},
|
||||
rules: {
|
||||
clhtp: [{ required: true, message: "请上传处理后图片", trigger: "blur" }],
|
||||
clms: [{ required: true, message: "请填写处理描述", trigger: "blur" }],
|
||||
},
|
||||
});
|
||||
const { form, rules } = toRefs(data);
|
||||
const visible = ref(props.modelValue);
|
||||
|
||||
const handlerClose = () => {
|
||||
visible.value = false;
|
||||
proxy.resetForm("formRef");
|
||||
};
|
||||
|
||||
const confirm = () => {
|
||||
proxy.$refs["formRef"].validate(async (valid) => {
|
||||
if (valid) {
|
||||
form.value.id = props.id;
|
||||
await feedBackyj(form.value);
|
||||
proxy.$modal.msgSuccess(`反馈成功`);
|
||||
emit("confirm");
|
||||
handlerClose();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
// 监听外部 modelValue 变化
|
||||
watch(
|
||||
() => props.modelValue,
|
||||
(val) => {
|
||||
visible.value = val;
|
||||
}
|
||||
);
|
||||
watch(visible, (val) => {
|
||||
emit("update:modelValue", val);
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
@ -0,0 +1,4 @@
|
||||
export { default as operation } from './components/operation.vue'
|
||||
export { default as chargeBack } from './components/chargeBack.vue'
|
||||
export { default as distriBute } from './components/distriBute.vue'
|
||||
export { default as feedBack } from './components/feedBack.vue'
|
@ -0,0 +1,429 @@
|
||||
<template>
|
||||
|
||||
<tablePage @handlerAdd="handlerAdd()" @handlerExport="handlerExport()">
|
||||
<template #search>
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
label-width="68px"
|
||||
class="search-form"
|
||||
>
|
||||
<el-form-item label="工单地址" prop="address">
|
||||
<el-input
|
||||
v-model="queryParams.address"
|
||||
placeholder="请输入"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="工单类型" prop="gdType">
|
||||
<el-select
|
||||
v-model="queryParams.gdType"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in gdlx"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="工单等级" prop="gdLevel">
|
||||
<el-select
|
||||
v-model="queryParams.gdLevel"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in gdlevel"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="工单状态" prop="status">
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
placeholder="请选择"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in gd_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="录入时间" prop="userName">
|
||||
<el-date-picker
|
||||
type="datetimerange"
|
||||
start-placeholder="开始时间"
|
||||
end-placeholder="结束时间"
|
||||
format="YYYY-MM-DD HH:mm:ss"
|
||||
date-format="YYYY/MM/DD ddd"
|
||||
time-format="A hh:mm:ss"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
<template #table>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="list"
|
||||
height="100%"
|
||||
:header-cell-style="proxy.getTableHeaderStyle"
|
||||
:cell-style="proxy.getTablerowStyle"
|
||||
>
|
||||
<!-- <el-table-column type="selection" width="50" align="center" /> -->
|
||||
<el-table-column
|
||||
label="工单地址"
|
||||
align="center"
|
||||
key="address"
|
||||
prop="address"
|
||||
/>
|
||||
<el-table-column
|
||||
label="工单类型"
|
||||
align="center"
|
||||
key="gdType"
|
||||
prop="gdType"
|
||||
>
|
||||
<template #default="scope">
|
||||
<dict-tag :options="gdlx" :value="scope.row.gdType" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="工单等级"
|
||||
align="center"
|
||||
key="gdLevel"
|
||||
prop="gdLevel"
|
||||
>
|
||||
<template #default="scope">
|
||||
<dict-tag :options="gdlevel" :value="scope.row.gdLevel" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="录入时间"
|
||||
align="center"
|
||||
key="createTime"
|
||||
prop="createTime"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="工单状态"
|
||||
align="center"
|
||||
key="status"
|
||||
prop="status"
|
||||
>
|
||||
<template #default="scope">
|
||||
<dict-tag :options="gd_status" :value="scope.row.status" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
width="400"
|
||||
class-name="small-padding fixed-width "
|
||||
>
|
||||
<template #default="scope">
|
||||
<div class="table-operation-row">
|
||||
<section v-show="scope.row.status == 0">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="FolderAdd"
|
||||
@click="handlerEdit(scope.row, 1)"
|
||||
>勘察录入</el-button
|
||||
>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="FolderRemove"
|
||||
@click="handlerRetreat(scope.row)"
|
||||
>退单</el-button
|
||||
>
|
||||
</section>
|
||||
<section v-show="scope.row.status == 1">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="User"
|
||||
@click="handlerDistriBute(scope.row, '派发')"
|
||||
>派发</el-button
|
||||
>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="Edit"
|
||||
@click="handlerEdit(scope.row)"
|
||||
>编辑</el-button
|
||||
>
|
||||
</section>
|
||||
<section v-show="scope.row.status == 3">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="Switch"
|
||||
@click="handlerDistriBute(scope.row, '转派')"
|
||||
>转派</el-button
|
||||
>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="ChatRound"
|
||||
@click="handleFeedBack(scope.row)"
|
||||
>处理反馈</el-button
|
||||
>
|
||||
<el-button link type="primary" icon="Bell">消息催办</el-button>
|
||||
</section>
|
||||
<section>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="View"
|
||||
@click="handlerInfo(scope.row)"
|
||||
>查看</el-button
|
||||
>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="Delete"
|
||||
v-show="scope.row.status != 0 && scope.row.status != 3"
|
||||
@click="handlerDel(scope.row.id)"
|
||||
>删除</el-button
|
||||
>
|
||||
</section>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
<template #pagination>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.current"
|
||||
v-model:limit="queryParams.size"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</template>
|
||||
<!-- 工单 -->
|
||||
<operation
|
||||
:dict="{
|
||||
gdlx,
|
||||
dflx,
|
||||
gdlevel,
|
||||
clfa,
|
||||
zyxt,
|
||||
gdms,
|
||||
deptList,
|
||||
}"
|
||||
v-model="open"
|
||||
:id="workId"
|
||||
:title="title"
|
||||
@confirm="getList()"
|
||||
></operation>
|
||||
<!-- 退单 -->
|
||||
<chargeBack
|
||||
v-model="retreat"
|
||||
:id="workId"
|
||||
:dictReason="reason"
|
||||
@confirm="getList()"
|
||||
></chargeBack>
|
||||
<!-- 派发 -->
|
||||
<distriBute
|
||||
:id="workId"
|
||||
:title="title"
|
||||
v-model="distributeView"
|
||||
:deptList="deptList"
|
||||
@confirm="getList()"
|
||||
></distriBute>
|
||||
<!-- 处理反馈 -->
|
||||
<feedBack v-model="feedBackView" :id="workId" @confirm="getList()" />
|
||||
</tablePage>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { operation, chargeBack, distriBute, feedBack } from "./index";
|
||||
import { getyjList, delyj, getDetListById } from "@/api/emergency-rescue";
|
||||
import { ref } from "vue";
|
||||
import { onMounted } from "vue";
|
||||
import useUserStore from "@/store/modules/user";
|
||||
const { proxy } = getCurrentInstance();
|
||||
const userStore = useUserStore();
|
||||
const deptList = ref([]);
|
||||
const { gdlx, gdms, gdlevel, clfa, zyxt, dflx, gd_status, reason } =
|
||||
proxy.useDict(
|
||||
"gdlx",
|
||||
"gdms",
|
||||
"gdlevel",
|
||||
"clfa",
|
||||
"zyxt",
|
||||
"dflx",
|
||||
"gd_status",
|
||||
"reason"
|
||||
);
|
||||
|
||||
const workId = ref(null);
|
||||
const loading = ref(false);
|
||||
const list = ref([]);
|
||||
const open = ref(false);
|
||||
const retreat = ref(false);
|
||||
const distributeView = ref(false);
|
||||
const feedBackView = ref(false);
|
||||
|
||||
const title = ref("");
|
||||
const total = ref(0);
|
||||
const router = useRouter();
|
||||
const data = reactive({
|
||||
form: {},
|
||||
queryParams: {
|
||||
address: undefined,
|
||||
gdType: undefined,
|
||||
gdLevel: undefined,
|
||||
status: undefined,
|
||||
current: 1,
|
||||
size: 10,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const { queryParams, form, rules } = toRefs(data);
|
||||
|
||||
onMounted(() => {
|
||||
getList();
|
||||
getDeptTree();
|
||||
});
|
||||
|
||||
/**
|
||||
* 获取列表数据
|
||||
*/
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
const res = await getyjList(queryParams.value);
|
||||
loading.value = false;
|
||||
list.value = res.data.records;
|
||||
total.value = res.data.total;
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取系统组织架构
|
||||
*/
|
||||
const getDeptTree = async () => {
|
||||
const res = await getDetListById({
|
||||
deptId: userStore.deptId,
|
||||
});
|
||||
deptList.value = res;
|
||||
};
|
||||
|
||||
/**
|
||||
* 搜索
|
||||
*/
|
||||
const handleQuery = () => {
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
};
|
||||
|
||||
/**
|
||||
* 重置查询条件
|
||||
*/
|
||||
const resetQuery = () => {
|
||||
proxy.resetForm("queryRef");
|
||||
handleQuery();
|
||||
};
|
||||
|
||||
/**
|
||||
* 处理反馈
|
||||
* @param row
|
||||
*/
|
||||
const handleFeedBack = (row) => {
|
||||
workId.value = row.id;
|
||||
feedBackView.value = true;
|
||||
};
|
||||
|
||||
/**
|
||||
* 派发
|
||||
*/
|
||||
const handlerDistriBute = (row, text) => {
|
||||
workId.value = row.id;
|
||||
title.value = text;
|
||||
distributeView.value = true;
|
||||
};
|
||||
|
||||
/**
|
||||
* 退单
|
||||
* @param id
|
||||
*/
|
||||
const handlerRetreat = (row) => {
|
||||
workId.value = row.id;
|
||||
retreat.value = true;
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* 勘察录入
|
||||
* @param row
|
||||
*/
|
||||
const handlerEdit = (row, status) => {
|
||||
workId.value = row.id;
|
||||
title.value = status ? "勘察录入" : "编辑工单";
|
||||
open.value = true;
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
const handlerAdd = () => {
|
||||
workId.value = null;
|
||||
open.value = true;
|
||||
title.value = "抢险工单录入";
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除
|
||||
* @param id
|
||||
*/
|
||||
const handlerDel = (id) => {
|
||||
proxy.$modal
|
||||
.confirm('是否确认删除参数编号为"' + id + '"的数据项?')
|
||||
.then(function () {
|
||||
return delyj({ idList: id });
|
||||
})
|
||||
.then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
};
|
||||
/**
|
||||
* 导出
|
||||
*/
|
||||
const handlerExport = () => {
|
||||
proxy.download("/bYjgd/export", {}, `抢险工单.xlsx`);
|
||||
};
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
const handlerInfo = () => {
|
||||
proxy.setActiveMenu();
|
||||
router.push("/emergency/workOrder-info");
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
@ -0,0 +1,10 @@
|
||||
<template>
|
||||
<tableOperation>11111</tableOperation>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
Loading…
Reference in new issue