|
@@ -147,17 +147,18 @@
|
|
{{ parseTime(scope.row.createTimeView, '{y}-{m}-{d}') }}
|
|
{{ parseTime(scope.row.createTimeView, '{y}-{m}-{d}') }}
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column label="检查表" width="300" align="left" prop="checkFormName">
|
|
|
|
|
|
+ <el-table-column label="检查表" width="200" align="left" prop="checkFormName">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
{{ scope.row.gridName + " - " + scope.row.checkFormName}}
|
|
{{ scope.row.gridName + " - " + scope.row.checkFormName}}
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="检查时间" width="158" align="center" prop="checkTimeView" />
|
|
<el-table-column label="检查时间" width="158" align="center" prop="checkTimeView" />
|
|
- <el-table-column label="状态" width="60" align="center" prop="status">
|
|
|
|
- <template #default="scope">
|
|
|
|
- {{ getStatusTxt(scope.row.status) }}
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
|
|
+ <el-table-column label="状态" width="70" align="center" prop="statusTxt" />
|
|
|
|
+ <el-table-column label="撤回申请" width="80" prop="revokeStatusTxt">
|
|
|
|
+ <template #default="scope">
|
|
|
|
+ {{ scope.row.revokeStatus === 0 ? '-' : scope.row.revokeStatusTxt }}
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
<el-table-column label="检查单号" width="231" align="left" prop="checkFormNo" />
|
|
<el-table-column label="检查单号" width="231" align="left" prop="checkFormNo" />
|
|
<el-table-column label="所属部门" width="320" align="left" prop="departmentTxt" />
|
|
<el-table-column label="所属部门" width="320" align="left" prop="departmentTxt" />
|
|
<el-table-column label="所属关区" align="center" prop="customsName" />
|
|
<el-table-column label="所属关区" align="center" prop="customsName" />
|
|
@@ -174,23 +175,39 @@
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
label="操作"
|
|
label="操作"
|
|
- align="center"
|
|
|
|
|
|
+ align="left"
|
|
width="150"
|
|
width="150"
|
|
fixed="right"
|
|
fixed="right"
|
|
class-name="small-padding fixed-width"
|
|
class-name="small-padding fixed-width"
|
|
>
|
|
>
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
<el-button
|
|
<el-button
|
|
|
|
+ v-if="scope.row.status === 20"
|
|
link
|
|
link
|
|
type="primary"
|
|
type="primary"
|
|
@click="handleDetail(scope.row)"
|
|
@click="handleDetail(scope.row)"
|
|
>详情</el-button>
|
|
>详情</el-button>
|
|
<el-button
|
|
<el-button
|
|
|
|
+ v-if="(scope.row.status === 20 && (scope.row.revokeStatus == 0 || scope.row.revokeStatus === 30))"
|
|
|
|
+ link
|
|
|
|
+ type="warning"
|
|
|
|
+ icon="View"
|
|
|
|
+ @click="onRevoke(scope.row)"
|
|
|
|
+ >撤回</el-button>
|
|
|
|
+ <el-button
|
|
|
|
+ v-if="scope.row.status === 0"
|
|
link
|
|
link
|
|
type="primary"
|
|
type="primary"
|
|
icon="Edit"
|
|
icon="Edit"
|
|
- @click="handleUpdate(scope.row)"
|
|
|
|
- >修改</el-button>
|
|
|
|
|
|
+ @click="handleDoForm(scope.row)"
|
|
|
|
+ >填报</el-button>
|
|
|
|
+ <el-button
|
|
|
|
+ v-if="scope.row.status === 10"
|
|
|
|
+ link
|
|
|
|
+ type="danger"
|
|
|
|
+ icon="Promotion"
|
|
|
|
+ @click="onSubmitAdmin(scope.row.id)"
|
|
|
|
+ >提交</el-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
@@ -203,101 +220,35 @@
|
|
@pagination="getList"
|
|
@pagination="getList"
|
|
/>
|
|
/>
|
|
|
|
|
|
- <!-- 添加对话框 -->
|
|
|
|
- <el-dialog
|
|
|
|
- :title="title"
|
|
|
|
- v-model="dialogOpenCreate"
|
|
|
|
- width="750px"
|
|
|
|
- append-to-body
|
|
|
|
- >
|
|
|
|
- <el-form
|
|
|
|
- ref="formCrateRef"
|
|
|
|
- :model="formCreate"
|
|
|
|
- :rules="rulesCreate"
|
|
|
|
- label-width="135px"
|
|
|
|
- >
|
|
|
|
- <el-form-item label="分类名称" prop="categoryName">
|
|
|
|
- <el-input v-model="formCreate.categoryName" placeholder="请输入分类名称" />
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="检查频率" prop="checkCycle">
|
|
|
|
- <el-select
|
|
|
|
- v-model="formCreate.checkCycle"
|
|
|
|
- placeholder="请选择"
|
|
|
|
- style="width: 240px"
|
|
|
|
- >
|
|
|
|
- <el-option
|
|
|
|
- v-for="item in checkCycleList"
|
|
|
|
- :key="item.value"
|
|
|
|
- :label="item.label"
|
|
|
|
- :value="item.value"
|
|
|
|
- />
|
|
|
|
- </el-select>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="描述" prop="description">
|
|
|
|
- <el-input v-model="formCreate.description" type="textarea" :autosize="{ minRows: 2, maxRows: 4 }" placeholder="请输入描述" />
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-form>
|
|
|
|
- <template #footer>
|
|
|
|
- <div class="dialog-footer">
|
|
|
|
- <el-button
|
|
|
|
- :loading="createLoading"
|
|
|
|
- type="primary"
|
|
|
|
- @click="submitCreate"
|
|
|
|
- >确 定</el-button>
|
|
|
|
- <el-button @click="cancelCreate">取 消</el-button>
|
|
|
|
- </div>
|
|
|
|
- </template>
|
|
|
|
- </el-dialog>
|
|
|
|
-
|
|
|
|
- <!-- 修改对话框 -->
|
|
|
|
- <el-dialog
|
|
|
|
- :title="title"
|
|
|
|
- v-model="dialogOpenModify"
|
|
|
|
- width="750px"
|
|
|
|
- append-to-body
|
|
|
|
- >
|
|
|
|
- <el-form
|
|
|
|
- :disabled="isDetail"
|
|
|
|
- ref="formModifyRef"
|
|
|
|
- :model="formModify"
|
|
|
|
- :rules="rulesModify"
|
|
|
|
- label-width="135px"
|
|
|
|
|
|
+ <!-- 撤回申请模态框 -->
|
|
|
|
+ <el-dialog
|
|
|
|
+ :title="titleRevoke"
|
|
|
|
+ v-model="showRevoke"
|
|
|
|
+ width="900px"
|
|
|
|
+ append-to-body
|
|
>
|
|
>
|
|
- <el-form-item label="分类名称" prop="categoryName">
|
|
|
|
- <el-input v-model="formModify.id" type="hidden" />
|
|
|
|
- <el-input v-model="formModify.categoryName" placeholder="请输入分类名称" />
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="检查频率" prop="checkCycle">
|
|
|
|
- <el-select
|
|
|
|
- v-model="formModify.checkCycle"
|
|
|
|
- placeholder="请选择"
|
|
|
|
- style="width: 240px"
|
|
|
|
- >
|
|
|
|
- <el-option
|
|
|
|
- v-for="item in checkCycleList"
|
|
|
|
- :key="item.value"
|
|
|
|
- :label="item.label"
|
|
|
|
- :value="item.value"
|
|
|
|
- />
|
|
|
|
- </el-select>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="描述" prop="description">
|
|
|
|
- <el-input v-model="formModify.description" type="textarea" :autosize="{ minRows: 2, maxRows: 4 }" placeholder="请输入描述" />
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-form>
|
|
|
|
- <template #footer>
|
|
|
|
|
|
+ <el-form
|
|
|
|
+ ref="refFormRevoke"
|
|
|
|
+ :model="formRevoke"
|
|
|
|
+ :rules="rulesRevoke"
|
|
|
|
+ label-width="85px"
|
|
|
|
+ >
|
|
|
|
+ <el-form-item label="撤回理由" prop="comment">
|
|
|
|
+ <el-input v-model="formRevoke.id" type="hidden" />
|
|
|
|
+ <el-input v-model="formRevoke.comment" type="textarea" :autosize="{ minRows: 2, maxRows: 4 }" placeholder="请输入" />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-form>
|
|
|
|
+ <template #footer>
|
|
<div class="dialog-footer">
|
|
<div class="dialog-footer">
|
|
<el-button
|
|
<el-button
|
|
- v-if="isDetail === false"
|
|
|
|
- :loading="modifyLoading"
|
|
|
|
|
|
+ :loading="loadingRevoke"
|
|
type="primary"
|
|
type="primary"
|
|
- @click="submitModify"
|
|
|
|
- >确 定</el-button>
|
|
|
|
- <el-button @click="cancelModify">{{cancelModifyTxt}}</el-button>
|
|
|
|
- <el-button type="primary" v-if="isDetail" @click="changeModify">编 辑</el-button>
|
|
|
|
|
|
+ @click="revokeSubmit"
|
|
|
|
+ >提 交</el-button>
|
|
|
|
+ <el-button @click="showRevoke = false">取 消</el-button>
|
|
</div>
|
|
</div>
|
|
- </template>
|
|
|
|
- </el-dialog>
|
|
|
|
|
|
+ </template>
|
|
|
|
+ </el-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -321,11 +272,22 @@ const dangerCategoryList = ref([]);
|
|
const checkFormStatusList = ref([]);
|
|
const checkFormStatusList = ref([]);
|
|
const dataList = ref([]);
|
|
const dataList = ref([]);
|
|
|
|
|
|
-const createLoading = ref(false);
|
|
|
|
-const dialogOpenCreate = ref(false);
|
|
|
|
|
|
|
|
-const modifyLoading = ref(false);
|
|
|
|
-const dialogOpenModify = ref(false);
|
|
|
|
|
|
+
|
|
|
|
+const titleRevoke = ref('');
|
|
|
|
+const showRevoke = ref(false);
|
|
|
|
+const loadingRevoke = ref(false);
|
|
|
|
+const formRevoke = ref({
|
|
|
|
+ id: undefined,
|
|
|
|
+ comment: undefined
|
|
|
|
+});
|
|
|
|
+const rulesRevoke = ref({
|
|
|
|
+ comment: [
|
|
|
|
+ { required: true, message: "撤回说明不能为空", trigger: "blur" },
|
|
|
|
+ { max: 500, message: '撤回说明字符长度不能超过500', trigger: 'blur' }
|
|
|
|
+ ]
|
|
|
|
+});
|
|
|
|
+
|
|
|
|
|
|
const total = ref(0);
|
|
const total = ref(0);
|
|
const dateRangeCheckTime = ref([]);
|
|
const dateRangeCheckTime = ref([]);
|
|
@@ -349,24 +311,6 @@ const queryParams = ref({
|
|
hasDanger: undefined
|
|
hasDanger: undefined
|
|
});
|
|
});
|
|
|
|
|
|
-const formCreate = ref({});
|
|
|
|
-const rulesCreate = ref({
|
|
|
|
- categoryName: [
|
|
|
|
- { required: true, message: "分类名称不能为空", trigger: "blur" },
|
|
|
|
- { max: 100, message: '分类名称字符长度不能超过100', trigger: 'blur' }
|
|
|
|
- ],
|
|
|
|
- description: [{ max: 200, message: '分类描述字符长度不能超过200', trigger: 'blur' }],
|
|
|
|
-});
|
|
|
|
-
|
|
|
|
-const formModify = ref({});
|
|
|
|
-const rulesModify = ref({
|
|
|
|
- categoryName: [
|
|
|
|
- { required: true, message: "分类名称不能为空", trigger: "blur" },
|
|
|
|
- { max: 100, message: '分类名称字符长度不能超过1200', trigger: 'blur' }
|
|
|
|
- ],
|
|
|
|
- description: [{ max: 200, message: '分类描述字符长度不能超过500', trigger: 'blur' }],
|
|
|
|
-});
|
|
|
|
-
|
|
|
|
|
|
|
|
|
|
|
|
/** 查询列表 */
|
|
/** 查询列表 */
|
|
@@ -407,122 +351,57 @@ function handleSelectionChange(selection) {
|
|
single.value = selection.length != 1;
|
|
single.value = selection.length != 1;
|
|
multiple.value = !selection.length;
|
|
multiple.value = !selection.length;
|
|
}
|
|
}
|
|
-/** 取消新增按钮 */
|
|
|
|
-function cancelCreate() {
|
|
|
|
- dialogOpenCreate.value = false;
|
|
|
|
- resetCreate();
|
|
|
|
-}
|
|
|
|
-/** 新增表单重置 */
|
|
|
|
-function resetCreate() {
|
|
|
|
- formCreate.value = {
|
|
|
|
- categoryName: undefined,
|
|
|
|
- description: undefined,
|
|
|
|
- };
|
|
|
|
- proxy.resetForm("formCrateRef");
|
|
|
|
-}
|
|
|
|
-/** 新增按钮 */
|
|
|
|
-function handleAdd() {
|
|
|
|
- resetCreate();
|
|
|
|
- dialogOpenCreate.value = true;
|
|
|
|
- title.value = "提交隐患检查";
|
|
|
|
-}
|
|
|
|
-/** 新增提交 */
|
|
|
|
-function submitCreate() {
|
|
|
|
- proxy.$refs["formCrateRef"].validate((valid) => {
|
|
|
|
- if (valid) {
|
|
|
|
- createLoading.value = true;
|
|
|
|
|
|
|
|
- create(formCreate.value)
|
|
|
|
- .then((response) => {
|
|
|
|
- proxy.$modal.msgSuccess("提交成功");
|
|
|
|
- dialogOpenCreate.value = false;
|
|
|
|
- getList();
|
|
|
|
- })
|
|
|
|
- .finally(() => {
|
|
|
|
- createLoading.value = false;
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
-}
|
|
|
|
-/** 取消编辑按钮 */
|
|
|
|
-function cancelModify() {
|
|
|
|
- dialogOpenModify.value = false;
|
|
|
|
- resetModify();
|
|
|
|
-}
|
|
|
|
-/** 编辑表单重置 */
|
|
|
|
-function resetModify() {
|
|
|
|
- formModify.value = {
|
|
|
|
- id: undefined,
|
|
|
|
- categoryName: undefined,
|
|
|
|
- description: undefined,
|
|
|
|
- };
|
|
|
|
- proxy.resetForm("formModifyRef");
|
|
|
|
-}
|
|
|
|
/** 详情按钮 */
|
|
/** 详情按钮 */
|
|
function handleDetail(row) {
|
|
function handleDetail(row) {
|
|
- modifyLoading.value = true;
|
|
|
|
- resetModify();
|
|
|
|
- const id = row.id || ids.value[0];
|
|
|
|
- detail(id).then((response) => {
|
|
|
|
- isDetail.value = true;
|
|
|
|
- modifyLoading.value = false;
|
|
|
|
-
|
|
|
|
- formModify.value = response.data;
|
|
|
|
- formModify.value.checkCycle = formModify.value.checkCycle + '';
|
|
|
|
-
|
|
|
|
- dialogOpenModify.value = true;
|
|
|
|
- title.value = "隐患检查单";
|
|
|
|
- cancelModifyTxt.value = '关 闭';
|
|
|
|
- });
|
|
|
|
-}
|
|
|
|
-/** 详情编辑 */
|
|
|
|
-function changeModify() {
|
|
|
|
- isDetail.value = false;
|
|
|
|
- title.value = "修改隐患检查单";
|
|
|
|
}
|
|
}
|
|
-/** 修改按钮 */
|
|
|
|
-function handleUpdate(row) {
|
|
|
|
- modifyLoading.value = true;
|
|
|
|
- resetModify();
|
|
|
|
- const id = row.id || ids.value[0];
|
|
|
|
- detail(id).then((response) => {
|
|
|
|
- isDetail.value = false;
|
|
|
|
- modifyLoading.value = false;
|
|
|
|
|
|
|
|
- formModify.value = response.data;
|
|
|
|
- formModify.value.checkCycle = formModify.value.checkCycle + '';
|
|
|
|
|
|
|
|
- dialogOpenModify.value = true;
|
|
|
|
- title.value = "修改隐患检查单";
|
|
|
|
- cancelModifyTxt.value = '取 消';
|
|
|
|
- });
|
|
|
|
|
|
+
|
|
|
|
+/** 隐患检查单-撤回-按钮 */
|
|
|
|
+function onRevoke(row) {
|
|
|
|
+ formRevoke.value = {
|
|
|
|
+ id: row.id,
|
|
|
|
+ comment: undefined
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ showRevoke.value = true;
|
|
|
|
+ titleRevoke.value = '检查单撤回 - ' + row.checkFormNo;
|
|
}
|
|
}
|
|
-/** 修改提交 */
|
|
|
|
-function submitModify() {
|
|
|
|
- proxy.$refs["formModifyRef"].validate((valid) => {
|
|
|
|
|
|
+/** 隐患检查单-撤回-提交 */
|
|
|
|
+function revokeSubmit() {
|
|
|
|
+ proxy.$refs["refFormRevoke"].validate((valid) => {
|
|
if (valid) {
|
|
if (valid) {
|
|
- modifyLoading.value = true;
|
|
|
|
-
|
|
|
|
- modify(formModify.value)
|
|
|
|
- .then((response) => {
|
|
|
|
- proxy.$modal.msgSuccess("修改成功");
|
|
|
|
- dialogOpenModify.value = false;
|
|
|
|
- getList();
|
|
|
|
- })
|
|
|
|
- .finally(() => {
|
|
|
|
- modifyLoading.value = false;
|
|
|
|
- });
|
|
|
|
|
|
+ loadingRevoke.value = true;
|
|
|
|
+ revoke(formRevoke.value).then((response) => {
|
|
|
|
+ getListPerson();
|
|
|
|
+ })
|
|
|
|
+ .finally(() => {
|
|
|
|
+ showRevoke.value = false;
|
|
|
|
+ loadingRevoke.value = false;
|
|
|
|
+ });
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
-function getStatusTxt(status) {
|
|
|
|
- let find = checkFormStatusList.value.find(c => parseInt(c.value) === status);
|
|
|
|
- if (find) {
|
|
|
|
- return find.label;
|
|
|
|
- }
|
|
|
|
- return '未知';
|
|
|
|
|
|
+
|
|
|
|
+/** 隐患检查单,提交到网格管理员 */
|
|
|
|
+function onSubmitAdmin(id) {
|
|
|
|
+ proxy.$modal.confirm('确认要提交到网格管理员吗?')
|
|
|
|
+ .then(() => {
|
|
|
|
+ submitAdmin(id).then((response) => {
|
|
|
|
+ getListPerson();
|
|
|
|
+ })
|
|
|
|
+ .finally(() => {
|
|
|
|
+ //createLoading.value = false;
|
|
|
|
+ });
|
|
|
|
+ })
|
|
|
|
+ .catch((action) => {
|
|
|
|
+ if (action === 'cancel') {
|
|
|
|
+ proxy.$modal.msg('取消操作');
|
|
|
|
+ }
|
|
|
|
+ });
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|