This commit is contained in:
2025-07-16 10:21:53 +08:00
parent dfae83dae9
commit 186f647473
2 changed files with 49 additions and 66 deletions

View File

@ -1,64 +1,65 @@
<template>
<el-dialog v-model="modelValue" title="等级切换" width="500px" @close="handleClose">
<el-form :model="listQuery" ref="formValidate" :rules="rules">
<el-form-item prop="bkshzt" label="审核" v-if="props.type == '审核'">
<MOSTY.Select filterable v-model="listQuery.bkshzt" :dictEnum="props.dic.D_BZ_RCSHZT" width="100%" clearable placeholder="请选择是否布控"/>
</el-form-item>
</el-form>
<template #footer>
<div class="tc">
<el-button @click="handleClose">取消</el-button>
<el-button type="primary" @click="submitForm">确定</el-button>
</div>
</template>
</el-dialog>
<el-dialog v-model="modelValue" title="审核" width="500px" @close="handleClose">
<el-form :model="listQuery" ref="formValidate" :rules="rules" label-width="120px">
<el-form-item prop="bkshzt" label="审核">
<MOSTY.Select filterable v-model="listQuery.bkshzt" :dictEnum="props.dic.D_BZ_RCSHZT" width="100%" clearable placeholder="请选择是否布控" />
</el-form-item>
<el-form-item prop="bkshzt" label="审核部门">
<MOSTY.Department clearable v-model="listQuery.ssbmdm" :placeholder="listQuery.ssbm ? listQuery.ssbm : ''" style="width: 100%" />
</el-form-item>
</el-form>
<template #footer>
<div class="tc">
<el-button @click="handleClose">取消</el-button>
<el-button type="primary" @click="submitForm">确定</el-button>
</div>
</template>
</el-dialog>
</template>
<script setup>
import { ElMessage } from "element-plus";
import { qcckPost } from "@/api/qcckApi.js";
import * as MOSTY from "@/components/MyComponents/index";
import { ref ,defineProps,defineEmits, reactive} from 'vue';
import { ref, defineProps, defineEmits, reactive } from "vue";
const props = defineProps({
modelValue:{
type:Boolean,
default:false
modelValue: {
type: Boolean,
default: false
},
ids:{
type:Array,
default:[]
data: {
type: Object,
default: {}
},
type:String,
dic:Object
})
dic: {
type: Object,
default: {}
}
});
const emits = defineEmits(["update:modelValue",'getDepValue']);
const formValidate = ref()
const emits = defineEmits(["update:modelValue", "getDepValue"]);
const formValidate = ref();
const rules = reactive({
bkshzt: [{ required: true, message: "请选择审核状态", trigger: "change" }],
})
bkshzt: [{ required: true, message: "请选择审核状态", trigger: "change" }]
});
const listQuery = ref({});
const submitForm = () =>{
const submitForm = () => {
formValidate.value.validate((valid) => {
if (!valid) return false;
let params = { ids:props.ids, ...listQuery.value }
let url = ''
if( props.type == '审核') url = '/mosty-gsxt/tbGsxtRqfjRy/updateByBksh'
qcckPost(params,url).then(res=>{
let params = { ids: props.ids, ...listQuery.value };
qcckPost(params, "/mosty-gsxt/tbGsxtRqfjRy/updateByBksh").then((res) => {
ElMessage.success("成功");
emits('update:modelValue',false)
emits('change')
})
})
}
emits("update:modelValue", false);
emits("change");
});
});
};
const handleClose = () =>{
emits('update:modelValue',false)
const handleClose = () => {
emits("update:modelValue", false);
formValidate.value.resetFields();
}
};
</script>
<style lang="scss" scoped>
</style>
<style lang="scss" scoped></style>