更新数据
This commit is contained in:
@ -8,12 +8,22 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form_cnt">
|
||||
<FormMessage :formList="formData" ref="elform" :rules="rules"></FormMessage>
|
||||
<FormMessage v-model="listQuery" :formList="formData" ref="elform" :rules="rules">
|
||||
<template #glxsid>
|
||||
<div class="box pointer ellipsis" @click="chooseVisible = true">
|
||||
<span v-if="listQuery.glxs">{{ listQuery.glxs }}</span>
|
||||
<span v-else style="color: #b8b8b8;">请选择关联线索</span>
|
||||
</div>
|
||||
</template>
|
||||
</FormMessage>
|
||||
</div>
|
||||
<!-- 选择线索 -->
|
||||
<Xslist v-model="chooseVisible" @choosed="choosed" :roleIds="roleIds"></Xslist>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import Xslist from './xslist.vue'
|
||||
import FormMessage from '@/components/aboutTable/FormMessage.vue'
|
||||
import { qcckGet, qcckPost, qcckPut } from "@/api/qcckApi.js";
|
||||
import * as rule from "@/utils/rules.js";
|
||||
@ -22,57 +32,74 @@ const emit = defineEmits(["updateDate"]);
|
||||
const props = defineProps({
|
||||
dic: Object
|
||||
});
|
||||
const chooseVisible = ref(false)
|
||||
const roleIds = ref([])
|
||||
const { proxy } = getCurrentInstance();
|
||||
const dialogForm = ref(false); //弹窗
|
||||
const formData = ref([
|
||||
{ label: "指令标题", prop: "title", type: "input", },
|
||||
{ label: "是否生成指令号", prop: "generateNumber", type: "select", options: [] },
|
||||
{ label: "指令类型", prop: "type", type: "select", options: [] },
|
||||
{ label: "指令等级", prop: "dj", type: "select", options: [] },
|
||||
{ label: "指令发起人", prop: "fqr", type: "input" },
|
||||
{ label: "发起部门", prop: "dep", type: "input" },
|
||||
{ label: "联系人", prop: "contact", type: "input" },
|
||||
{ label: "联系电话", prop: "phone", type: "input" },
|
||||
{ label: "关联线索", prop: "relatedClues", type: "input" },
|
||||
{ label: "主送单位", prop: "mainUnit", type: "input" },
|
||||
{ label: "抄送单位", prop: "ccUnit", type: "input" },
|
||||
{ label: "指令内容", prop: "nr", type: "textarea",width: '100%' },
|
||||
{ label: "附件", prop: "tpdz", type: "upload",width: '100%' },
|
||||
{ label: "指令标题", prop: "zlbt", type: "input", },
|
||||
{ label: "指令类型", prop: "zllx", type: "select", options: props.dic.D_GS_XS_ZLLX },
|
||||
{ label: "指令等级", prop: "zldj", type: "select", options: props.dic.D_GS_ZDQT_FXDJ },
|
||||
{ label: "反馈结束时间", prop: "jssj", type: "datetime" },
|
||||
{ label: "联系人", prop: "zllxr", type: "input" },
|
||||
{ label: "联系电话", prop: "zllxdh", type: "input" },
|
||||
{ label: "关联线索", prop: "glxsid", type: "slot" },
|
||||
{ label: "主送单位", prop: "zsdw", type: "department" },
|
||||
{ label: "抄送单位", prop: "csdw", type: "department" },
|
||||
{ label: "指令内容", prop: "zlnr", type: "textarea",width: '100%' },
|
||||
{ label: "附件", prop: "fjzd", type: "upload",width: '100%' },
|
||||
]);
|
||||
const listQuery = ref({
|
||||
sfbqdj: []
|
||||
}); //表单
|
||||
const listQuery = ref({}); //表单
|
||||
const loading = ref(false);
|
||||
const elform = ref();
|
||||
const title = ref("");
|
||||
const rules = reactive({
|
||||
bqmc: [{ required: true, message: "请输入标签名称", trigger: "blur" }]
|
||||
zlbt: [{ required: true, message: "请输入指令标题", trigger: "blur" }],
|
||||
zllx: [{ required: true, message: "请选择指令类型", trigger: "change" }],
|
||||
zldj: [{ required: true, message: "请选择指令等级", trigger: "change" }],
|
||||
jssj: [{ required: true, message: "请选择反馈结束时间", trigger: "change" }],
|
||||
zllxr: [{ required: true, message: "请输入联系人", trigger: "blur" }],
|
||||
zllxdh: [{ required: true, message: "请输入联系电话", trigger: "blur" }],
|
||||
zsdw: [{ required: true, message: "请选择主送单位", trigger: "change" }],
|
||||
csdw: [{ required: true, message: "请选择抄送单位", trigger: "change" }],
|
||||
zlnr: [{ required: true, message: "请输入指令内容", trigger: "blur" }],
|
||||
glxsid: [{ required: true, message: "请选择关联线索", trigger: "change" }],
|
||||
});
|
||||
const editpeo = ref();
|
||||
onMounted(() => {});
|
||||
// 初始化数据
|
||||
const init = (type, row,) => {
|
||||
listQuery.value.fjzd = null
|
||||
dialogForm.value = true;
|
||||
title.value = type == 'add' ? "新增" : "编辑";
|
||||
if (row) getDataById(row.id);
|
||||
};
|
||||
// 根据id查询详情
|
||||
const getDataById = (id) => {
|
||||
// qcckGet({}, '/mosty-gsxt/tbGsxtBqgl/'+id).then((res) => {
|
||||
// listQuery.value = res;
|
||||
// });
|
||||
qcckGet({id}, '/mosty-gsxt/zlxx/selectByid').then((res) => {
|
||||
res.fjzd = res.fjzd ? res.fjzd.split(','):[];
|
||||
listQuery.value = res;
|
||||
});
|
||||
};
|
||||
|
||||
// 选择标签
|
||||
const choosed = (val) => {
|
||||
listQuery.value.glxs = val[0].xsMc;
|
||||
listQuery.value.glxsid = val[0].id;
|
||||
roleIds.value = val.map(v=>v.id)
|
||||
}
|
||||
|
||||
// 提交
|
||||
const submit = () => {
|
||||
elform.value.submit((data)=>{
|
||||
// let url = title.value == "新增" ? '/mosty-gsxt/tbGsxtBqgl/save':'/mosty-gsxt/tbGsxtBqgl/update';
|
||||
// let params = { ...data }
|
||||
// qcckPost(params, url).then((res) => {
|
||||
// proxy.$message({ type: "success", message: title.value + "成功" });
|
||||
// emit("updateDate");
|
||||
// close();
|
||||
// }).catch(() => {});
|
||||
let url = title.value == "新增" ? '/mosty-gsxt/zlxx/add':'/mosty-gsxt/zlxx/update';
|
||||
let params = { ...data }
|
||||
loading.value = true;
|
||||
params.fjzd = params.fjzd ? params.fjzd.join(','):''
|
||||
qcckPost(params, url).then((res) => {
|
||||
loading.value = false;
|
||||
proxy.$message({ type: "success", message: title.value + "成功" });
|
||||
emit("updateDate");
|
||||
close();
|
||||
}).catch(() => {loading.value = false;});
|
||||
});
|
||||
};
|
||||
|
||||
@ -88,4 +115,11 @@ defineExpose({ init });
|
||||
<style lang="scss" scoped>
|
||||
@import "~@/assets/css/layout.scss";
|
||||
@import "~@/assets/css/element-plus.scss";
|
||||
.box{
|
||||
width: 100%;
|
||||
height: 32px;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #e9e9e9;
|
||||
padding-left: 10px;
|
||||
}
|
||||
</style>
|
||||
|
@ -0,0 +1,190 @@
|
||||
<template>
|
||||
<el-dialog :title="titleValue" width="1400px" :model-value="modelValue" append-to-body @close="closed">
|
||||
<div>
|
||||
<el-form :model="listQuery" class="mosty-from-wrap" :inline="true">
|
||||
<el-form-item label="标签名称">
|
||||
<el-input placeholder="请输入标签名称" v-model="listQuery.bqMc" clearable ></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="success" @click="handleFilter">查询</el-button>
|
||||
<el-button type="info" @click="reset()"> 重置 </el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="tabBox" :class="props.Single ? 'tabBoxRadio' : ''" style="margin-top: 0px">
|
||||
<el-table ref="multipleUserRef" :key="keyTabel" @selection-change="handleSelectionChange" :data="tableData" border :row-key="keyid" style="width: 100%" height="450">
|
||||
<el-table-column type="selection" width="55" :reserve-selection="true"/>
|
||||
<el-table-column prop="xsBh" align="center" label="线索编号"/>
|
||||
<el-table-column prop="xsMc" align="center" label="线索名称"/>
|
||||
<el-table-column prop="xlLx" align="center" label="线索类型">
|
||||
<template #default="{ row }">
|
||||
<DictTag :tag="false" :value="row.xlLx" :options="D_GS_XS_LX" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="qbLy" align="center" label="线索来源">
|
||||
<template #default="{ row }">
|
||||
<DictTag :value="row.qbLy" :tag="false" :options="D_GS_XS_LY" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="xsNr" align="center" label="线索内容"/>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="fenye" :style="{ top: tableHeight + 'px' }">
|
||||
<el-pagination
|
||||
class="pagination"
|
||||
@size-change="handleSizeChange"
|
||||
@pageCurrent-change="handleCurrentChange"
|
||||
:pageCurrent-page="listQuery.pageCurrent"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
:page-size="listQuery.size"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="total"
|
||||
></el-pagination>
|
||||
</div>
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="closed">取消</el-button>
|
||||
<el-button type="primary" @click="onComfirm">确认</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
|
||||
import { qcckGet} from "@/api/qcckApi.js";
|
||||
import { defineProps, ref ,getCurrentInstance, watch} from "vue";
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { D_GS_XS_LX,D_GS_XS_LY } = proxy.$dict("D_GS_XS_LX","D_GS_XS_LY"); //获取字典数据
|
||||
const props = defineProps({
|
||||
modelValue: {
|
||||
type: Boolean,
|
||||
default:false
|
||||
},
|
||||
titleValue: {
|
||||
type: String,
|
||||
default: "选择线索"
|
||||
},
|
||||
LeaderType: {
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
//是否单选
|
||||
Single: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
roleIds: {
|
||||
type: Array,
|
||||
default: []
|
||||
}
|
||||
});
|
||||
const total = ref(0);
|
||||
const listQuery = ref({
|
||||
pageCurrent: 1,
|
||||
pageSize: 20
|
||||
});
|
||||
|
||||
const multipleUserRef = ref(null);
|
||||
const multipleSelectionUser = ref([]);
|
||||
const tableData = ref([]);
|
||||
const emits = defineEmits(["update:modelValue", "choosed"]);
|
||||
const keyTabel = ref(0)
|
||||
const keyid = (row) => {
|
||||
return row.id;
|
||||
};
|
||||
|
||||
const closed = () => {
|
||||
emits("update:modelValue", false);
|
||||
};
|
||||
const reset = () => {
|
||||
listQuery.value = { pageCurrent: 1, pageSize: 20, };
|
||||
getListData();
|
||||
};
|
||||
|
||||
|
||||
// 为用户分配角色
|
||||
const onComfirm = () => {
|
||||
const userList = multipleSelectionUser.value;
|
||||
let list = [];
|
||||
let listId = [];
|
||||
userList.forEach((val) => {
|
||||
if (listId.indexOf(val.id) == -1) {
|
||||
list.push(val);
|
||||
listId.push(val.id);
|
||||
}
|
||||
});
|
||||
emits("choosed", list);
|
||||
closed();
|
||||
};
|
||||
/**
|
||||
* pageSize 改变触发
|
||||
*/
|
||||
const handleSizeChange = (currentSize) => {
|
||||
listQuery.value.pageSize = currentSize;
|
||||
getListData();
|
||||
};
|
||||
/**
|
||||
* 页码改变触发
|
||||
*/
|
||||
const handleCurrentChange = (currentPage) => {
|
||||
listQuery.value.pageCurrent = currentPage;
|
||||
getListData();
|
||||
};
|
||||
const getListData = () => {
|
||||
keyTabel.value++
|
||||
const params = {...listQuery.vlue}
|
||||
qcckGet(params,'/mosty-gsxt/qbcj/selectPage').then(res=>{
|
||||
tableData.value = res.records || [];
|
||||
total.value = res.total;
|
||||
multipleUser();
|
||||
})
|
||||
};
|
||||
|
||||
//列表回显
|
||||
function multipleUser() {
|
||||
tableData.value.forEach((item) => {
|
||||
multipleUserRef.value.toggleRowSelection(item, false);
|
||||
if (props.roleIds.some((id) => id == item.id)) {
|
||||
multipleUserRef.value.toggleRowSelection(item, true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
const handleFilter = () => {
|
||||
listQuery.value.pageCurrent = 1;
|
||||
getListData();
|
||||
};
|
||||
|
||||
const handleSelectionChange = (val) => {
|
||||
if (props.Single) {
|
||||
if (val.length > 1) {
|
||||
let del_row = val.shift();
|
||||
multipleUserRef.value.toggleRowSelection(del_row, false);
|
||||
}
|
||||
multipleSelectionUser.value = val;
|
||||
} else {
|
||||
multipleSelectionUser.value = val;
|
||||
}
|
||||
};
|
||||
|
||||
watch(()=>props.modelValue,val=>{
|
||||
if(val) handleFilter();
|
||||
},{immediate:true})
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "@/assets/css/layout.scss";
|
||||
@import "@/assets/css/element-plus.scss";
|
||||
</style>
|
||||
<style>
|
||||
.tabBoxRadio .el-checkbox__inner {
|
||||
border-radius: 50% !important;
|
||||
}
|
||||
.tabBoxRadio .el-table__header-wrapper .el-checkbox {
|
||||
display: none;
|
||||
}
|
||||
|
||||
</style>
|
@ -6,14 +6,6 @@
|
||||
<el-icon style="vertical-align: middle"><CirclePlus /></el-icon>
|
||||
<span style="vertical-align: middle">新增</span>
|
||||
</el-button>
|
||||
<el-button type="danger" @click="addEdit('add', '')">
|
||||
<el-icon style="vertical-align: middle"><Dete /></el-icon>
|
||||
<span style="vertical-align: middle">批量删除</span>
|
||||
</el-button>
|
||||
<el-button >
|
||||
<el-icon style="vertical-align: middle"><Setting /></el-icon>
|
||||
<span style="vertical-align: middle">批量处置</span>
|
||||
</el-button>
|
||||
</PageTitle>
|
||||
</div>
|
||||
<!-- 搜索 -->
|
||||
@ -29,20 +21,17 @@
|
||||
:key="pageData.keyCount"
|
||||
:tableConfiger="pageData.tableConfiger"
|
||||
:controlsWidth="pageData.controlsWidth"
|
||||
@chooseData="chooseData">
|
||||
<!-- 事故照片 -->
|
||||
<template #accidentPhoto="{ row }">
|
||||
<el-image
|
||||
style="width: 50px; height: 50px"
|
||||
:src="row.accidentPhoto"
|
||||
:preview-src-list="[row.accidentPhoto]">
|
||||
</el-image>
|
||||
>
|
||||
|
||||
<template #zldj="{row}">
|
||||
<DictTag :tag="false" :value="row.zldj" :options="D_GS_ZDQT_FXDJ" />
|
||||
</template>
|
||||
<template #czzt="{row}">
|
||||
<DictTag :tag="false" :value="row.czzt" :options="D_GS_XS_CZZT" />
|
||||
</template>
|
||||
<!-- 操作 -->
|
||||
<template #controls="{ row }">
|
||||
<el-link size="small" type="primary" @click="addEdit('detail', row)">查看</el-link>
|
||||
<el-link size="small" type="primary" @click="addEdit('edit', row)">编辑</el-link>
|
||||
<el-link size="small" type="danger" @click="deleteRow(row)">删除</el-link>
|
||||
<el-link size="small" type="danger" @click="deleteRow(row.id)">删除</el-link>
|
||||
</template>
|
||||
</MyTable>
|
||||
<Pages
|
||||
@ -56,7 +45,7 @@
|
||||
></Pages>
|
||||
</div>
|
||||
<!-- 详情 -->
|
||||
<DetailForm ref="detailDiloag" />
|
||||
<DetailForm ref="detailDiloag" @updateDate="getList" :dic="{D_GS_XS_ZLLX,D_GS_ZDQT_FXDJ}" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -71,28 +60,22 @@ import { reactive, ref, onMounted, getCurrentInstance } from "vue";
|
||||
const { proxy } = getCurrentInstance();
|
||||
const detailDiloag = ref();
|
||||
const searchBox = ref(); //搜索框
|
||||
|
||||
const {D_GS_XS_SJLY,D_GS_XS_ZLLX,D_GS_ZDQT_FXDJ,D_GS_XS_CZZT} = proxy.$dict('D_GS_XS_SJLY','D_GS_XS_ZLLX','D_GS_ZDQT_FXDJ','D_GS_XS_CZZT')
|
||||
const searchConfiger = ref([
|
||||
{ label: "指令标题", prop: 'instructionTitle', placeholder: "请输入指令标题", showType: "input" },
|
||||
{ label: "督办对象", prop: 'supervisoryObject', placeholder: "请输入督办对象", showType: "input" },
|
||||
{ label: "指令类型", prop: 'instructionType', placeholder: "请选择指令类型", showType: "input" },
|
||||
{ label: "指令等级", prop: 'instructionLevel', placeholder: "请选择指令等级", showType: "input" },
|
||||
{ label: "指令来源", prop: 'instructionSource', placeholder: "请输入指令来源", showType: "input" },
|
||||
{ label: "处置状态", prop: 'processingStatus', placeholder: "请选择处置状态", showType: "input" },
|
||||
{ label: "数据来源", prop: 'dataSource', placeholder: "请输入数据来源", showType: "input" },
|
||||
{ label: "反馈截止时间", prop: 'feedbackDeadline', placeholder: "请选择反馈截止时间", showType: "input" },
|
||||
{ label: "指令流向", prop: 'instructionFlow', placeholder: "请输入指令流向", showType: "input" },
|
||||
{ label: "指令标题", prop: 'zlbt', placeholder: "请输入指令标题", showType: "input" },
|
||||
{ label: "指令类型", prop: 'zllx', placeholder: "请选择指令类型", showType: "select",options:D_GS_XS_ZLLX },
|
||||
{ label: "指令等级", prop: 'zldj', placeholder: "请选择指令等级", showType: "select" ,options:D_GS_ZDQT_FXDJ},
|
||||
{ label: "处置状态", prop: 'czzt', placeholder: "请选择处置状态", showType: "select" ,options:D_GS_XS_CZZT},
|
||||
{ label: "反馈截止时间", prop: 'jssj', placeholder: "请选择反馈截止时间", showType: "datetime" },
|
||||
]);
|
||||
|
||||
const queryFrom = ref({});
|
||||
const pageData = reactive({
|
||||
tableData: [
|
||||
{id: 1, instructionFlow: '本级发起', instructionTitle: '关于XX的指令', urgencyLevel: '紧急', informationSource: '信息来源', workingStatus: '工作中', supervisoryObject: '督办对象', instructionLevel: '一级', feedbackPosition: '反馈位置', feedbackDeadline: '2024-01-20', receivedNumber: 5, unreceivedNumber: 2, processingStatus: '已处理', status: '已完成'},
|
||||
],
|
||||
tableData: [],
|
||||
keyCount: 0,
|
||||
tableConfiger: {
|
||||
rowHieght: 61,
|
||||
showSelectType: "checkBox",
|
||||
showSelectType: "null",
|
||||
loading: false
|
||||
},
|
||||
total: 0,
|
||||
@ -102,19 +85,10 @@ const pageData = reactive({
|
||||
},
|
||||
controlsWidth: 180,
|
||||
tableColumn: [
|
||||
{ label: '指令流向', prop: 'instructionFlow' },
|
||||
{ label: '指令标题', prop: 'instructionTitle' },
|
||||
{ label: '紧急程度', prop: 'urgencyLevel', width: 100 },
|
||||
{ label: '信息来源', prop: 'informationSource' },
|
||||
{ label: '工作状态', prop: 'workingStatus', width: 100 },
|
||||
{ label: '督办对象', prop: 'supervisoryObject' },
|
||||
{ label: '指令等级', prop: 'instructionLevel', width: 100 },
|
||||
{ label: '反馈位置', prop: 'feedbackPosition' },
|
||||
{ label: '反馈截止时间', prop: 'feedbackDeadline', width: 120 },
|
||||
{ label: '发送人数', prop: 'receivedNumber', width: 100 },
|
||||
{ label: '未接收人数', prop: 'unreceivedNumber', width: 100 },
|
||||
{ label: '处置状态', prop: 'processingStatus', width: 100 },
|
||||
{ label: '状态', prop: 'status', width: 100 },
|
||||
{ label: '指令标题', prop: 'zlbt' },
|
||||
{ label: '指令等级', prop: 'zldj',showSolt:true },
|
||||
{ label: '反馈截止时间', prop: 'jssj' },
|
||||
{ label: '处置状态', prop: 'czzt',showSolt:true },
|
||||
]
|
||||
});
|
||||
|
||||
@ -123,12 +97,6 @@ onMounted(() => {
|
||||
tabHeightFn();
|
||||
});
|
||||
|
||||
//选择类型
|
||||
const handleType = (val) => {
|
||||
pageData.keyCount++;
|
||||
pageData.pageConfiger.pageCurrent = 1;
|
||||
getList()
|
||||
}
|
||||
// 搜索
|
||||
const onSearch = (val) =>{
|
||||
queryFrom.value = {...val}
|
||||
@ -147,14 +115,24 @@ const changeSize = (val) =>{
|
||||
|
||||
// 获取列表
|
||||
const getList = (val) =>{
|
||||
// pageData.tableConfiger.loading = true;
|
||||
pageData.tableConfiger.loading = true;
|
||||
let data = { ...pageData.pageConfiger, ...queryFrom.value };
|
||||
// let url = '/mosty-lzcj/tbDwMbkf/queryList';
|
||||
// qcckPost(data,url).then(res=>{
|
||||
// pageData.tableData = res.records || [];
|
||||
// pageData.total = res.total;
|
||||
// pageData.tableConfiger.loading = false;
|
||||
// }).catch(()=>{ pageData.tableConfiger.loading = false; })
|
||||
qcckGet(data,'/mosty-gsxt/zlxx/selectPage').then(res=>{
|
||||
pageData.tableData = res.records || [];
|
||||
pageData.total = res.total;
|
||||
pageData.tableConfiger.loading = false;
|
||||
}).catch(()=>{ pageData.tableConfiger.loading = false; })
|
||||
}
|
||||
|
||||
|
||||
|
||||
const deleteRow = (id) =>{
|
||||
proxy.$confirm("确定要删除", "警告", {type: "warning"}).then(() => {
|
||||
qcckPost({id},'/mosty-gsxt/zlxx/delete').then(()=>{
|
||||
proxy.$message({ type: "success", message: "删除成功" });
|
||||
getList();
|
||||
})
|
||||
}).catch(() => {});
|
||||
}
|
||||
|
||||
// 详情
|
||||
|
@ -0,0 +1,92 @@
|
||||
<template>
|
||||
<div class="dialog" v-if="dialogForm">
|
||||
<div class="head_box">
|
||||
<span class="title">转为指令</span>
|
||||
<div>
|
||||
<el-button type="primary" size="small" :loading="loading" @click="submit" >保存</el-button>
|
||||
<el-button size="small" @click="close">关闭</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form_cnt">
|
||||
<FormMessage v-model="listQuery" :formList="formData" ref="elform" :rules="rules"></FormMessage>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import FormMessage from '@/components/aboutTable/FormMessage.vue'
|
||||
import { qcckGet, qcckPost, qcckPut } from "@/api/qcckApi.js";
|
||||
import { useRouter } from "vue-router";
|
||||
import { ref, defineExpose, reactive, onMounted, defineEmits, getCurrentInstance, nextTick } from "vue";
|
||||
const emit = defineEmits(["updateDate"]);
|
||||
const props = defineProps({
|
||||
dic: Object
|
||||
});
|
||||
const router = useRouter();
|
||||
const { proxy } = getCurrentInstance();
|
||||
const dialogForm = ref(false); //弹窗
|
||||
const rules = reactive({
|
||||
zlbt: [{ required: true, message: "请输入指令标题", trigger: "blur" }],
|
||||
zllx: [{ required: true, message: "请选择指令类型", trigger: "change" }],
|
||||
zldj: [{ required: true, message: "请选择指令等级", trigger: "change" }],
|
||||
jssj: [{ required: true, message: "请选择反馈结束时间", trigger: "change" }],
|
||||
zllxr: [{ required: true, message: "请输入联系人", trigger: "blur" }],
|
||||
zllxdh: [{ required: true, message: "请输入联系电话", trigger: "blur" }],
|
||||
zsdw: [{ required: true, message: "请选择主送单位", trigger: "change" }],
|
||||
csdw: [{ required: true, message: "请选择抄送单位", trigger: "change" }],
|
||||
zlnr: [{ required: true, message: "请输入指令内容", trigger: "blur" }],
|
||||
});
|
||||
const formData = ref([
|
||||
{ label: "线索名称", prop: "glxs", type: "input", disabled:true },
|
||||
{ label: "指令标题", prop: "zlbt", type: "input", },
|
||||
{ label: "指令类型", prop: "zllx", type: "select", options: props.dic.D_GS_XS_ZLLX },
|
||||
{ label: "指令等级", prop: "zldj", type: "select", options: props.dic.D_GS_ZDQT_FXDJ },
|
||||
{ label: "反馈结束时间", prop: "jssj", type: "datetime" },
|
||||
{ label: "联系人", prop: "zllxr", type: "input" },
|
||||
{ label: "联系电话", prop: "zllxdh", type: "input" },
|
||||
{ label: "主送单位", prop: "zsdw", type: "department" },
|
||||
{ label: "抄送单位", prop: "csdw", type: "department" },
|
||||
{ label: "指令内容", prop: "zlnr", type: "textarea",width: '100%' },
|
||||
{ label: "附件", prop: "fjzd", type: "upload",width: '100%' },
|
||||
]);
|
||||
const listQuery = ref({}); //表单
|
||||
const loading = ref(false);
|
||||
const elform = ref();
|
||||
|
||||
onMounted(() => {});
|
||||
// 初始化数据
|
||||
const init = (row) => {
|
||||
listQuery.value.fjzd = null
|
||||
dialogForm.value = true;
|
||||
listQuery.value.glxs = row.xsMc;
|
||||
listQuery.value.glxsid = row.id;
|
||||
};
|
||||
;
|
||||
|
||||
// 提交
|
||||
const submit = () => {
|
||||
elform.value.submit((data)=>{
|
||||
let params = { ...data }
|
||||
params.fjzd = params.fjzd ? params.fjzd.join(','):''
|
||||
loading.value = true;
|
||||
qcckPost(params, '/mosty-gsxt/zlxx/add').then((res) => {
|
||||
loading.value = false;
|
||||
proxy.$message({ type: "success", message: "转发成功" });
|
||||
router.push('/InstructionInformation')
|
||||
}).catch(() => {loading.value = false;});
|
||||
});
|
||||
};
|
||||
|
||||
// 关闭
|
||||
const close = () => {
|
||||
listQuery.value = {};
|
||||
dialogForm.value = false;
|
||||
loading.value = false;
|
||||
};
|
||||
defineExpose({ init });
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "~@/assets/css/layout.scss";
|
||||
@import "~@/assets/css/element-plus.scss";
|
||||
</style>
|
@ -38,6 +38,7 @@
|
||||
|
||||
<!-- 操作 -->
|
||||
<template #controls="{ row }">
|
||||
<el-link size="small" type="primary" @click="handleZL(row)">转为指令</el-link>
|
||||
<el-link size="small" type="primary" @click="addEdit('detail', row)">详情</el-link>
|
||||
</template>
|
||||
</MyTable>
|
||||
@ -53,6 +54,7 @@
|
||||
</div>
|
||||
<!-- 新增 -->
|
||||
<AddForm ref="detailDiloag" v-if="isShow" :dic="{D_BZ_SF,D_BZ_XB,D_GS_XS_LY,D_BZ_SSZT,D_GS_XS_LX ,D_GS_XS_QTLX}" />
|
||||
<ZlForm ref="zlDialog" v-if="isShow" :dic="{D_GS_XS_ZLLX,D_GS_ZDQT_FXDJ}"></ZlForm>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -62,13 +64,15 @@ import MyTable from "@/components/aboutTable/MyTable.vue";
|
||||
import Pages from "@/components/aboutTable/Pages.vue";
|
||||
import Search from "@/components/aboutTable/Search.vue";
|
||||
import AddForm from "./components/addForm.vue";
|
||||
import ZlForm from "./components/zlForm.vue";
|
||||
import { qcckGet, qcckPost, qcckDelete } from "@/api/qcckApi.js";
|
||||
import { reactive, ref, onMounted, getCurrentInstance, nextTick } from "vue";
|
||||
const { proxy } = getCurrentInstance();
|
||||
const {D_GS_XS_CZZT,D_GS_XS_LY, D_BZ_SSZT,D_BZ_SF,D_GS_XS_LX ,D_GS_XS_QTLX,D_BZ_XB,D_BZ_XSSHZT} = proxy.$dict("D_GS_XS_CZZT","D_GS_XS_LY","D_BZ_SSZT","D_BZ_SF","D_GS_XS_LX","D_GS_XS_QTLX","D_BZ_XB","D_BZ_XSSHZT"); //获取字典数据
|
||||
const {D_GS_ZDQT_FXDJ,D_GS_XS_ZLLX,D_GS_XS_CZZT,D_GS_XS_LY, D_BZ_SSZT,D_BZ_SF,D_GS_XS_LX ,D_GS_XS_QTLX,D_BZ_XB,D_BZ_XSSHZT} = proxy.$dict("D_GS_ZDQT_FXDJ","D_GS_XS_ZLLX","D_GS_XS_CZZT","D_GS_XS_LY","D_BZ_SSZT","D_BZ_SF","D_GS_XS_LX","D_GS_XS_QTLX","D_BZ_XB","D_BZ_XSSHZT"); //获取字典数据
|
||||
const detailDiloag = ref();
|
||||
const searchBox = ref(); //搜索框
|
||||
const isShow = ref(false)
|
||||
const zlDialog = ref(false)
|
||||
const searchConfiger = ref([
|
||||
{ label: "线索名称", prop: 'xsMc', placeholder: "请输入线索名称", showType: "input" },
|
||||
{ label: "内容关键字", prop: 'xsNr', placeholder: "请输入语义关键字", showType: "input" },
|
||||
@ -144,6 +148,15 @@ const getList = (val) =>{
|
||||
}).catch(()=>{ pageData.tableConfiger.loading = false; })
|
||||
}
|
||||
|
||||
|
||||
// 转为指令
|
||||
const handleZL = (val) =>{
|
||||
isShow.value = true;
|
||||
setTimeout(()=>{
|
||||
zlDialog.value.init(val)
|
||||
},500)
|
||||
}
|
||||
|
||||
// 详情
|
||||
const addEdit = (type, row) => {
|
||||
isShow.value = true;
|
||||
|
Reference in New Issue
Block a user