更新数据
This commit is contained in:
@ -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