|
@@ -0,0 +1,305 @@
|
|
|
+<template>
|
|
|
+ <div class="snapshot-publish-index-container layout-padding">
|
|
|
+ <div class="layout-padding-auto layout-padding-view pd20">
|
|
|
+ <vxe-grid v-bind="gridOptions" ref="gridRef" @checkbox-all="selectAllChangeEvent" @checkbox-change="selectChangeEvent">
|
|
|
+ <template #form>
|
|
|
+ <el-form :model="state.queryParams" ref="ruleFormRef" inline @submit.native.prevent :disabled="gridOptions.loading">
|
|
|
+ <el-form-item label="行业" prop="Status">
|
|
|
+ <el-select v-model="state.queryParams.Status" class="w100" placeholder="请选择行业" @change="handleQuery">
|
|
|
+ <el-option v-for="item in state.statusOptions" :key="item.key" :label="item.value" :value="item.key" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="工单编码" prop="No">
|
|
|
+ <el-input v-model="state.queryParams.No" placeholder="请填写工单编码" clearable @keyup.enter="handleQuery" class="keyword-input" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="工单标题" prop="Title">
|
|
|
+ <el-input v-model="state.queryParams.Title" placeholder="请填写工单标题" clearable @keyup.enter="handleQuery" class="keyword-input" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="primary" @click="handleQuery" :loading="state.loading"> <SvgIcon name="ele-Search" class="mr5" />查询 </el-button>
|
|
|
+ <el-button @click="drawer = true" class="default-button"> <SvgIcon name="ele-Search" class="mr5" />更多查询</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </template>
|
|
|
+ <template #toolbar_buttons>
|
|
|
+ <el-button type="primary" @click="onUnPublic" v-auth="'snapshot:publish:index:notPublic'" :disabled="isChecked" :loading="state.loading"
|
|
|
+ ><SvgIcon name="ele-Edit" class="mr5" />不公开<span v-if="checkTable.length">({{ checkTable.length }})</span>
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ <template #action="{ row }">
|
|
|
+ <el-button type="primary" @click="onApply(row)" v-auth="'snapshot:publish:index:apply'" link> 申请 </el-button>
|
|
|
+ </template>
|
|
|
+ <template #statusText="{ row }">
|
|
|
+ <el-text type="danger" tag="b" v-if="[1, 2, 3, 9, 101, 102, 103, 104, 105, 200].includes(row.status)">{{ row.statusText }}</el-text>
|
|
|
+ <span v-else>{{ row.statusText }}</span>
|
|
|
+ </template>
|
|
|
+<!-- snapshot:publish:index:apply-->
|
|
|
+ <template #order_detail="{ row }">
|
|
|
+ <order-detail :order="{id: row.orderId}" @updateList="queryList">{{ row.title }}</order-detail>
|
|
|
+ </template>
|
|
|
+ <template #pager>
|
|
|
+ <pagination
|
|
|
+ @pagination="queryList"
|
|
|
+ :total="state.total"
|
|
|
+ v-model:current-page="state.queryParams.PageIndex"
|
|
|
+ v-model:page-size="state.queryParams.PageSize"
|
|
|
+ :disabled="state.loading"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ </vxe-grid>
|
|
|
+ </div>
|
|
|
+ <!-- 更多查询 -->
|
|
|
+ <el-drawer v-model="drawer" title="更多查询" size="500px">
|
|
|
+ <el-form :model="state.queryParams" ref="drawerRuleFormRef" @submit.native.prevent label-width="100px">
|
|
|
+ <el-form-item label="是否公开" prop="SnapshotBulletinTypeName">
|
|
|
+ <el-select v-model="state.queryParams.SnapshotBulletinTypeName" placeholder="请选择是否公开" clearable>
|
|
|
+ <el-option label="是" :value="true" />
|
|
|
+ <el-option label="否" :value="false" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="受理类型" prop="No">
|
|
|
+ <el-input v-model="state.queryParams.No" placeholder="请填写受理类型" clearable @keyup.enter="handleQuery" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="来电号码" prop="DepartmentName">
|
|
|
+ <el-input v-model="state.queryParams.DepartmentName" placeholder="请填写来电号码" clearable @keyup.enter="handleQuery" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="联系电话" prop="CreatorName">
|
|
|
+ <el-input v-model="state.queryParams.CreatorName" placeholder="请填写联系电话" clearable @keyup.enter="handleQuery" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="受理时间" prop="slTime">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="state.queryParams.slTime"
|
|
|
+ type="datetimerange"
|
|
|
+ unlink-panels
|
|
|
+ range-separator="至"
|
|
|
+ start-placeholder="开始时间"
|
|
|
+ end-placeholder="结束时间"
|
|
|
+ :shortcuts="shortcuts"
|
|
|
+ @change="handleQuery"
|
|
|
+ value-format="YYYY-MM-DD[T]HH:mm:ss"
|
|
|
+ :default-time="defaultTimeStartEnd"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="工单状态" prop="Status">
|
|
|
+ <el-select v-model="state.queryParams.Status" class="w100" placeholder="请选择工单状态" @change="handleQuery">
|
|
|
+ <el-option v-for="item in state.statusOptions" :key="item.key" :label="item.value" :value="item.key" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="区域信息" prop="Status">
|
|
|
+ <el-select v-model="state.queryParams.Status" class="w100" placeholder="请选择区域信息" @change="handleQuery">
|
|
|
+ <el-option v-for="item in state.statusOptions" :key="item.key" :label="item.value" :value="item.key" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <template #footer>
|
|
|
+ <el-button type="primary" @click="handleQuery" :loading="state.loading"> <SvgIcon name="ele-Search" class="mr5" />查询 </el-button>
|
|
|
+ <el-button @click="resetQuery(drawerRuleFormRef)" class="default-button"> <SvgIcon name="ele-Refresh" class="mr5" />重置 </el-button>
|
|
|
+ </template>
|
|
|
+ </el-drawer>
|
|
|
+ <!-- 公开 -->
|
|
|
+ <order-publish ref="orderPublishRef" @updateList="queryList" />
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script lang="tsx" setup name="snapshotPublishIndex">
|
|
|
+import { computed, defineAsyncComponent, onMounted, reactive, ref } from 'vue';
|
|
|
+import { ElMessageBox, FormInstance } from 'element-plus';
|
|
|
+import { getOrderMarkList } from '@/api/snapshot/handle';
|
|
|
+import Other from '@/utils/other';
|
|
|
+import { defaultTimeStartEnd, shortcuts } from '@/utils/constants';
|
|
|
+
|
|
|
+// 引入组件
|
|
|
+const pagination = defineAsyncComponent(() => import('@/components/ProTable/components/Pagination.vue')); // 分页
|
|
|
+const OrderDetail = defineAsyncComponent(() => import('@/components/OrderDetail/index.vue')); // 工单详情
|
|
|
+const OrderPublish = defineAsyncComponent(() => import('@/views/snapshot/publish/components/Order-publish.vue')); // 公开
|
|
|
+
|
|
|
+// 定义变量内容
|
|
|
+const state = reactive<any>({
|
|
|
+ loading: false,
|
|
|
+ queryParams: {
|
|
|
+ // 查询参数
|
|
|
+ PageIndex: 1,
|
|
|
+ PageSize: 20,
|
|
|
+ Status: 1, // 默认待标注
|
|
|
+ No: null, // 工单编码
|
|
|
+ Title: null, // 工单标题
|
|
|
+ slTime:[],
|
|
|
+ },
|
|
|
+ total: 0, // 总条数
|
|
|
+});
|
|
|
+
|
|
|
+const gridOptions = reactive<any>({
|
|
|
+ loading: false,
|
|
|
+ border: true,
|
|
|
+ showOverflow: true,
|
|
|
+ columnConfig: {
|
|
|
+ resizable: true,
|
|
|
+ },
|
|
|
+ scrollY: {
|
|
|
+ enabled: true,
|
|
|
+ gt: 100,
|
|
|
+ },
|
|
|
+ toolbarConfig: {
|
|
|
+ zoom: true,
|
|
|
+ custom: true,
|
|
|
+ refresh: {
|
|
|
+ queryMethod: () => {
|
|
|
+ handleQuery();
|
|
|
+ },
|
|
|
+ },
|
|
|
+ slots: {
|
|
|
+ buttons: 'toolbar_buttons',
|
|
|
+ },
|
|
|
+ },
|
|
|
+ customConfig: {
|
|
|
+ storage: true,
|
|
|
+ },
|
|
|
+ id: 'snapshotReSendList',
|
|
|
+ rowConfig: { isHover: true, height: 30, isCurrent: true, useKey: true },
|
|
|
+ height: 'auto',
|
|
|
+ columns: [
|
|
|
+ { type: 'checkbox', width: 50, align: 'center' },
|
|
|
+ {
|
|
|
+ field: 'no',
|
|
|
+ title: '状态',
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'statusText',
|
|
|
+ title: '工单状态',
|
|
|
+ width: 110,
|
|
|
+ slots: {
|
|
|
+ default: 'statusText',
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'no',
|
|
|
+ title: '工单编码',
|
|
|
+ width: 140,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'creationTime',
|
|
|
+ title: '受理时间',
|
|
|
+ formatter: 'formatDate',
|
|
|
+ width: 160,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'title',
|
|
|
+ title: '工单标题',
|
|
|
+ slots: { default: 'order_detail' },
|
|
|
+ minWidth: 300,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'county',
|
|
|
+ title: '区域',
|
|
|
+ width: 150,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'county',
|
|
|
+ title: '电话',
|
|
|
+ width: 140,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'content',
|
|
|
+ title: '受理内容',
|
|
|
+ width: 400,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ field: 'county',
|
|
|
+ title: '网格员是否属实',
|
|
|
+ width: 140,
|
|
|
+ },
|
|
|
+ { title: '操作', width: 90, fixed: 'right', showOverflow: false, align: 'center', slots: { default: 'action' } },
|
|
|
+ ],
|
|
|
+ data: [],
|
|
|
+});
|
|
|
+/** 搜索按钮操作 节流操作 */
|
|
|
+const handleQuery = () => {
|
|
|
+ state.queryParams.PageIndex = 1;
|
|
|
+ queryList();
|
|
|
+};
|
|
|
+// 获取列表
|
|
|
+const requestParams = ref<EmptyObjectType>({});
|
|
|
+const queryList = () => {
|
|
|
+ state.loading = true;
|
|
|
+ gridOptions.loading = true;
|
|
|
+ requestParams.value = Other.deepClone(state.queryParams);
|
|
|
+ getOrderMarkList(requestParams.value)
|
|
|
+ .then((res) => {
|
|
|
+ state.loading = false;
|
|
|
+ gridOptions.data = res.result.items ?? [];
|
|
|
+ state.total = res.result.total ?? 0;
|
|
|
+ gridRef.value.clearCheckboxRow();
|
|
|
+ checkTable.value = [];
|
|
|
+ gridOptions.loading = false;
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ gridRef.value.clearCheckboxRow();
|
|
|
+ checkTable.value = [];
|
|
|
+ state.loading = false;
|
|
|
+ gridOptions.loading = false;
|
|
|
+ });
|
|
|
+};
|
|
|
+// 重置表单
|
|
|
+const ruleFormRef = ref<any>(null); // 表单ref
|
|
|
+const drawerRuleFormRef = ref<RefType>();
|
|
|
+const drawer = ref(false);
|
|
|
+const resetQuery = (formEl: FormInstance | undefined) => {
|
|
|
+ if (!formEl) return;
|
|
|
+ formEl.resetFields();
|
|
|
+ ruleFormRef.value?.resetFields();
|
|
|
+ queryList();
|
|
|
+};
|
|
|
+
|
|
|
+const checkTable = ref<EmptyArrayType>([]);
|
|
|
+const gridRef = ref<RefType>();
|
|
|
+const selectAllChangeEvent = ({ checked }) => {
|
|
|
+ if (gridRef.value) {
|
|
|
+ const records = gridRef.value.getCheckboxRecords();
|
|
|
+ checkTable.value = records;
|
|
|
+ console.log(checked ? '所有勾选事件' : '所有取消事件', records);
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+const selectChangeEvent = ({ checked }) => {
|
|
|
+ if (gridRef.value) {
|
|
|
+ const records = gridRef.value.getCheckboxRecords();
|
|
|
+ checkTable.value = records;
|
|
|
+ console.log(checked ? '勾选事件' : '取消事件', records);
|
|
|
+ }
|
|
|
+};
|
|
|
+const isChecked = computed(() => {
|
|
|
+ return !Boolean(checkTable.value.length);
|
|
|
+});
|
|
|
+
|
|
|
+// 申请
|
|
|
+const orderPublishRef = ref<RefType>();
|
|
|
+const onApply = (row:any)=>{
|
|
|
+ orderPublishRef.value.openDialog(row);
|
|
|
+}
|
|
|
+// 不公开
|
|
|
+const onUnPublic = ()=>{
|
|
|
+ const ids = checkTable.value.map((item: any) => item.id);
|
|
|
+ ElMessageBox.confirm(`您确认要不公开选中的记录?`, '提示', {
|
|
|
+ confirmButtonText: '确认',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning',
|
|
|
+ draggable: true,
|
|
|
+ cancelButtonClass: 'default-button',
|
|
|
+ autofocus: false,
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ /* deleteCommon({ ids }).then(() => {
|
|
|
+ ElMessage.success('操作成功');
|
|
|
+ queryList();
|
|
|
+ });*/
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
+}
|
|
|
+// 页面加载时
|
|
|
+onMounted(() => {
|
|
|
+ queryList();
|
|
|
+});
|
|
|
+</script>
|
|
|
+
|
|
|
+layout/routerView/parer
|