修改app权限功能
This commit is contained in:
parent
d0a8f2abd2
commit
bf22d30c46
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
<BasicDrawer v-bind="$attrs" @register="registerDrawer" width="650px" destroyOnClose showFooter>
|
||||
<template #title>
|
||||
区域标签配置
|
||||
权限标签配置
|
||||
</template>
|
||||
|
||||
<div>
|
||||
|
|
@ -12,27 +12,29 @@
|
|||
<template #title>
|
||||
{{itemNu.nuName}}
|
||||
</template>
|
||||
<template #extra>
|
||||
<!-- <template #extra>
|
||||
<a-tag color="blue" v-if="itemNu.areaFlag==1">{{itemNu.areaFlag_dictText}}</a-tag>
|
||||
<a-tag color="green" v-if="itemNu.areaFlag==2">{{itemNu.areaFlag_dictText}}</a-tag>
|
||||
<a-tag color="orange" v-if="itemNu.areaFlag==3">{{itemNu.areaFlag_dictText}}</a-tag>
|
||||
<a-tag color="purple" v-if="itemNu.areaFlag==4">{{itemNu.areaFlag_dictText}}</a-tag>
|
||||
</template>
|
||||
</template> -->
|
||||
<a-card title="基础功能" bodyStyle="padding: 14px;" headStyle="min-height: 40px;">
|
||||
<a-checkbox-group v-model:value="itemNu.permissionIds" style="margin-top: -10px;">
|
||||
<template v-for="(item,index) in nuData" :key="index">
|
||||
<template v-if="item.key === itemNu.nuId">
|
||||
<a-checkbox :checked="true" disabled style="margin-top:10px;">{{ item.slotTitle }}</a-checkbox>
|
||||
<a-checkbox :value="item.code" style="margin-top:10px;">{{ item.slotTitle }}</a-checkbox>
|
||||
</template>
|
||||
</template>
|
||||
</a-checkbox-group>
|
||||
</a-card>
|
||||
|
||||
<a-card title="扩展功能" style="margin-top: 10px;" headStyle="min-height: 40px;" bodyStyle="padding: 14px;">
|
||||
<!-- <a-card title="扩展功能" style="margin-top: 10px;" headStyle="min-height: 40px;" bodyStyle="padding: 14px;">
|
||||
<a-checkbox-group v-model:value="itemNu.permissionIds" style="margin-top: -10px;">
|
||||
<template v-for="(item,index) in treeData" :key="index">
|
||||
<template v-for="(item,index) in nuData" :key="index">
|
||||
<a-checkbox :value="item.key" style="margin-top:10px;">{{ item.slotTitle }}</a-checkbox>
|
||||
</template>
|
||||
</a-checkbox-group>
|
||||
</a-card>
|
||||
</a-card> -->
|
||||
</a-card>
|
||||
|
||||
|
||||
|
|
@ -186,7 +188,6 @@ const formData = reactive<Record<string, any>>({
|
|||
// VUE角色授权重复保存 #352
|
||||
async function doSave(params) {
|
||||
console.log("🚀 ~ doSave ~ params:", params)
|
||||
// loading.value = true;
|
||||
await saveRolePermissionList(params);
|
||||
setTimeout(()=>{
|
||||
loading.value = false;
|
||||
|
|
|
|||
|
|
@ -4,24 +4,25 @@
|
|||
<div class="jeecg-basic-table-form-container">
|
||||
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
|
||||
<a-row :gutter="24">
|
||||
<a-col :lg="5">
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="nuNameParams">
|
||||
<template #label><span title="区域名称">区域名称</span></template>
|
||||
<a-input placeholder="请输入区域名称" v-model:value="queryParam.nuNameParams" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="5">
|
||||
<!-- <a-col :lg="5">
|
||||
<a-form-item name="areaFlag">
|
||||
<template #label><span title="区域属性">区域属性</span></template>
|
||||
<j-dict-select-tag v-model:value="queryParam.areaFlag" dictCode="nu_type" placeholder="请选择区域属性" allow-clear @change="changeAreaFlag" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="14" :md="14" :sm="24">
|
||||
</a-col> -->
|
||||
<a-col :lg="18" :md="18" :sm="24">
|
||||
<span style="float: right; overflow: hidden" class="table-page-search-submitButtons">
|
||||
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
|
||||
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
|
||||
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined" style="margin-left: 8px"> 添加区域</a-button>
|
||||
<a-button type="primary" @click="handleSbyl" preIcon="ant-design:plus-outlined" style="margin-left: 8px"> 设备预览</a-button>
|
||||
<a-button type="primary" @click="handleQygh" preIcon="ant-design:snippets-outlined" style="margin-left: 8px"> 区域规划</a-button>
|
||||
<a-button type="primary" @click="handleSbyl" preIcon="ant-design:pic-center-outlined" style="margin-left: 8px"> 设备预览</a-button>
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
|
@ -36,9 +37,9 @@
|
|||
@mouseleave="item.key"
|
||||
@click="isSelected = item"
|
||||
style="height: 240px;">
|
||||
<template #extra>
|
||||
<!-- <template #extra>
|
||||
<span class="hldyClass" >{{item.areaFlag_dictText}}</span>
|
||||
</template>
|
||||
</template> -->
|
||||
<template #title>
|
||||
<a-row>
|
||||
<a-col>
|
||||
|
|
@ -92,6 +93,8 @@
|
|||
<BlWarehouseMaterialInfoListModal ref="registerCrkModal" @success="handleSuccess" />
|
||||
<!-- 停用时停用设备 -->
|
||||
<IotDevicesTyModall ref="iotDevicesTyModal" @success="handleTingyong"></IotDevicesTyModall>
|
||||
<!-- 区域规划 -->
|
||||
<QyghListModal ref="qyghModal" @success="handleTingyong"></QyghListModal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -101,6 +104,7 @@
|
|||
import NuBaseInfoModal from './components/NuBaseInfoModal.vue'
|
||||
import NuBaseInfoAddModal from './components/NuBaseInfoAddModal.vue'
|
||||
import BaseWlsbListModal from './components/BaseWlsbListModal.vue'
|
||||
import QyghListModal from './components/QyghListModal.vue'
|
||||
import EwmModal from './components/EwmModal.vue'
|
||||
import IotDevicesModall from '/@/views/biz/nuBaseInfo/iotDevices/IotDevicesModal.vue'
|
||||
import IotDevicesTyModall from '/@/views/biz/nuBaseInfo/iotDevices/IotDevicesTyModal.vue'
|
||||
|
|
@ -132,6 +136,7 @@ const { createMessage } = useMessage();
|
|||
const tableData = ref<any>([]);
|
||||
const registerModal = ref();
|
||||
const registerAddModal = ref();
|
||||
const qyghModal = ref();
|
||||
const labelCol = reactive({
|
||||
xs:24,
|
||||
sm:6,
|
||||
|
|
@ -143,6 +148,17 @@ const { createMessage } = useMessage();
|
|||
sm: 18,
|
||||
});
|
||||
|
||||
/**
|
||||
* 区域规划
|
||||
*/
|
||||
function handleQygh(){
|
||||
qyghModal.value.disableSubmit = false;
|
||||
qyghModal.value.add();
|
||||
}
|
||||
/**
|
||||
* 二维码
|
||||
* @param record
|
||||
*/
|
||||
function handleEwm(record) {
|
||||
ewmModal.value.disableSubmit = true;
|
||||
ewmModal.value.edit(record);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
<template>
|
||||
<div class="p-2">
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<JFormContainer :disabled="disabled">
|
||||
<template #detail>
|
||||
|
|
@ -16,12 +17,12 @@
|
|||
<a-input v-model:value="formData.nuName" placeholder="请输入区域名称" maxLength="15" allow-clear></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24" >
|
||||
<!-- <a-col :span="24" >
|
||||
<a-form-item label="区域属性" v-bind="validateInfos.areaFlag" id="NuBaseInfoForm-areaFlag" name="areaFlag">
|
||||
<j-dict-select-tag v-model:value="formData.areaFlag" dictCode="nu_type"
|
||||
placeholder="请选择区域属性" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-col> -->
|
||||
<!-- <a-col :span="24">
|
||||
<a-form-item label="使用状态 0未使用 1占用 2入住 3退住 4留床" v-bind="validateInfos.status" id="NuBaseInfoForm-status" name="status">
|
||||
<j-dict-select-tag v-model:value="formData.status" dictCode="nu_status" placeholder="请选择使用状态 0未使用 1占用 2入住 3退住 4留床" allow-clear />
|
||||
|
|
@ -32,6 +33,8 @@
|
|||
</template>
|
||||
</JFormContainer>
|
||||
</a-spin>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
|
|
@ -65,7 +68,7 @@ const confirmLoading = ref<boolean>(false);
|
|||
//表单验证
|
||||
const validatorRules = reactive({
|
||||
nuName: [{ required: true, message: '请输入区域名称!' },],
|
||||
areaFlag: [{ required: true, message: '请选择区域属性!' },],
|
||||
// areaFlag: [{ required: true, message: '请选择区域属性!' },],
|
||||
});
|
||||
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
|
||||
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
<template>
|
||||
<!-- <j-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭"> -->
|
||||
<a-drawer :title="title" :width="width" v-model:visible="visible" :closable="true" bodyStyle="padding:14px;"
|
||||
:footer-style="{ textAlign: 'right' }" @close="handleCancel">
|
||||
<j-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
|
||||
<!-- <a-drawer :title="title" :width="width" v-model:visible="visible" :closable="true" bodyStyle="padding:14px;"
|
||||
:footer-style="{ textAlign: 'right' }" @close="handleCancel"> -->
|
||||
<NuBaseInfoForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></NuBaseInfoForm>
|
||||
<template #footer>
|
||||
<!-- <template #footer>
|
||||
<a-button type="primary" style="margin-right: 8px" @click="handleCancel">关闭</a-button>
|
||||
<a-button type="primary" @click="handleOk" v-if="!disableSubmit">确认</a-button>
|
||||
</template>
|
||||
</a-drawer>
|
||||
<!-- </j-modal> -->
|
||||
</template> -->
|
||||
<!-- </a-drawer> -->
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
|
||||
|
||||
const title = ref<string>('');
|
||||
const width = ref<number>(800);
|
||||
const width = ref<number>(600);
|
||||
const visible = ref<boolean>(false);
|
||||
const disableSubmit = ref<boolean>(false);
|
||||
const registerForm = ref();
|
||||
|
|
@ -27,7 +27,7 @@
|
|||
* 新增
|
||||
*/
|
||||
function add() {
|
||||
title.value = '新增';
|
||||
title.value = '添加区域';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.add();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,140 @@
|
|||
<template>
|
||||
<div class="p-2">
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<JFormContainer :disabled="disabled">
|
||||
<template #detail>
|
||||
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol"
|
||||
name="NuBaseInfoForm">
|
||||
<a-row>
|
||||
<a-col :span="24" >
|
||||
<a-card >
|
||||
<div style="margin-left: -20px;margin-top: -14px;"><SectionDivider :title="'护理单元'"/></div>
|
||||
<div style="margin-top: -14px;"><a-divider /></div>
|
||||
<div style="margin-top: -24px;">
|
||||
<a-checkbox-group v-model:value="formData.hldyCheck">
|
||||
<template v-for="(item,i) in hldyList" :key="i">
|
||||
<span style="width: 150px;margin-top:14px;"><a-checkbox :value="item.nuId" >{{ item.nuName }}</a-checkbox></span>
|
||||
</template>
|
||||
</a-checkbox-group>
|
||||
</div>
|
||||
</a-card>
|
||||
</a-col>
|
||||
<a-col :span="24" style="margin-top: 14px;">
|
||||
<a-card >
|
||||
<div style="margin-left: -20px;margin-top: -14px;"><SectionDivider :title="'库房'"/></div>
|
||||
<div style="margin-top: -14px;"><a-divider /></div>
|
||||
<div style="margin-top: -24px;">
|
||||
<a-checkbox-group v-model:value="formData.kfCheck">
|
||||
<template v-for="(item,i) in hldyList" :key="i">
|
||||
<span style="width: 150px;margin-top:14px;"><a-checkbox :value="item.nuId" >{{ item.nuName }}</a-checkbox></span>
|
||||
</template>
|
||||
</a-checkbox-group>
|
||||
</div>
|
||||
</a-card>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</template>
|
||||
</JFormContainer>
|
||||
</a-spin>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted } from 'vue';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
import { getValueType } from '/@/utils';
|
||||
import { saveOrUpdate,getNuId } from '../NuBaseInfo.api';
|
||||
import { Form } from 'ant-design-vue';
|
||||
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
|
||||
const props = defineProps({
|
||||
formDisabled: { type: Boolean, default: false },
|
||||
formData: { type: Object, default: () => ({}) },
|
||||
formBpm: { type: Boolean, default: true }
|
||||
});
|
||||
const formRef = ref();
|
||||
const useForm = Form.useForm;
|
||||
const emit = defineEmits(['register', 'ok']);
|
||||
const { createMessage } = useMessage();
|
||||
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
|
||||
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
|
||||
const confirmLoading = ref<boolean>(false);
|
||||
const hldyList = ref<any>([]);
|
||||
const formData = reactive<Record<string, any>>({
|
||||
hldyCheck:[],
|
||||
kfCheck:[],
|
||||
});
|
||||
//表单验证
|
||||
const validatorRules = reactive({
|
||||
nuName: [{ required: true, message: '请输入区域名称!' },],
|
||||
// areaFlag: [{ required: true, message: '请选择区域属性!' },],
|
||||
});
|
||||
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
|
||||
|
||||
// 表单禁用
|
||||
const disabled = computed(() => {
|
||||
if (props.formBpm === true) {
|
||||
if (props.formData.disabled === false) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return props.formDisabled;
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
async function add() {
|
||||
formData.hldyCheck = [];
|
||||
formData.kfCheck = [];
|
||||
defHttp.get({ url: '/nuBaseInfo/nuBaseInfo/list', params: {pageSize:-1} }).then((res) => {
|
||||
console.log("🚀 ~ add ~ res:", res)
|
||||
for(var i=0;i<res.records.length;i++){
|
||||
var item = res.records[i];
|
||||
if(item.izHldy=="Y"){
|
||||
formData.hldyCheck.push(item.nuId);
|
||||
}
|
||||
if(item.izKf=="Y"){
|
||||
formData.kfCheck.push(item.nuId);
|
||||
}
|
||||
}
|
||||
hldyList.value = res.records;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 提交数据
|
||||
*/
|
||||
async function submitForm() {
|
||||
confirmLoading.value = true;
|
||||
//时间格式化
|
||||
let model = {hldyCheck:formData.hldyCheck+"",kfCheck:formData.kfCheck+""};
|
||||
console.log("🚀 ~ submitForm ~ model:", model)
|
||||
|
||||
await defHttp.post({ url: '/nuBaseInfo/nuBaseInfo/qygh', params: model }).then((res) => {
|
||||
console.log("🚀 ~ submitForm ~ res:", res)
|
||||
});
|
||||
|
||||
confirmLoading.value = false;
|
||||
emit('ok');
|
||||
}
|
||||
|
||||
|
||||
defineExpose({
|
||||
add,
|
||||
submitForm,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.antd-modal-form {
|
||||
padding: 0px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,142 @@
|
|||
<template>
|
||||
<div class="p-2">
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<JFormContainer :disabled="disabled">
|
||||
<template #detail>
|
||||
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol"
|
||||
name="NuBaseInfoForm">
|
||||
<a-row>
|
||||
<a-col :span="24" style="text-align: right;">
|
||||
<a-button style=" margin-right:10px" @click="handleQypz" >区域配置</a-button>
|
||||
</a-col>
|
||||
<a-col :span="24" >
|
||||
<a-card >
|
||||
<div style="margin-left: -20px;margin-top: -14px;"><SectionDivider :title="'护理单元'"/></div>
|
||||
<div style="margin-top: -14px;"><a-divider /></div>
|
||||
<div style="margin-top: -24px;">
|
||||
<a-row>
|
||||
<a-col :span="8" v-for="item in hldyList" :key="item.nuId" >
|
||||
<div style="margin-top: 14px;">{{ item.nuName }}</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
</a-card>
|
||||
</a-col>
|
||||
<a-col :span="24" style="margin-top: 14px;">
|
||||
<a-card >
|
||||
<div style="margin-left: -20px;margin-top: -14px;"><SectionDivider :title="'库房'"/></div>
|
||||
<div style="margin-top: -14px;"><a-divider /></div>
|
||||
<div style="margin-top: -24px;">
|
||||
<a-row>
|
||||
<a-col :span="8" v-for="item in kfList" :key="item.nuId">
|
||||
<div style="margin-top: 14px;">{{ item.nuName }}</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
</a-card>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</template>
|
||||
</JFormContainer>
|
||||
</a-spin>
|
||||
<QyghModal ref="qyghModal" @success="add" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted } from 'vue';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
import { getValueType } from '/@/utils';
|
||||
import { saveOrUpdate,getNuId } from '../NuBaseInfo.api';
|
||||
import { Form } from 'ant-design-vue';
|
||||
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
|
||||
import QyghModal from './QyghModal.vue'
|
||||
const props = defineProps({
|
||||
formDisabled: { type: Boolean, default: false },
|
||||
formData: { type: Object, default: () => ({}) },
|
||||
formBpm: { type: Boolean, default: true }
|
||||
});
|
||||
const formRef = ref();
|
||||
const qyghModal = ref();
|
||||
const useForm = Form.useForm;
|
||||
const emit = defineEmits(['register', 'ok']);
|
||||
const { createMessage } = useMessage();
|
||||
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
|
||||
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
|
||||
const confirmLoading = ref<boolean>(false);
|
||||
const hldyList = ref<any>([]);
|
||||
const kfList = ref<any>([]);
|
||||
const formData = reactive<Record<string, any>>({
|
||||
hldyCheck:[],
|
||||
kfCheck:[],
|
||||
});
|
||||
//表单验证
|
||||
const validatorRules = reactive({
|
||||
nuName: [{ required: true, message: '请输入区域名称!' },],
|
||||
// areaFlag: [{ required: true, message: '请选择区域属性!' },],
|
||||
});
|
||||
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
|
||||
|
||||
// 表单禁用
|
||||
const disabled = computed(() => {
|
||||
if (props.formBpm === true) {
|
||||
if (props.formData.disabled === false) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return props.formDisabled;
|
||||
});
|
||||
|
||||
function handleQypz() {
|
||||
qyghModal.value.disableSubmit = false;
|
||||
qyghModal.value.add();
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
async function add() {
|
||||
formData.hldyCheck = [];
|
||||
formData.kfCheck = [];
|
||||
defHttp.get({ url: '/nuBaseInfo/nuBaseInfo/list', params: {pageSize:-1,izHldy:'Y'} }).then((res) => {
|
||||
hldyList.value = res.records;
|
||||
});
|
||||
defHttp.get({ url: '/nuBaseInfo/nuBaseInfo/list', params: {pageSize:-1,izKf:'Y'} }).then((res) => {
|
||||
kfList.value = res.records;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 提交数据
|
||||
*/
|
||||
async function submitForm() {
|
||||
confirmLoading.value = true;
|
||||
//时间格式化
|
||||
let model = {hldyCheck:formData.hldyCheck+"",kfCheck:formData.kfCheck+""};
|
||||
console.log("🚀 ~ submitForm ~ model:", model)
|
||||
|
||||
await defHttp.post({ url: '/nuBaseInfo/nuBaseInfo/qygh', params: model }).then((res) => {
|
||||
console.log("🚀 ~ submitForm ~ res:", res)
|
||||
});
|
||||
|
||||
confirmLoading.value = false;
|
||||
}
|
||||
|
||||
|
||||
defineExpose({
|
||||
add,
|
||||
submitForm,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.antd-modal-form {
|
||||
padding: 0px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
<template>
|
||||
<a-drawer :title="title" :width="width" v-model:visible="visible" :closable="true" bodyStyle="padding:14px;"
|
||||
:footer-style="{ textAlign: 'right' }" @close="handleCancel">
|
||||
<QyghListForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></QyghListForm>
|
||||
<template #footer>
|
||||
<a-button type="primary" style="margin-right: 8px" @click="handleCancel">关闭</a-button>
|
||||
</template>
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, nextTick, defineExpose } from 'vue';
|
||||
import QyghListForm from './QyghListForm.vue'
|
||||
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
|
||||
|
||||
const title = ref<string>('');
|
||||
const width = ref<number>(600);
|
||||
const visible = ref<boolean>(false);
|
||||
const disableSubmit = ref<boolean>(false);
|
||||
const registerForm = ref();
|
||||
const emit = defineEmits(['register', 'success']);
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
function add() {
|
||||
title.value = '区域规划';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.add();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 确定按钮点击事件
|
||||
*/
|
||||
function handleOk() {
|
||||
registerForm.value.submitForm();
|
||||
}
|
||||
|
||||
/**
|
||||
* form保存回调事件
|
||||
*/
|
||||
function submitCallback() {
|
||||
handleCancel();
|
||||
emit('success');
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消按钮回调事件
|
||||
*/
|
||||
function handleCancel() {
|
||||
visible.value = false;
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
add,
|
||||
disableSubmit,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
/**隐藏样式-modal确定按钮 */
|
||||
.jee-hidden {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
<style lang="less" scoped></style>
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
<template>
|
||||
<a-drawer :title="title" :width="width" v-model:visible="visible" :closable="true" bodyStyle="padding:14px;"
|
||||
:footer-style="{ textAlign: 'right' }" @close="handleCancel">
|
||||
<QyghForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></QyghForm>
|
||||
<template #footer>
|
||||
<a-button type="primary" style="margin-right: 8px" @click="handleCancel">关闭</a-button>
|
||||
<a-button type="primary" @click="handleOk" v-if="!disableSubmit">确认</a-button>
|
||||
</template>
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, nextTick, defineExpose } from 'vue';
|
||||
import QyghForm from './QyghForm.vue'
|
||||
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
|
||||
|
||||
const title = ref<string>('');
|
||||
const width = ref<number>(600);
|
||||
const visible = ref<boolean>(false);
|
||||
const disableSubmit = ref<boolean>(false);
|
||||
const registerForm = ref();
|
||||
const emit = defineEmits(['register', 'success']);
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
function add() {
|
||||
title.value = '区域规划';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.add();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 确定按钮点击事件
|
||||
*/
|
||||
function handleOk() {
|
||||
registerForm.value.submitForm();
|
||||
}
|
||||
|
||||
/**
|
||||
* form保存回调事件
|
||||
*/
|
||||
function submitCallback() {
|
||||
handleCancel();
|
||||
emit('success');
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消按钮回调事件
|
||||
*/
|
||||
function handleCancel() {
|
||||
visible.value = false;
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
add,
|
||||
disableSubmit,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
/**隐藏样式-modal确定按钮 */
|
||||
.jee-hidden {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
<style lang="less" scoped></style>
|
||||
|
|
@ -11,12 +11,7 @@
|
|||
<a-card>
|
||||
<a-row v-for="(item,index) in treeData" :key="index">
|
||||
<a-checkbox-group v-model:value="formData.kzgn">
|
||||
<template v-if="item.code === 'hldy' && areaFlag == 1">
|
||||
<a-col :span="24" v-for="itemOne in item.children">
|
||||
<a-checkbox :value="itemOne.key" style="margin-top:10px;">{{ itemOne.slotTitle }}</a-checkbox>
|
||||
</a-col>
|
||||
</template>
|
||||
<template v-else-if="item.code === 'kf' && areaFlag == 3">
|
||||
<template v-if="item.code === 'jcgn'">
|
||||
<a-col :span="24" v-for="itemOne in item.children">
|
||||
<a-checkbox :value="itemOne.key" style="margin-top:10px;">{{ itemOne.slotTitle }}</a-checkbox>
|
||||
</a-col>
|
||||
|
|
|
|||
Loading…
Reference in New Issue