更新页面

This commit is contained in:
2025-07-16 11:10:37 +08:00
parent 896590f35c
commit 91cadd297c
2 changed files with 28 additions and 51 deletions

View File

@ -29,7 +29,6 @@
<div class="flex align-center"> <div class="flex align-center">
<div class="title mr20">人员信息</div> <div class="title mr20">人员信息</div>
<div class="mb13"> <div class="mb13">
<el-button size="small" ref="buttonRef" @click="chooseType('是否重点人')"> 是否重点人 </el-button>
<el-button size="small" v-for="it in btnsList" :key="it" @click="chooseType(it)"> {{ it }} </el-button> <el-button size="small" v-for="it in btnsList" :key="it" @click="chooseType(it)"> {{ it }} </el-button>
</div> </div>
</div> </div>
@ -80,29 +79,13 @@
</li> </li>
</ul> </ul>
</div> </div>
<Model v-model="isShow" :type="chooselx" :ids="ids" @change="getList" :dic="{D_BZ_SF}"></Model>
</div> </div>
<!-- 弹窗 -->
<!-- 虚拟触发 --> <Model v-model="isShow" :type="chooselx" :chooseList="chooseList" :ids="ids" @change="getList" :dic="{D_BZ_SF}"></Model>
<el-popover ref="popoverRef" :visible="isShowVisble" :width="400" :virtual-ref="buttonRef" trigger="click" title="布控" virtual-triggering >
<el-form :model="chooseRow" ref="elRowForm" :inline="true" label-width="100px" :rules="rules">
<el-form-item label="审核部门" prop="ssbmdm" style="width: 100%;">
<MOSTY.Department style="width: 100%;" clearable v-model="chooseRow.ssbmdm" placeholder="请选择部门" />
</el-form-item>
<el-form-item label="审批部门" prop="ssbmdm" style="width: 100%;margin-top: 20px;margin-bottom: 10px;">
<MOSTY.Department style="width: 100%;" clearable v-model="chooseRow.ssbmdm" placeholder="请选择部门" />
</el-form-item>
</el-form>
<div class="flex just-center mt10">
<el-button @click.stop="cancelRowSp">取消</el-button>
<el-button type="primary" @click.stop="handleSendSp" v-loading="btnloading">确定</el-button>
</div>
</el-popover>
</template> </template>
<script setup> <script setup>
import * as MOSTY from "@/components/MyComponents/index"; import { ElMessage } from "element-plus";
import { ElMessage,ElMessageBox } from "element-plus";
import Model from "./model.vue"; import Model from "./model.vue";
import { qcckGet } from "@/api/qcckApi.js"; import { qcckGet } from "@/api/qcckApi.js";
import { ref, reactive, onMounted, getCurrentInstance } from "vue"; import { ref, reactive, onMounted, getCurrentInstance } from "vue";
@ -111,18 +94,9 @@ import Pages from "@/components/aboutTable/Pages.vue";
import { qcckPost } from "@/api/qcckApi.js"; import { qcckPost } from "@/api/qcckApi.js";
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
const {D_BZ_SF, D_GS_RQFJ_FXDJ, D_GS_RQFJ_FXLB } = proxy.$dict("D_BZ_SF","D_GS_RQFJ_FXDJ","D_GS_RQFJ_FXLB"); //获取字典数据 const {D_BZ_SF, D_GS_RQFJ_FXDJ, D_GS_RQFJ_FXLB } = proxy.$dict("D_BZ_SF","D_GS_RQFJ_FXDJ","D_GS_RQFJ_FXLB"); //获取字典数据
const btnsList = reactive(['布控','是否关注','移交管控']) const btnsList = reactive(['是否重点人','布控','是否关注','移交管控'])
const chooseRow = ref({})
const buttonRef = ref()
const popoverRef = ref()
const elRowForm = ref()
const isShowVisble = ref(false)
const chooselx = ref('') const chooselx = ref('')
const isShow = ref(false) const isShow = ref(false)
const btnloading = ref(false)
const rules = reactive({
ssbmdm: [{ required: true, message: "请选择审核部门", trigger: "change" }],
})
const ids = ref([]) const ids = ref([])
const chooseList = ref([]) const chooseList = ref([])
const pageData = reactive({ const pageData = reactive({
@ -312,9 +286,6 @@ const chooseType = (val)=>{
chooselx.value = val; chooselx.value = val;
if(ids.value.length == 0) return ElMessage.warning("请选择对应的数据"); if(ids.value.length == 0) return ElMessage.warning("请选择对应的数据");
switch(val){ switch(val){
case '是否重点人':
isShowVisble.value = !isShowVisble.value;
break;
case '布控': case '布控':
proxy.$confirm("确定要布控", "警告", {type: "warning"}).then(() => { proxy.$confirm("确定要布控", "警告", {type: "warning"}).then(() => {
let params = { ids:ids.value, sfbk:'1'} let params = { ids:ids.value, sfbk:'1'}
@ -324,6 +295,7 @@ const chooseType = (val)=>{
}) })
}).catch(() => {}); }).catch(() => {});
break; break;
case '是否重点人':
case '是否关注': case '是否关注':
case '移交管控': case '移交管控':
isShow.value = true; isShow.value = true;
@ -331,22 +303,7 @@ const chooseType = (val)=>{
} }
} }
// 签收
const handleSendSp = () =>{
elRowForm.value.validate((valid) => {
if(!valid) return;
ElMessageBox.confirm('是否转为重点人?','Warning',{ confirmButtonText: 'OK', cancelButtonText: 'Cancel', type: 'warning' }).then(() => {
// btnloading.value = true;
}).catch(() => {
ElMessage({ type: 'info', message: '取消' })
})
})
}
const cancelRowSp = () =>{
chooseRow.value = {};
elRowForm.value.resetFields()
isShowVisble.value = false;
}
onMounted(()=>{ onMounted(()=>{
tabHeightFn(); tabHeightFn();

View File

@ -7,6 +7,14 @@
<el-form-item prop="sfZzdry" label="是否移交管控" v-if="props.type == '移交管控'"> <el-form-item prop="sfZzdry" label="是否移交管控" v-if="props.type == '移交管控'">
<MOSTY.Select filterable v-model="listQuery.sfZzdry" :dictEnum="props.dic.D_BZ_SF" width="100%" clearable placeholder="请选择是否布控"/> <MOSTY.Select filterable v-model="listQuery.sfZzdry" :dictEnum="props.dic.D_BZ_SF" width="100%" clearable placeholder="请选择是否布控"/>
</el-form-item> </el-form-item>
<el-form-item label="审核部门" prop="ssbmdm" style="width: 100%;" v-if="props.type == '是否重点人'">
<MOSTY.Department style="width: 100%;" clearable v-model="listQuery.ssbmdm" placeholder="请选择部门" />
</el-form-item>
<el-form-item label="审批部门" prop="ssbmdm" style="width: 100%;" v-if="props.type == '是否重点人'">
<MOSTY.Department style="width: 100%;" clearable v-model="listQuery.ssbmdm" placeholder="请选择部门" />
</el-form-item>
</el-form> </el-form>
<template #footer> <template #footer>
<div class="tc"> <div class="tc">
@ -31,14 +39,25 @@ const props = defineProps({
type:Array, type:Array,
default:[] default:[]
}, },
chooseList:{
type:Array,
default:[]
},
type:{
type:String, type:String,
dic:Object default:''
},
dic:{
type:Object,
default:''
},
}) })
const emits = defineEmits(["update:modelValue",'getDepValue']); const emits = defineEmits(["update:modelValue",'getDepValue']);
const formValidate = ref() const formValidate = ref()
const rules = reactive({ const rules = reactive({
sfGz: [{ required: true, message: "请选择是否关注", trigger: "change" }], sfGz: [{ required: true, message: "请选择是否关注", trigger: "change" }],
sfZzdry: [{ required: true, message: "请选择是否移交管控", trigger: "change" }], sfZzdry: [{ required: true, message: "请选择是否移交管控", trigger: "change" }],
ssbmdm: [{ required: true, message: "请选择是部门", trigger: "change" }],
}) })
const listQuery = ref({}); const listQuery = ref({});
@ -49,6 +68,7 @@ const submitForm = () =>{
let url = '' let url = ''
if( props.type == '是否关注') url = '/mosty-gsxt/tbGsxtRqfjRy/updateBySfgz' if( props.type == '是否关注') url = '/mosty-gsxt/tbGsxtRqfjRy/updateBySfgz'
if( props.type == '移交管控') url = '/mosty-gsxt/tbGsxtRqfjRy/updateByYjgk' if( props.type == '移交管控') url = '/mosty-gsxt/tbGsxtRqfjRy/updateByYjgk'
if( props.type == '是否重点人') url = '/mosty-gsxt/tbGsxtRqfjRy/updateByYjgk'
qcckPost(params,url).then(res=>{ qcckPost(params,url).then(res=>{
ElMessage.success("成功"); ElMessage.success("成功");
emits('update:modelValue',false) emits('update:modelValue',false)