更新权限注册
This commit is contained in:
71
src/views/home/components/qxsqDialog.vue
Normal file
71
src/views/home/components/qxsqDialog.vue
Normal file
@ -0,0 +1,71 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog title="权限申请" v-model="showDialog" width="500px" :close-on-click-modal="false" :close-on-press-escape="false" :show-close="false" >
|
||||
<el-form :model="listQuery" label-width="120px" :rules="rules" ref="formRef">
|
||||
<el-form-item label="申请人姓名" prop="xm">
|
||||
<el-input placeholder="请输入申请人姓名" v-model="listQuery.xm" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="申请人身份证" prop="sfzh">
|
||||
<el-input placeholder="请输入申请人身份证" v-model="listQuery.sfzh" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="申请人联系电话" prop="lxdh">
|
||||
<el-input placeholder="请输入申请人联系电话" v-model="listQuery.lxdh" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="权限说明" prop="qxsm">
|
||||
<el-input placeholder="请输入权限说明" v-model="listQuery.qxsm" clearable type="textarea" :rows="3"></el-input>
|
||||
</el-form-item>
|
||||
<div class="tc">
|
||||
<el-button type="primary" :loading="loading" @click="okSubit">确定</el-button>
|
||||
<el-button @click="reset()"> 重置 </el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { ElMessage } from "element-plus";
|
||||
import { qcckGet ,qcckPost} from "@/api/qcckApi.js";
|
||||
import emitter from "@/utils/eventBus.js";
|
||||
import { onMounted, ref,onUnmounted } from 'vue'
|
||||
const showDialog = ref(false)
|
||||
const listQuery = ref({})
|
||||
const formRef = ref()
|
||||
const rules = ref({
|
||||
xm: [{ required: true, message: '请输入申请人姓名', trigger: 'blur' }],
|
||||
sfzh: [{ required: true, message: '请输入申请人身份证', trigger: 'blur' }],
|
||||
lxdh: [{ required: true, message: '请输入申请人联系电话', trigger: 'blur' }],
|
||||
qxsm: [{ required: true, message: '请输入权限说明', trigger: 'blur' }],
|
||||
})
|
||||
const loading = ref(false)
|
||||
|
||||
onMounted(()=>{
|
||||
emitter.on("openPermminsion", () => {
|
||||
showDialog.value = true
|
||||
})
|
||||
})
|
||||
|
||||
// 提交
|
||||
const okSubit = async () => {
|
||||
formRef.value.validate((valid) => {
|
||||
if (!valid) return false;
|
||||
loading.value = true
|
||||
qcckPost(listQuery.value, "/mosty-gsxt/gsxt/qxsq/addEntity").then(() => {
|
||||
ElMessage.success("提交成功");
|
||||
showDialog.value = false;
|
||||
loading.value = false
|
||||
}).catch(() => {
|
||||
ElMessage.error("提交失败");
|
||||
loading.value = false
|
||||
});
|
||||
})
|
||||
// 提交表单
|
||||
console.log(listQuery.value)
|
||||
}
|
||||
|
||||
// 重置
|
||||
const reset = () => {
|
||||
listQuery.value = {}
|
||||
formRef.value.resetFields()
|
||||
}
|
||||
|
||||
</script>
|
||||
@ -130,9 +130,13 @@
|
||||
<LeftDialog></LeftDialog>
|
||||
<!-- 人员弹窗 -->
|
||||
<PeoDialog ref="peoDialogRef"></PeoDialog>
|
||||
|
||||
<!-- 权限申请 -->
|
||||
<QxsqDialog />
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import QxsqDialog from './components/qxsqDialog.vue'
|
||||
import { qcckGet ,qcckPost} from "@/api/qcckApi.js";
|
||||
import { ref, onMounted, onUnmounted,getCurrentInstance } from 'vue'
|
||||
import PeoDialog from './components/peoDialog.vue'
|
||||
|
||||
@ -104,9 +104,9 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { qcckGet } from "@/api/qcckApi.js"
|
||||
import FlowLine from './flowLine.vue'
|
||||
import { getItem } from "@/utils/storage";
|
||||
import emitter from "@/utils/eventBus.js";
|
||||
import { timeValidate, weekValidate } from "@/utils/tools.js";
|
||||
import { useRouter, useRoute, onBeforeRouteLeave } from "vue-router";
|
||||
import { useStore } from "vuex";
|
||||
@ -142,17 +142,19 @@ const wekendays = ref([
|
||||
const isShowVisble = ref(false);
|
||||
const store = useStore();
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
const btns = reactive({
|
||||
rightBtn: ["实战支撑", "安全监控"],
|
||||
leftBtn: ["数据整合", '分析研判'],
|
||||
moreBtn: [
|
||||
{ name: '后台', img: require('@/assets/images/Group427322486.png') },
|
||||
{ name: '权限申请', img: require('@/assets/images/Group427322486.png') },
|
||||
{ name: '退出登录', img: require('@/assets/images/Group427322485.png') }
|
||||
]
|
||||
{ name: '退出登录', img: require('@/assets/images/Group427322485.png') }]
|
||||
});
|
||||
const btnsActive = ref("");
|
||||
|
||||
const showMore = ref(false); //更多
|
||||
const activeText = ref("");
|
||||
const day = ref(0);
|
||||
const minute = ref("00"); //分
|
||||
const second = ref("00"); //秒
|
||||
@ -196,7 +198,7 @@ const handleBtns = (val) => {
|
||||
store.dispatch("user/logout");
|
||||
break;
|
||||
case "权限申请":
|
||||
router.push("/permissionApply");
|
||||
emitter.emit("openPermminsion")
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user