Commit 4139b7f0 authored by 张俊's avatar 张俊
parents 9476148b 70fd906e
......@@ -243,6 +243,7 @@ div {
.el-dialog__header {
border-bottom: 1px solid #edf0ff;
padding: 16px;
margin-right: 0;
}
.el-dialog__title {
......@@ -1518,10 +1519,6 @@ border-radius:8px;
color: #404a62;
padding-left: 20px;
}
.name_btn {
color: #3759be;
cursor: pointer;
}
.fr {
float: right;
}
......@@ -1539,4 +1536,27 @@ border-radius:8px;
vertical-align: baseline;
cursor: pointer;
}
/* 可点击文字颜色、指针样式 */
.can_click_text {
cursor: pointer;
color: #3759be;
}
.can_click_text:hover {
color: #738bd2;
}
.can_click_text:active {
color: #2c4798;
}
.warning_info {
background-color: #f7f7f9;
font-size: 14px;
color: #404a62;
padding: 5px;
text-align: left;
margin: 20px 0;
}
.danger_info {
color: #d75138;
}
......@@ -18,7 +18,12 @@
width: item.copy ? 'calc(100% - 36px)' : item.download || item.password ? 'calc(100% - 22px)': '100%',
color: item.download ? '#3759be' : '#404a62'
}"
>{{ item.value }}</span>
>
<span v-if="item.state" :style="{color: stateColor[item.state]}"> <span class="state-dot" :style="{backgroundColor: stateColor[item.state]}"></span>{{item.value}}</span>
<span v-else-if="item.secret">{{secret(item.value)}}</span>
<span v-else-if="item.callback" @click.stop="item.callback && item.callback()" class="can_click_text">{{item.value}}</span>
<span v-else>{{ item.value }}</span>
</span>
<a
class="copy-btn"
@click="copyText(item.value, $event)"
......@@ -26,6 +31,7 @@
>
复制
</a>
<bg-icon v-if="item.copy_icon" @click="copyIcon(item.value)" class="copy-btn" style="font-size: 14px; color: #a9b1c7;cursor: pointer;" icon="#bg-ic-copy"></bg-icon>
<bg-icon
class="copy-btn"
style="font-size: 14px; color: #a9b1c7;cursor: pointer;"
......@@ -61,9 +67,18 @@ export default {
default: 2,
},
},
model: {
prop: 'data',
event: 'newValue'
},
data() {
return {
show: false
show: false,
stateColor: {
success: '#48ad97',
danger: '#d75138',
default: '#787878'
}
}
},
methods: {
......@@ -81,6 +96,8 @@ export default {
});
},
copyText(text, e) {
console.log(text)
console.log(e)
const clipboard = new Clipboard(e.target, {
text: () => text,
});
......@@ -101,6 +118,15 @@ export default {
// 解决第一次点击不生效的问题,如果没有,第一次点击会不生效
clipboard.onClick(e);
},
copyIcon(data) {
navigator.clipboard.writeText(data).then(
function () {
},
function () {
}
);
},
download(url) {
const a = document.createElement("a"); // 创建a标签
a.setAttribute("download", ""); // download属性
......@@ -114,7 +140,16 @@ export default {
item.value = "***************"
}
this.show = !this.show
}
},
secret(value) {
const len = value.length;
const str1 = value.substring(0,3);
const str2 = value.substring(value.length-6,value.length);
const passwordStr = value.substring(3,value.length-6).split('').map(item => '*').join('');
console.log(8888888)
console.log(passwordStr)
return str1+passwordStr+str2
}
},
};
</script>
<template>
<div class="bg-table-btns">
<bg-table-btn
class="can_click_text"
v-for="(item, index) in curOperations"
:key="index"
:disabled="isDisabled(item)"
......
......@@ -4,7 +4,7 @@
:class="{ 'is-disabled': actionDisabled, 'is-easy': isEasy }"
>
<el-upload
action="/apaas/static/file/upload"
action="/apaas/common/file/upload"
:data="{
directory: 'file',
uniqueCode: false,
......@@ -127,7 +127,7 @@ export default {
},
computed: {
actionDisabled() {
return this.disabled || this.fileList.length === this.limit;
return this.disabled ;//|| this.fileList.length === this.limit; 文件数量 === limit 会导致无法删除已上传文件
},
},
watch: {
......
......@@ -808,6 +808,10 @@ a {
&.disabled {
cursor: not-allowed;
color: #a9b1c7;
&:hover,
&:active {
color: #a9b1c7;
}
}
& + .bg-table-btn {
......@@ -1477,7 +1481,7 @@ a {
font-size: 14px;
line-height: 24px;
color: #404a62;
&:nth-child(1) {
flex-shrink: 0;
width: 240px;
......@@ -1502,6 +1506,14 @@ a {
cursor: pointer;
margin-left: 8px;
}
.state-dot {
padding: 4px;
display: inline-block;
height: 5px;
width: 5px;
border-radius: 10px;
margin-right: 5px;
}
}
}
......@@ -1797,8 +1809,10 @@ a {
.el-upload__tip {
// display: none;
cursor: not-allowed;
line-height: 18px;
}
}
&.is-easy {
> div {
......@@ -1820,6 +1834,9 @@ a {
}
}
}
.el-upload__tip {
line-height: 18px;
}
}
.bg-upload-image {
......
......@@ -34,8 +34,8 @@
</template>
<template v-slot:action="{ row,index }">
<bg-table-btn :disabled="disabled||acDisable" :click="()=>{addParam(index)}">增加</bg-table-btn>
<bg-table-btn :disabled="disabled||acDisable" :click="()=>{removeParam(row, index)}">
<bg-table-btn class="can_click_btn" :disabled="disabled||acDisable" :click="()=>{addParam(index)}">增加</bg-table-btn>
<bg-table-btn class="can_click_btn" :disabled="disabled||acDisable" :click="()=>{removeParam(row, index)}">
删除
</bg-table-btn>
</template>
......
......@@ -94,8 +94,8 @@
</template>
<template v-slot:action="{ row }">
<bg-table-btn :disabled="disabled" :click="()=>{addInputConf(row)}"> 增加 </bg-table-btn>
<bg-table-btn :disabled="disabled" :click="()=>{removeInputConf(row)}"> 删除 </bg-table-btn>
<bg-table-btn class="can_click_btn" :disabled="disabled" :click="()=>{addInputConf(row)}"> 增加 </bg-table-btn>
<bg-table-btn class="can_click_btn" :disabled="disabled" :click="()=>{removeInputConf(row)}"> 删除 </bg-table-btn>
</template>
</bg-table-pro>
</el-form>
......
......@@ -9,7 +9,7 @@
<div class="flex_row">
<div class="flex_left">
<div class="box">
<el-input class="type-input" v-model="typeKeyword" @input="searchType" placeholder="请输入内容"></el-input>
<el-input class="type-input" v-model="typeKeyword" @input="searchType" :prefix-icon="Search" placeholder="请输入搜索内容"></el-input>
<div class="type_station bg-scroll">
<div class="type-box" :class="{'current-type':nodeClassifyId==item.classify_id}" @click="nodeClick(item)" v-for="(item,index) in typeList" :key="'type'+index+200">
......@@ -164,6 +164,7 @@ import { reactive, ref,onBeforeMount,toRefs,computed, watch, nextTick } from 'vu
import { useRouter } from 'vue-router';
import { ElMessage } from 'element-plus'
import axios from '../../../../request/http.js'
import { Search } from '@element-plus/icons-vue'
const bgForm = ref(null)
const state = reactive({
bgForm,
......
......@@ -41,7 +41,7 @@ const checkPhone = (rule, value, callback) => {
callback();
}
});
};
};
const contactFormRules = reactive({
contact_name: [
......@@ -51,6 +51,9 @@ const contactFormRules = reactive({
{ required: true, message: '请输入联系人手机号', trigger: 'blur' },
{ validator: checkPhone, trigger: 'blur' },
],
contact_email: [
{ type: 'email', message: '请输入正确的邮箱', trigger: 'blur' },
]
})
const contactRef = ref(null)
const emit = defineEmits(['action'])
......@@ -71,7 +74,7 @@ const clearForm = () => {
}
const setForm = (data) => {
contactForm.value = Object.assign(contactForm, data);
Object.assign(contactForm, data);
}
onMounted(() => {
......
......@@ -118,7 +118,7 @@ const nextStep = () => {
//业务系统表单检验触发事件 data为null 校验失败
const getSystemFormData = (data) => {
if(data) {
formData.value = Object.assign(formData,data);
Object.assign(formData,data);
step.value = 2;
}else {
......@@ -128,22 +128,13 @@ const getSystemFormData = (data) => {
const getContactFormData = (data) => {
if(data) {
formData.value = Object.assign(formData,data);
Object.assign(formData,data);
if(route.query.id) {
console.log(formData)
let params = {
...formData,
id: parseInt(route.query.id),
business_name: formData.value.business_name,
system_account: formData.value.system_account,
contact_email: formData.value.contact_email,
contact_phone: formData.value.contact_phone,
contact_name: formData.value.contact_name,
logo: formData.value.logo && formData.value.logo.length > 0 ? formData.value.logo[0].url : '',
state: formData.value.state,
business_desc: formData.value.business_desc,
develop_id: formData.value.develop_id,
access_address: formData.value.access_address,
remark: formData.value.remark
logo: formData.logo && formData.logo.length > 0 ? formData.logo[0].url : '',
}
$axios.post(`/apaas/system/v5/user/update`,params)
.then((res) => {
......@@ -151,26 +142,14 @@ const getContactFormData = (data) => {
successFlag.value = true;
step.value = 3;
}else {
$message.error(res.data.msg)
$message.error(res.data.data)
}
})
}else {
let params = {
organization_id: formData.value.organization_id,
system_role_id: "ab98a936-9046-455b-aba3-4c73671024d0",
logo: formData.value.logo && formData.value.logo.length > 0 ? formData.value.logo[0].url : '',
password: CryptoJS.AES.encrypt(formData.value.password,"swuE9cmCZQwrkYRV").toString(),
business_code: formData.value.business_code,
business_name: formData.value.business_name,
business_desc: formData.value.business_desc,
system_account: formData.value.system_account,
access_address: formData.value.access_address,
develop_id: formData.value.develop_id,
state: formData.value.state,
contact_name: formData.value.contact_name,
contact_phone: formData.value.contact_phone,
contact_email: formData.value.contact_email,
remark: formData.value.remark,
...formData,
logo: formData.logo && formData.logo.length > 0 ? formData.logo[0].url : '',
password: CryptoJS.AES.encrypt(formData.password,"swuE9cmCZQwrkYRV").toString(),
}
$axios.put(`/apaas/system/v5/user/create`,params)
.then((res) => {
......@@ -178,7 +157,7 @@ const getContactFormData = (data) => {
successFlag.value = true;
step.value = 3;
}else {
$message.error(res.data.msg)
$message.error(res.data.data)
}
})
}
......@@ -197,7 +176,7 @@ const continueCreate = () => {
systemFormRef.value.clearForm();
contactFormRef.value.clearForm();
step.value = 1;
successFlag = false;
successFlag.value = false;
}
//取消
const cancel = () => {
......@@ -232,7 +211,7 @@ const getDetail = () => {
remark: form.remark,
})
}else {
$message.error(res.data.msg)
$message.error(res.data.data)
}
})
}
......
......@@ -10,7 +10,7 @@
<el-form-item label="所属机构" prop="organization_id">
<el-tree-select v-model="systemForm.organization_id" :data="orgData" :props="treeProps" :render-after-expand="false" :disabled="formType" style="width: 100%;"/>
</el-form-item>
<el-form-item label="业务系统编码" prop="business_code">
<el-form-item label="业务系统编码" prop="business_code" v-if="formType">
<el-input v-model="systemForm.business_code" :disabled="formType"/>
</el-form-item>
<el-form-item label="业务系统名称" prop="business_name">
......@@ -32,7 +32,14 @@
<el-input type="textarea" :rows="3" v-model="systemForm.business_desc" />
</el-form-item>
<el-form-item label="角色" prop="system_role_id" v-if="!formType">
<el-input v-model="systemForm.system_role_id" />
<el-select v-model="systemForm.system_role_id" placeholder="请选择角色" :disabled="true" style="width: 100%">
<el-option
v-for="item in roleList"
:key="item.role_id"
:label="item.role_name"
:value="item.role_id"
/>
</el-select>
</el-form-item>
<el-form-item label="账号" prop="system_account">
<el-input v-model="systemForm.system_account" />
......@@ -55,7 +62,14 @@
<el-input v-model="systemForm.access_address" />
</el-form-item>
<el-form-item label="开发厂商名称" prop="develop_id">
<el-input v-model="systemForm.develop_id" />
<el-select v-model="systemForm.develop_id" placeholder="请选择开发厂商" style="width: 100%">
<el-option
v-for="item in firmList"
:key="item.dict_id"
:label="item.dict_name"
:value="item.dict_id"
/>
</el-select>
</el-form-item>
<el-form-item label="是否启用" prop="state">
<bg-switch :labels="['否','是']" :values="[0,1]" v-model="systemForm.state"></bg-switch>
......@@ -141,7 +155,7 @@ const validateSystemAccount = (rule, value, callback) => {
const formRules = reactive({
organization_id: [
{ required: true, message: '请选择组织机构', trigger: 'blur' },
{ required: true, message: '请选择组织机构', trigger: 'change' },
],
business_name: [
{ required: true, message: '请输入业务系统名称', trigger: 'blur' },
......@@ -164,10 +178,10 @@ const formRules = reactive({
],
})
const systemRef = ref(null)
const emit = defineEmits(['action'])
const roleList = ref([])
const firmList = ref([])
const submitForm = async () => {
if (!systemRef) return
......@@ -182,11 +196,12 @@ const submitForm = async () => {
const clearForm = () => {
if (!systemRef) return
systemRef.value.resetFields()
systemRef.value.resetFields();
systemForm.system_role_id = roleList.value[0].role_id;
}
const setForm = (data) => {
systemForm.value = Object.assign(systemForm, data);
Object.assign(systemForm, data);
}
const orgData = ref([])
......@@ -199,9 +214,11 @@ const getOrgTree = () => {
$axios.get(`/apaas/system/v5/org/tree`)
.then((res) => {
if (res.data.code == 200) {
orgData.value = res.data.data || [];
const orgDataTemp = res.data.data || []
orgDataTemp.shift()
orgData.value = orgDataTemp;
}else {
$message.error(res.data.msg)
$message.error(res.data.data)
}
})
}
......@@ -216,9 +233,34 @@ const copyText = (data) => {
}
);
}
const getRoleList = () => {
$axios.get(`/apaas/system/v5/org/select/role?is_admin=1`)
.then((res) => {
if (res.data.code == 200) {
roleList.value = res.data.data;
systemForm.system_role_id = roleList.value[0].role_id;
}else {
}
})
}
const getFirmList = () => {
$axios.get(`/apaas/system/v5/dictionary/developer/list`)
.then((res) => {
if (res.data.code == 200) {
firmList.value = res.data.data;
}else {
}
})
}
onBeforeMount(() =>{
getOrgTree()
getRoleList()
getFirmList()
})
onMounted(() => {
......
......@@ -16,7 +16,8 @@
</div>
<div class="info_content">
<div class="img_box">
<img src="/src/assets/imgs/home_ic_user.png" style="height: 96px;width: 96px;border-radius: 99px" alt="">
<img v-if="logo" :src="logo" style="height: 96px;width: 96px;border-radius: 99px" alt="">
<img v-else src="/src/assets/imgs/home_ic_user.png" style="height: 96px;width: 96px;border-radius: 99px" alt="">
</div>
<div class="info_box">
<bg-info :data="baseInfo"></bg-info>
......@@ -44,71 +45,75 @@
import { reactive, toRefs, ref, } from '@vue/reactivity'
import { getCurrentInstance } from 'vue'
import { computed, onBeforeMount } from '@vue/runtime-core'
import { useRouter } from 'vue-router';
import { useRoute, useRouter } from 'vue-router';
const route = useRoute();
const { proxy } = getCurrentInstance()
const { $axios,$message } = proxy
const baseInfo = reactive(
[
{
[{
name: "所属机构",
value: "某某省/某某市/大数据局",
nameWidth: 112
value: "",
nameWidth: 130
},
{
name: "业务系统编码",
value: "00000001",
nameWidth: 112
value: "",
nameWidth: 130
},
{
name: "业务系统名称",
value: "大数据处理系统",
nameWidth: 112
value: "",
nameWidth: 130
},
{
name: "账号",
value: "admin001",
nameWidth: 112
value: "",
nameWidth: 130
},
{
name: "AppID",
value: "dasjkjjk",
nameWidth: 112
value: "",
nameWidth: 130
},
{
name: "AppSecret",
value: "asda*******************jhjh",
nameWidth: 112
value: "",
copy_icon: true,
secret: true,
nameWidth: 130
},
{
name: "创建人",
value: "admin(机构管理员)",
nameWidth: 112
value: "",
nameWidth: 130
},
{
name: "创建时间",
value: "2022-01-01 10:10:10",
nameWidth: 112
value: "",
nameWidth: 130
},
{
name: "是否启用",
value: "",
nameWidth: 112
value: "",
state: "",
nameWidth: 130
},
{
name: "开发厂商名",
value: "某某大数据开发商",
nameWidth: 112
name: "开发厂商名",
value: "",
nameWidth: 130
},
{
name: "访问地址",
value: "http://www.bigdata.com",
value: "",
full: true,
nameWidth: 112
nameWidth: 130
},
{
name: "业务系统描述",
value: "系统描述系统描述系统描述系统描述系统描述系统描述系统描述系统描述系统描述系统描述系统描述系统描述系统描述系统描述系统描述系统描述",
value: "",
full: true,
nameWidth: 112
nameWidth: 130
},
]
)
......@@ -116,31 +121,62 @@ const baseInfo = reactive(
const contactInfo = reactive(
[{
name: "联系人姓名",
value: "xxx",
nameWidth: 112
value: "",
nameWidth: 130
},
{
name: "联系人手机号",
value: "15627365265",
nameWidth: 112
value: "",
nameWidth: 130
},
{
name: "联系人邮箱",
value: "http://www.bigdata@163.com",
value: "",
full: true,
nameWidth: 112
nameWidth: 130
},
{
name: "备注",
value: "系统描述系统描述系统描述系统描述系统描述系统描述系统描述系统描述系统描述系统描述系统描述系统描述系统描述系统描述系统描述系统描述",
value: "",
full: true,
nameWidth: 112
nameWidth: 130
},
]
)
])
const logo = ref('')
const getDetail = () => {
$axios.get(`/apaas/system/v5/user/detail/${route.query.id}`)
.then((res) => {
if (res.data.code == 200) {
const detail = res.data.data;
baseInfo[0].value = detail.organization_name;
baseInfo[1].value = detail.business_code;
baseInfo[2].value = detail.business_name;
baseInfo[3].value = detail.system_account;
baseInfo[4].value = detail.app_id;
baseInfo[5].value = detail.app_secret;
baseInfo[6].value = detail.created_by;
baseInfo[7].value = detail.created_time;
baseInfo[8].value = detail.state === 1 ? '' : '';
baseInfo[8].state = detail.state === 1 ? 'success' : 'default';
baseInfo[9].value = detail.develop_id;
baseInfo[10].value = detail.access_address;
baseInfo[11].value = detail.business_desc;
contactInfo[0].value = detail.contact_name;
contactInfo[1].value = detail.contact_phone;
contactInfo[2].value = detail.contact_email;
contactInfo[3].value = detail.remark;
logo.value = detail.logo;
}else {
$message.error(res.data.data)
}
})
}
onBeforeMount(() => {
getDetail()
})
</script>
......
......@@ -14,13 +14,20 @@
<div class="tree_content">
<div class="search">
<el-input
v-model="search"
v-model="filterTree"
placeholder="请输入组织名称搜索"
:prefix-icon="Search"
/>
</div>
<div class="tree">
<el-tree :data="orgData" :props="defaultProps" @node-click="handleNodeClick" :default-expand-all="true">
<el-tree ref="treeRef"
:data="orgData"
:props="defaultProps"
@node-click="handleNodeClick"
node-key="id"
:highlight-current="true"
:filter-node-method="filterNode"
:default-expand-all="true">
<template #default="{ node, data }">
<div class="custom_tree_node">
<span
......@@ -36,7 +43,7 @@
</div>
<div class="flex_right bgc_white">
<div class="main_container">
<bg-filter-group @search="getTableRows" v-model="filter.search" placeholder="请输入关键字">
<bg-filter-group @search="changeSearch" v-model="filter.search" placeholder="请输入关键字">
<template v-slot:left_action>
<div class="apaas_button">
<el-button class="register_btn" type="primary" @click="addAccount">
......@@ -50,14 +57,14 @@
重置密码
</el-button>
<span class="header_info">已选择<span style="color: #202531;font-weight: bold">{{selected.length}}</span></span>
<span class="header_info name_btn" @click="clearSelected">清空</span>
<span class="header_info can_click_text" @click="clearSelected">清空</span>
</div>
</template>
</bg-filter-group>
<div class="table_container apaas_scroll">
<bg-table ref="dataTable" :headers="headers" :rows="tableRows" :isIndex="true" :stripe="true" :select="true" @selectAc="selectRows">
<template v-slot:business_name="{ row }">
<span @click="goDetail(row)" class="name_btn">
<span @click="goDetail(row)" class="can_click_text">
{{ row.business_name }}
</span>
</template>
......@@ -65,13 +72,13 @@
<bg-switch @click="stateChange(row)" :labels="['否','是']" :values="[0,1]" v-model="row.state"></bg-switch>
</template>
<template v-slot:action="{ row }">
<bg-table-btn class="btn" @click="editAccount(row.id)">
<bg-table-btn class="can_click_text" @click="editAccount(row.id)">
编辑
</bg-table-btn>
<bg-table-btn class="btn" @click="editPsdAccount(row)">
<bg-table-btn class="can_click_text" @click="editPsdAccount(row)">
修改密码
</bg-table-btn>
<bg-table-btn class="btn" @click="deleteAccount(row)">
<bg-table-btn class="can_click_text" @click="deleteAccount(row)">
删除
</bg-table-btn>
</template>
......@@ -196,7 +203,7 @@
<script setup>
import { Search } from '@element-plus/icons-vue'
import { reactive, toRefs, ref, } from '@vue/reactivity'
import { getCurrentInstance } from 'vue'
import { getCurrentInstance, watch, nextTick } from 'vue'
import { computed, onBeforeMount } from '@vue/runtime-core'
import { useRouter } from 'vue-router';
import { edit } from 'ace-builds';
......@@ -266,7 +273,9 @@ import CryptoJS from "crypto-js";
password: '',
confirm_password: '',
})
const selectNode = ref(null)
const filterTree = ref('')
const treeRef = ref(null)
const validatePass = (rule, value, callback) => {
if (value !== passwordForm.password) {
callback(new Error("密码输入不一致"))
......@@ -278,6 +287,7 @@ import CryptoJS from "crypto-js";
const passwordFormRules = reactive({
password: [
{ required: true, message: '请输入密码', trigger: 'blur' },
{min: 8,message: '密码长度不得低于8位',trigger: 'blur'}
],
confirm_password: [
{ required: true, message: '请确认密码', trigger: 'blur' },
......@@ -288,11 +298,11 @@ import CryptoJS from "crypto-js";
const router = useRouter();
const getTableRows = () => {
let params = {...filter}
let params = {...filter, organization_id: selectNode.value}
$axios.get(
`/apaas/system/v5/user/list`,
{
params,
params
}
)
.then((res) => {
......@@ -300,7 +310,7 @@ import CryptoJS from "crypto-js";
tableRows.value = res.data.data || []
tableTotal.value = res.data.total
}else {
$message.error(res.data.msg)
$message.error(res.data.data)
}
})
}
......@@ -312,7 +322,11 @@ import CryptoJS from "crypto-js";
}
const handleNodeClick = (data) => {
console.log(data)
console.log(data.data_type)
if(data.data_type == 1) {
selectNode.value = data.id;
changePage(1)
}
}
const orgData = ref([])
......@@ -327,12 +341,47 @@ import CryptoJS from "crypto-js";
.then((res) => {
if (res.data.code == 200) {
orgData.value = res.data.data || [];
orgData.value.shift()
const orgList = searchOrg(orgData.value);
selectNode.value = orgList.length > 0 ? orgList[0].id : '';
nextTick(() =>{
if(orgList.length > 0) {
treeRef.value.setCurrentNode(orgList[0])
}
})
getTableRows()
}else {
$message.error(res.data.msg)
$message.error(res.data.data)
}
})
}
const searchOrg = (data) => {
const arr = []
data.forEach(item => {
if(item.data_type === 1) {
arr.push(item);
return
}else {
if(item.Child){
searchOrg(item.Child)
}else {
return
}
}
})
return arr;
}
watch(filterTree, (val) => {
treeRef.value.filter(val)
})
const filterNode = (value, data) => {
if (!value) return true
return data.name.includes(value)
}
const stateChange = (row) => {
const state = row.state.toString();
$axios.post(
......@@ -342,7 +391,7 @@ import CryptoJS from "crypto-js";
if (res.data.code == 200) {
getTableRows()
}else {
$message.error(res.data.msg)
$message.error(res.data.data)
}
})
}
......@@ -350,7 +399,7 @@ import CryptoJS from "crypto-js";
const changeSize = (size) => {
filter.limit = size;
filter.page = 1;
getTableRows()
changePage(1)
}
const changePage = (page) => {
......@@ -358,6 +407,11 @@ import CryptoJS from "crypto-js";
getTableRows()
}
const changeSearch = (val) => {
filter.search = val
changePage(1)
} // 表格关键字筛选
const goDetail = (params) => {
router.push({
path: "/develop/account/detail",
......@@ -377,8 +431,12 @@ import CryptoJS from "crypto-js";
}
const deleteAccount = (data) => {
selectedRow.value = data;
deleteRowFlag.value = true;
if(data.state === 0) {
selectedRow.value = data;
deleteRowFlag.value = true;
}else {
$message.error('当前状态已启用,不可删除!')
}
}
const handleCloseDelete = () => {
......@@ -398,7 +456,7 @@ import CryptoJS from "crypto-js";
$message.success(res.data.msg)
getTableRows()
}else {
$message.error(res.data.msg)
$message.error(res.data.data)
}
handleCloseDelete();
})
......@@ -413,7 +471,7 @@ import CryptoJS from "crypto-js";
$message.success(res.data.msg)
getTableRows()
}else {
$message.error(res.data.msg)
$message.error(res.data.data)
}
handleCloseRowDelete();
})
......@@ -451,7 +509,7 @@ import CryptoJS from "crypto-js";
$message.success(res.data.msg)
getTableRows()
}else {
$message.error(res.data.msg)
$message.error(res.data.data)
}
handleCloseReset();
})
......@@ -482,7 +540,7 @@ import CryptoJS from "crypto-js";
if (res.data.code == 200) {
$message.success(res.data.msg)
}else {
$message.error(res.data.msg)
$message.error(res.data.data)
}
handleCloseEdit();
})
......@@ -503,7 +561,7 @@ import CryptoJS from "crypto-js";
onBeforeMount(() => {
getOrgTree()
getTableRows()
//getTableRows()
})
......@@ -531,7 +589,7 @@ import CryptoJS from "crypto-js";
.tree {
overflow: auto;
height: calc(100% - 65px);
padding: 5px;
}
.tree :deep() .el-tree-node>.el-tree-node__children {
overflow: unset;
......@@ -570,16 +628,6 @@ import CryptoJS from "crypto-js";
bottom: unset;
margin-top: 0px
}
.warning_info {
background-color: #f7f7f9;
font-size: 14px;
color: #404a62;
padding: 5px;
text-align: left;
margin: 20px 0;
}
.danger_info {
color: #d75138;
}
</style>
\ No newline at end of file
......@@ -17,7 +17,8 @@
/>
</div>
<div class="tree">
<el-tree
<el-tree
class="file-tree"
:data="data"
:props="defaultProps"
@node-click="handleNodeClick"
......@@ -26,6 +27,7 @@
node-key="menu_id"
ref="menuTree"
:filter-node-method="filterNode"
:expand-on-click-node="false"
>
<template #default="{ node, data }">
<div class="custom-tree-node" pointer-events="none">
......@@ -36,9 +38,12 @@
>{{ data.menu_name }}</span
>
</div>
<span class="tree-action-box">
<span
class="tree-action-box"
:class="{'position_sticky': isSticky(data.name) }"
@click.stop="showAction($event, data,node)"
>
<bg-icon
@click.stop="showAction($event, data,node)"
class="tree-more"
icon="#bg-ic-s-more"
></bg-icon>
......@@ -55,7 +60,7 @@
<div class="action" @click="fileAction(1,selectData,selectParentData)">
新建本级
</div>
<div class="action" :class="{'disable':selectData && selectData.menu_type == 2}" @click="fileAction(2,selectData,selectParentData,selectData.menu_type == 2)">
<div class="action" @click="fileAction(2,selectData,selectParentData)">
新建下级
</div>
<div class="action" @click="fileAction(3,selectData,selectParentData)">
......@@ -145,19 +150,29 @@ watch(() => state.search,(n,o) => {
}, 500);
}) // 树形搜索值
const getMenuTree = () => {
const getMenuTree = (type) => {
axios
.get(`/apaas/system/v5/menu/tree`)
.then((res) => {
if (res.data.code == 200) {
state.data = res.data.data || []
nextTick().then(() => {
if (state.selectData) {
state.menuTree && state.menuTree.setCurrentKey(state.selectData.menu_id);
handleNodeClick(state.selectData);
}else {
state.menuTree && state.menuTree.setCurrentKey(state.data[0].menu_id);
handleNodeClick(state.data[0]);
if (type) {
if (type == 1) { // 删除数据后默认选中父节点或第一个节点
state.menuTree && state.menuTree.setCurrentKey(state.selectParentData.menu_id);
handleNodeClick(state.selectParentData);
}else {
state.menuTree && state.menuTree.setCurrentKey(state.data[0].menu_id);
handleNodeClick(state.data[0]);
}
}else { // 新建,上下移,初始化时默认选中节点
if (state.selectData) {
state.menuTree && state.menuTree.setCurrentKey(state.selectData.menu_id);
handleNodeClick(state.selectData);
}else {
state.menuTree && state.menuTree.setCurrentKey(state.data[0].menu_id);
handleNodeClick(state.data[0]);
}
}
})
......@@ -179,6 +194,14 @@ const findIndex= (code,arr) => {
})
} // 处理数据 用于判断能否上下移
const isSticky = (data) => {
const canvas = document.createElement("canvas");
const context = canvas.getContext("2d");
context.font = '14px MicrosoftYaHei';
const { width } = context.measureText(data);
return width > 255 ? true : false;
}
const showAction = (e, data,node) => {
acTop.value = ''
acLeft.value = ''
......@@ -217,6 +240,15 @@ const handleNodeClick = (data) => {
state.selectData = data
menuFormRef.value.setForm(state.selectData)
closeAction()
if (menuFormRef) {
nextTick().then(() => {
menuFormRef.value.menuRef.validate(valid => {
if (!valid) {
menuFormRef.value.menuRef.clearValidate()
}
})
})
} // 清除表单验证
} // 菜单树节点点击
const filterNode = (val,data) => {
......@@ -230,13 +262,15 @@ const fileAction = (val,data,parent,disabled=false) => {
if (val == 1) { // 新建本级菜单
state.addType = 1
let newChild = {
menu_name: "新菜单",
menu_id: 'new' + state.newMenuId,
menu_type: 0,
dict_group_id: "",
state: 1,
menu_url: "",
menu_logo: "",
menu_name: "新菜单", // 菜单名称
menu_id: 'new' + state.newMenuId, // 菜单id,用于新增后选中
menu_type: !parent ? 0 : parent.menu_type == 0 ? 0 : parent.menu_type == 1 ? 1 : 2, // 新增本级的类型
dict_group_id: parent ? parent.dict_group_id : "", // 父级的分组 有则继承,无则自选
state: 1, // 启用状态
menu_url: "", // 路径
menu_logo: "", // 图标
level: data.level, // 当前的level
p_menu_type: parent ? parent.menu_type : 0 // 父级的类型,用于判断菜单下不能建目录
}
state.menuTree.insertAfter(newChild,parent? parent.Child[parent.Child.length-1] : state.data[state.data.length -1])
state.menuTree && state.menuTree.setCurrentKey(newChild.menu_id);
......@@ -250,11 +284,13 @@ const fileAction = (val,data,parent,disabled=false) => {
let newChild = {
menu_name: "新菜单",
menu_id: 'new' + state.newMenuId,
menu_type: 0,
dict_group_id: "",
menu_type: data.menu_type == 0 ? 0 : data.menu_type == 1 ? 1 : 2,
dict_group_id: data.dict_group_id,
state: 1,
menu_url: "",
menu_logo: "",
p_menu_type: data.menu_type,
level: data.level + 1
}
state.menuTree.append(newChild,data)
state.menuTree && state.menuTree.setCurrentKey(newChild.menu_id);
......@@ -268,7 +304,8 @@ const fileAction = (val,data,parent,disabled=false) => {
if (res.data.code == 200) {
ElMessage.success(res.data.data)
state.selectData = null
getMenuTree()
let type = parent ? 1 : 2 // 1--有父级 2--无父级
getMenuTree(type)
}else {
ElMessage.error(res.data.data)
}
......@@ -384,9 +421,6 @@ const saveMenu = (el,type) => {
}else { // 新增下级
params.p_menu_id = state.selectParentData.menu_id
}
if (params.menu_type != 0) {
params.dict_group_id = ""
}
axios
.post(`/apaas/system/v5/menu/add`,params)
.then((res) => {
......@@ -467,17 +501,25 @@ const {
overflow: unset;
/* padding-left: 16px; */
}
.file-tree :deep() .el-tree-node__content {
position: relative;
}
.tree-action-box {
display: none;
position: absolute;
right: 0px;
top: 0px;
background-color: #f2f3f7;
width: 44px;
text-align: center;
height: 36px;
line-height: 36px;
}
.position_sticky {
position: sticky;
position: -webkit-sticky;
}
.tree .el-tree-node__content:hover .tree-action-box {
display: inline-block;
}
......
......@@ -11,15 +11,15 @@
<el-form-item label="菜单名称" prop="menu_name">
<el-input v-model="menuForm.menu_name" show-word-limit maxlength="8" placeholder="请输入菜单名称" />
</el-form-item>
<el-form-item label="类型" prop="menu_type">
<el-form-item label="类型" prop="menu_type" v-if="!topLevel">
<el-radio-group v-model="menuForm.menu_type" :disabled="radioDisabled">
<el-radio :label="0">目录</el-radio>
<el-radio :label="1">菜单</el-radio>
<el-radio :label="0" :disabled="typeDisFlag != 0">目录</el-radio>
<el-radio :label="1" :disabled="typeDisFlag == 2">菜单</el-radio>
<el-radio :label="2">子页面</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="分组" prop="dict_group_id" v-if="menuForm.menu_type == 0">
<el-select v-model="menuForm.dict_group_id" placeholder="请选择分组">
<el-form-item label="分组" prop="dict_group_id" v-if="!topLevel">
<el-select v-model="menuForm.dict_group_id" :disabled="groupFlag" placeholder="请选择分组">
<el-option
v-for="item in groupList"
:key="item.dict_id"
......@@ -39,10 +39,10 @@
inactive-text="否"
/>
</el-form-item>
<el-form-item label="菜单路径" prop="menu_url">
<el-form-item label="菜单路径" :prop="topLevel ? '' : 'menu_url'">
<el-input v-model="menuForm.menu_url" placeholder="请输入菜单路径" />
</el-form-item>
<el-form-item label="菜单图标" prop="menu_logo" v-if="menuForm.menu_type !== 2">
<el-form-item label="菜单图标" prop="menu_logo">
<div class="iconBox" :style="iconFlag ? {'border-color':'#2b4695'} : {} " @click="openIconbox">
<div>
<span>
......@@ -129,7 +129,7 @@ const state = reactive({
{ required: true, message: '请选择菜单分组', trigger: 'change' },
],
menu_url: [
{ required: true, message: '请输入菜单路径', trigger: 'blur' },
{ required: true, message: '请输入菜单路径', trigger: 'blur' },
]
},
groupList: [],
......@@ -139,6 +139,9 @@ const state = reactive({
showIconArr: [], // 展示的图标
timer: null,
radioDisabled: false,
topLevel: false,
typeDisFlag: null,
groupFlag: true,
})
const getGroupList = () => {
......@@ -180,6 +183,18 @@ const searchIcon = () => {
const setForm = (data) => {
console.log(data)
if (data.level && data.level == 1) {
state.topLevel = true
}else {
state.topLevel = false
if (data.level == 2) {
state.groupFlag = false
}else {
state.groupFlag = true
}
}
state.typeDisFlag = data.p_menu_type
console.log(state.groupFlag)
if (data.id) { // 编辑状态
state.radioDisabled = true
}else {
......@@ -217,6 +232,9 @@ const {
showIconArr,
icon_search,
radioDisabled,
topLevel,
typeDisFlag,
groupFlag,
} = toRefs(state)
defineExpose({ setForm , menuForm, menuRef })
......
......@@ -7,10 +7,18 @@
ref="directoryRef"
style="max-width: 80%"
>
<el-form-item label="上级目录" prop="parent">
<el-input v-model="directoryForm.parent" style="width: 80%;" />
<el-form-item label="上级目录" prop="p_organization_id" v-if="formType === 'create'">
<!-- <el-input v-model="directoryForm.p_organization_id" style="width: 80%;" /> -->
<el-tree-select
v-model="directoryForm.p_organization_id"
:data="orgData"
:props="treeProps"
:render-aftertreeProps-expand="false"
:filter-node-method="filterNode"
:check-strictly="true"
style="width: 80%;" />
<el-form-item label="" style="padding-left: 16px">
<el-checkbox v-model="directoryForm.level" label="顶级"/>
<el-checkbox v-model="directoryForm.level" @change="isTop" label="顶级"/>
</el-form-item>
</el-form-item>
......@@ -21,47 +29,102 @@
</template>
<script setup>
import { reactive, ref, onMounted } from 'vue'
import { reactive, ref, onMounted, onBeforeMount, getCurrentInstance, nextTick } from 'vue'
const props = defineProps({
formType: {
type: String,
default: 'create', //false 新建 true 编辑
},
});
const { proxy } = getCurrentInstance()
const { $axios,$message } = proxy
const directoryForm = reactive({
parent: '',
name: '',
level: ''
})
const directoryFormRules = reactive({
parent: [
{ required: true, message: '请输入上级目录', trigger: 'blur' },
],
name: [
{ required: true, message: '请输入名称', trigger: 'blur' },
],
})
const directoryRef = ref(null)
const emit = defineEmits(['action'])
const directoryForm = reactive({
p_organization_id: '',
name: '',
level: false
})
const submitForm = async () => {
if (!directoryRef) return
await directoryRef.value.validate((valid, fields) => {
if (valid) {
emit('action', directoryForm)
} else {
emit('action',null)
}
const directoryFormRules = reactive({
p_organization_id: [
{ required: true, message: '请输入上级目录', trigger: 'blur' },
],
name: [
{ required: true, message: '请输入名称', trigger: 'blur' },
],
})
}
const clearForm = () => {
if (!directoryRef) return
directoryRef.value.resetFields()
}
const directoryRef = ref(null)
const emit = defineEmits(['action'])
const submitForm = async () => {
if (!directoryRef) return
await directoryRef.value.validate((valid, fields) => {
if (valid) {
emit('action', directoryForm)
} else {
emit('action',null)
}
})
}
const clearForm = () => {
if (!directoryRef) return
directoryRef.value.resetFields()
}
const setForm = (data) => {
directoryForm.value = Object.assign(directoryForm, data);
}
const orgData = ref([])
const treeProps = {
label: 'name',
children: 'Child',
value: 'organization_id',
disabled: 'disabled'
}
const getOrgTree = () => {
$axios.get(`/apaas/system/v5/org/tree`)
.then((res) => {
if (res.data.code == 200) {
const orgDataTemp = res.data.data || []
orgDataTemp.shift()
orgData.value = filterOrg(orgDataTemp);
}else {
$message.error(res.data.data)
}
})
}
const filterOrg = (data) => {
if(data.length > 0) {
data.forEach(item => {
item.disabled = item.data_type === 0 ? false : true;
const setForm = (data) => {
directoryForm.value = Object.assign(directoryForm, data);
}
if(item.Child){
filterOrg(item.Child)
}else {
return
}
})
}
return data;
}
onMounted(() => {
})
const filterNode = (value, data) => {
return data.data_type === 0
}
const isTop = (data) => {
directoryForm.p_organization_id = data ? ' ' : ''; //空格绕过表单非空校验
}
onBeforeMount(() =>{
getOrgTree()
})
onMounted(() => {
})
defineExpose({ submitForm, clearForm, setForm })
defineExpose({ submitForm, clearForm, setForm })
</script>
\ No newline at end of file
This diff is collapsed.
......@@ -21,25 +21,11 @@
<div class="org_file info_box">
<div class="pl-1">组织附件</div>
<div>
<div class="file_item pl-1">
<span><bg-icon style="font-size: 24px" icon="#bg-ic-c-file-doc"></bg-icon></span>
<span class="file_name">xxxxxxx协议.doc</span>
<div class="file_item pl-1" v-for="(item, index) in fileList" :key="'file_'+index">
<span><bg-icon style="font-size: 24px" :icon="'#bg-ic-'+formatFile(item)"></bg-icon></span>
<span class="file_name">{{downloadFileFormatNew(item)}}</span>
<span class="fr download_btn">
<el-button type="primary" @click="downloadFile"><bg-icon icon="#bg-ic-to-bottom"></bg-icon>下载</el-button>
</span>
</div>
<div class="file_item pl-1">
<span><bg-icon style="font-size: 24px" icon="#bg-ic-c-file-zip"></bg-icon></span>
<span class="file_name">xxxxxxx协议.zip</span>
<span class="fr download_btn">
<el-button type="primary"><bg-icon icon="#bg-ic-to-bottom"></bg-icon>下载</el-button>
</span>
</div>
<div class="file_item pl-1">
<span><bg-icon style="font-size: 24px" icon="#bg-ic-c-file-image"></bg-icon></span>
<span class="file_name">xxxxxxx协议.jpg</span>
<span class="fr download_btn">
<el-button type="primary"><bg-icon icon="#bg-ic-to-bottom"></bg-icon>下载</el-button>
<el-button type="primary" @click="downloadFile(item)"><bg-icon icon="#bg-ic-to-bottom"></bg-icon>下载</el-button>
</span>
</div>
</div>
......@@ -58,9 +44,9 @@
</bg-table>
<div class="pagination_box">
<bg-pagination
:page="1"
:size="10"
:total="100"
:page="filter.page"
:size="filter.limit"
:total="tableTotal"
@change-page="changePage"
@change-size="changeSize"
>
......@@ -76,33 +62,37 @@
import { reactive, toRefs, ref, } from '@vue/reactivity'
import { getCurrentInstance } from 'vue'
import { computed, onBeforeMount } from '@vue/runtime-core'
import { useRouter } from 'vue-router';
import { useRoute } from 'vue-router';
import { downloadFileFormatNew } from '@/services/helper'
const { proxy } = getCurrentInstance()
const { $axios,$message } = proxy
const route = useRoute();
const baseInfo = reactive(
[
{
name: "机构名称",
value: "大数据局",
value: "",
nameWidth: 130
},
{
name: "组织机构代码",
value: "00000001",
value: "",
nameWidth: 130
},
{
name: "组织管理员数量",
value: "15",
value: "",
nameWidth: 130
},
{
name: "业务系统数量",
value: "10",
value: "",
nameWidth: 130
},
{
name: "组织描述",
value: "组织描述组织描述组织描述组织描述组织描述组织描述组织描述组织描述组织描述组织描述组织描述组织描述组织描述组织描述组织描述组织描述",
value: "",
nameWidth: 130
},
])
......@@ -110,48 +100,100 @@ const baseInfo = reactive(
const headers = reactive([
{
label: "业务系统名称",
prop: "name",
prop: "business_name",
},
{
label: "是否启用",
prop: "is_use",
prop: "state",
},
{
label: "业务系统账号",
prop: "account",
prop: "system_account",
},
])
const tableRows = reactive([
{name: '大数据处理系统',is_use: "",account: "admin"},
{name: '大数据处理系统',is_use: "",account: "admin"},
// {name: '大数据处理系统',is_use: "是",account: "admin"},
// {name: '大数据处理系统',is_use: "是",account: "admin"},
// {name: '大数据处理系统',is_use: "是",account: "admin"},
// {name: '大数据处理系统',is_use: "是",account: "admin"},
// {name: '大数据处理系统',is_use: "是",account: "admin"},
// {name: '大数据处理系统',is_use: "是",account: "admin"},
// {name: '大数据处理系统',is_use: "是",account: "admin"},
// {name: '大数据处理系统',is_use: "是",account: "admin"},
// {name: '大数据处理系统',is_use: "是",account: "admin"},
// {name: '大数据处理系统',is_use: "是",account: "admin"},
])
const tableRows = ref([])
const fileList = ref([])
const filter = reactive({
page: 1,
limit: 10,
});
const tableTotal = ref(0);
const changeSize = (size) => {
filter.limit = size;
changePage(1)
}
const changePage = (page) => {
filter.page = page;
getSystemInfo();
}
const changePage = (size) => {
const downloadFile = (data) => {
const a = document.createElement("a"); // 创建a标签
a.setAttribute("download", ""); // download属性
a.setAttribute("href", data); // href链接
a.click(); // 自执行点击事件
}
const formatFile = (url) => {
const file = url.split('.')[1];
let icon = ''
if(('docx').indexOf(file) !== -1) {
icon = 'c-file-doc'
}else if(('xlsx').indexOf(file) !== -1) {
icon = 'c-file-xlsx'
}else if(('pdf').indexOf(file) !== -1) {
icon = 'c-file-pdf'
}else if(('txt').indexOf(file) !== -1) {
icon = 'c-file-txt'
}else if(('zip').indexOf(file) !== -1) {
icon = 'c-file-zip'
}else if(('jpg,png').indexOf(file) !== -1) {
icon = 'c-file-image'
}else {
icon = 'txt'
}
return icon;
}
const downloadFile = (data) => {
const getDetail = () => {
$axios.get(`/apaas/system/v5/org/detail?organization_id=${route.query.id}&key_word=&state=&limit=&page=&data_type=1`)
.then((res) => {
if (res.data.code == 200) {
const detail = res.data.data.org_info;
baseInfo[0].value = detail.name;
baseInfo[1].value = detail.organization_code;
baseInfo[2].value = detail.org_admin_number;
baseInfo[3].value = detail.business_system_number;
baseInfo[4].value = detail.description;
fileList.value = detail.attachment ? detail.attachment.split(',') : [];
}else {
$message.error(res.data.data)
}
})
}
const getSystemInfo = () => {
console.log(11111111)
const params = {...filter,organization_id: route.query.id}
$axios.get(`/apaas/system/v5/org/business/msg`,{params})
.then((res) => {
if (res.data.code == 200) {
tableRows.value = res.data.data || [];
tableTotal.value = res.data.total;
}else {
$message.error(res.data.data)
}
})
}
onBeforeMount(() => {
if(route.query.id) {
getDetail()
getSystemInfo()
}
})
</script>
......@@ -187,7 +229,7 @@ const baseInfo = reactive(
margin-bottom: 40px;
}
.img_box {
width: 120px;
width: 120px\;
}
.info_box {
width: 60%;
......@@ -228,5 +270,12 @@ const baseInfo = reactive(
line-height: 40px;
padding-top: 5px;
}
.bg-pagination {
margin-top: 0px;
}
.info_content :deep() .bg-table .empty_container {
height: 160px;
padding-top: 25px;
}
</style>
\ No newline at end of file
......@@ -7,23 +7,25 @@
ref="orgRef"
style="max-width: 80%"
>
<el-form-item label="上级目录" prop="parent">
<el-input v-model="orgForm.parent" style="width: 80%"/>
<el-form-item label="上级目录" prop="p_organization_id" v-if="formType === 'create'">
<el-tree-select v-model="orgForm.p_organization_id" :data="orgData" :props="treeProps" :render-after-expand="false" :filter-node-method="filterNode" :disabled="orgForm.level" :check-strictly="true" style="width: 80%;" />
<el-form-item label="" style="padding-left: 16px">
<el-checkbox v-model="orgForm.level" label="顶级"/>
<el-checkbox v-model="orgForm.level" @change="isTop" label="顶级"/>
</el-form-item>
</el-form-item>
<el-form-item label="政务机构名称" prop="orgName">
<el-input v-model="orgForm.orgName" />
<el-form-item label="政务机构名称" prop="name">
<el-input v-model="orgForm.name" />
</el-form-item>
<el-form-item label="组织机构代码" prop="code">
<el-input v-model="orgForm.code" />
<el-form-item label="组织机构代码" prop="organization_code">
<el-input v-model="orgForm.organization_code" />
</el-form-item>
<el-form-item label="组织介绍" prop="desc">
<el-input type="textarea" :rows="3" v-model="orgForm.desc" />
<el-form-item label="组织介绍" prop="description">
<el-input type="textarea" :rows="3" v-model="orgForm.description" />
</el-form-item>
<el-form-item label="组织附件" prop="logo">
<bg-upload v-model="orgForm.file" customTips>
<bg-upload v-model="orgForm.attachment" customTips :limit="3"
:fileTypes="['doc','docx','xls','xlsx','pdf','jpg','jpeg','png','zip','rar']"
:otherInfo="'最多可上传三个附件,可上传zip,rar,doc,docx,xlsx,xls,png,jpg,可上传营业执照和相关协议文件等'">
<span>将文件拖到此处,或 点击上传</span>
</bg-upload>
</el-form-item>
......@@ -31,56 +33,111 @@
</template>
<script setup>
import { reactive, ref, onMounted } from 'vue'
import { reactive, ref, onMounted, onBeforeMount, getCurrentInstance } from 'vue'
const props = defineProps({
formType: {
type: String,
default: 'create', //false 新建 true 编辑
},
});
const { proxy } = getCurrentInstance()
const { $axios,$message } = proxy
const orgForm = reactive({
p_organization_id: '',
level: false,
name: '',
organization_code: '',
description: '',
attachment: []
})
const orgForm = reactive({
parent: '',
level: '',
orgName: '',
code: '',
desc: '',
desc: '',
file: ''
})
const formRules = reactive({
p_organization_id: [
{ required: true, message: '输入上级目录', trigger: 'blur' },
],
name: [
{ required: true, message: '请输入机构名称', trigger: 'blur' },
],
organization_code: [
{ required: true, message: '请输入组织机构代码', trigger: 'blur' },
],
})
const formRules = reactive({
parent: [
{ required: true, message: '输入上级目录', trigger: 'blur' },
],
orgName: [
{ required: true, message: '请输入机构名称', trigger: 'blur' },
],
code: [
{ required: true, message: '请输入组织机构代码', trigger: 'blur' },
],
})
const orgRef = ref(null)
const emit = defineEmits(['action'])
const orgRef = ref(null)
const emit = defineEmits(['action'])
const submitForm = async () => {
if (!orgRef) return
await orgRef.value.validate((valid, fields) => {
if (valid) {
emit('action', orgForm)
} else {
emit('action',null)
}
})
}
const submitForm = async () => {
if (!orgRef) return
await orgRef.value.validate((valid, fields) => {
if (valid) {
emit('action', orgForm)
} else {
emit('action',null)
}
})
}
const clearForm = () => {
if (!orgRef) return
orgRef.value.resetFields()
}
const setForm = (data) => {
orgForm.value = Object.assign(orgForm, data);
}
const orgData = ref([])
const treeProps = {
label: 'name',
children: 'Child',
value: 'organization_id',
disabled: 'disabled'
}
const getOrgTree = () => {
$axios.get(`/apaas/system/v5/org/tree`)
.then((res) => {
if (res.data.code == 200) {
const orgDataTemp = res.data.data || []
orgDataTemp.shift()
orgData.value = filterOrg(orgDataTemp);
}else {
$message.error(res.data.data)
}
})
}
const clearForm = () => {
if (!orgRef) return
orgRef.value.resetFields()
}
const filterOrg = (data) => {
if(data.length > 0) {
data.forEach(item => {
item.disabled = item.data_type === 0 ? false : true;
const setForm = (data) => {
orgForm.value = Object.assign(orgForm, data);
}
if(item.Child){
filterOrg(item.Child)
}else {
return
}
})
}
return data;
}
onMounted(() => {
const filterNode = (value, data) => {
})
return data.data_type === 0
}
const isTop = (data) => {
orgForm.p_organization_id = data ? ' ' : ''; //空格绕过表单非空校验
}
onBeforeMount(() => {
getOrgTree()
})
onMounted(() => {
})
defineExpose({ submitForm, clearForm, setForm })
</script>
\ No newline at end of file
......@@ -44,14 +44,17 @@
</div>
<div class="content_main">
<systemAccountForm v-show="step === 1" ref="systemAccountRef" @action="getSystemAccountFormData"></systemAccountForm>
<systemPersonForm v-show="step === 2" ref="systemPersonRef" @action="getSystemPersonFormData"></systemPersonForm>
<orgAccountForm v-show="step === 1" :form-type="route.query.id ? true : false" :id="route.query.id" ref="orgAccountRef" @action="getOrgAccountFormData"></orgAccountForm>
<orgPersonForm v-show="step === 2" ref="orgPersonRef" @action="getOrgPersonFormData"></orgPersonForm>
<div class="process_end" v-show="step === 3">
<div>
<div><img src="@/assets/imgs/img_data-complete.png" alt=""></div>
<div class="font_bold">平台用户新增成功</div>
<div>
<img v-if="successFlag" src="@/assets/imgs/img_data-complete.png" alt="">
<img v-else src="@/assets/imgs/img_data-fail.png" alt="">
</div>
<div class="font_bold">{{route.query.id ? (successFlag ? '组织用户编辑成功' : '组织用户编辑失败') : (successFlag ? '组织用户新增成功' : '组织用户新增失败')}}</div>
<el-button @click="cancel">返回列表</el-button>
<el-button type="primary" @click="continueCreate">继续创建</el-button>
<el-button v-if="!route.query.id" type="primary" @click="continueCreate">继续创建</el-button>
</div>
</div>
......@@ -76,51 +79,88 @@
<script setup>
import { useRoute, useRouter } from 'vue-router';
import systemAccountForm from './system-account-form.vue';
import systemPersonForm from './system-person-form.vue';
import { reactive, ref,onBeforeMount,toRefs,computed, onBeforeUnmount, onMounted } from 'vue';
import orgAccountForm from './org-account-form.vue';
import orgPersonForm from './org-person-form.vue';
import { reactive, ref,onBeforeMount,toRefs,computed, onBeforeUnmount, onMounted, getCurrentInstance } from 'vue';
import CryptoJS from "crypto-js";
const { proxy } = getCurrentInstance()
const { $axios,$message } = proxy
const route = useRoute();
const router = useRouter();
const step = ref(1);
const systemAccountRef = ref(null);
const systemPersonRef = ref(null);
const orgAccountRef = ref(null);
const orgPersonRef = ref(null);
const formData = reactive({
org: '',
role: '',
logo: '',
account: '',
phone: '',
organization_id: '',
select_role: '',
logo: [],
system_account: '',
contact_phone: '',
password: '',
confirm_password: '',
is_use: 1,
state: 1,
name: '',
certificate_type: '',
certificate_account: '',
email: '',
contact_name: '',
document_type: '',
document_number: '',
contact_email: '',
remark: '',
}); //账号信息表单+个人信息表单
const successFlag = ref(false)
const orgId = ref('')
// 下一步
const nextStep = () => {
systemAccountRef.value.submitForm();
orgAccountRef.value.submitForm();
}
//账号信息表单检验触发事件 data为null 校验失败
const getSystemAccountFormData = (data) => {
const getOrgAccountFormData = (data) => {
if(data) {
formData.value = Object.assign(formData,data);
Object.assign(formData,data);
step.value = 2;
}else {
}
}
//个人信息表单检验触发事件 data为null 校验失败
const getSystemPersonFormData = (data) => {
const getOrgPersonFormData = (data) => {
if(data) {
formData.value = Object.assign(formData,data);
console.log(formData);
step.value = 3;
if(data) {
Object.assign(formData,data);
if(route.query.id) {
let params = {
...formData,
logo: formData.logo && formData.logo.length > 0 ? formData.logo[0].url : '',
}
$axios.put(`/apaas/system/v5/org/update/user/${route.query.id}`,params)
.then((res) => {
if (res.data.code == 200) {
successFlag.value = true;
step.value = 3;
}else {
$message.error(res.data.data)
}
})
}else {
const params = {...formData,
// organization_id: orgId.value,
logo: formData.logo && formData.logo.length > 0 ? formData.logo[0].url : '',
is_admin: 2,
password: CryptoJS.AES.encrypt(formData.password,"swuE9cmCZQwrkYRV").toString()
};
$axios.post(`/apaas/system/v5/org/add/user`,params)
.then((res) => {
if (res.data.code == 200) {
successFlag.value = true;
step.value = 3;
}else {
$message.error(res.data.data)
}
})
}
}
}
}
//上一步
......@@ -129,50 +169,57 @@ const previousStep = () => {
}
//提交表单
const submit = () => {
systemPersonRef.value.submitForm();
orgPersonRef.value.submitForm();
}
//继续创建 清空表单
const continueCreate = () => {
systemAccountRef.value.clearForm();
systemPersonRef.value.clearForm();
orgAccountRef.value.clearForm();
orgPersonRef.value.clearForm();
step.value = 1;
successFlag.value = false;
}
//取消
const cancel = () => {
router.go(-1);
}
const getDetail = () => {
$axios.get(`/apaas/system/v5/org/user/${route.query.id}`)
.then((res) => {
if (res.data.code == 200) {
const form = res.data.data;
orgAccountRef.value.setForm({
organization_id: form.organization_id,
select_role: form.select_role,
logo: [{url:form.logo}],
system_account: form.system_account,
contact_phone: form.contact_phone,
state: form.state,
})
onBeforeUnmount(()=>{
})
onMounted(() => {
if(route.query.type === "1") {
setTimeout(()=> {
systemAccountRef.value.setForm({
org: 'a',
code: 'b',
name: 'b',
desc: 'b',
logo: ['b'],
role: 'b',
account: 'b',
password: 'b',
confirm_password: 'b',
url: 'b',
firm_name: 'b',
is_use: 'b',
})
systemPersonRef.value.setForm({
contact_user: 'c',
phone: 'c',
email: 'c',
remark: 'c',
orgPersonRef.value.setForm({
contact_name: form.contact_name,
document_type: form.document_type,
document_number: form.document_number,
contact_email: form.contact_email,
remark: form.remark,
})
}else {
$message.error(res.data.data)
}
})
},500)
}
onBeforeMount(() => {
if(route.query.id) {
getDetail()
}
})
onMounted(() => {
})
</script>
<style scoped>
......
<template>
<el-form
:label-position="'right'"
label-width="120px"
:model="orgAccountForm"
:rules="orgAccountFormRules"
ref="orgformAccountRef"
style="max-width: 66%"
>
<el-form-item label="所属组织机构" prop="organization_id">
<el-tree-select v-model="orgAccountForm.organization_id" :data="orgData" :props="treeProps" :render-after-expand="false" :disabled="true" style="width: 100%;"/>
<!-- <el-input v-model="orgAccountForm.organization_id" /> -->
</el-form-item>
<el-form-item label="角色" prop="select_role" v-if="!formType">
<el-select v-model="orgAccountForm.select_role" multiple placeholder="请选择角色" :disabled="true" style="width: 100%">
<el-option
v-for="item in roleList"
:key="item.role_id"
:label="item.role_name"
:value="item.role_id"
/>
</el-select>
</el-form-item>
<el-form-item label="头像" prop="logo">
<bg-upload-image v-model="orgAccountForm.logo" :showTips="true" :limit="1" :fileSize="500" :fileSizeUnit="'KB'" listType="picture-card" :accept="['.jpg','.jpeg','.png']" customTips="请选择图片上传:大小120 * 120像素支持jpg、png等格式,图片需小于500KB"></bg-upload-image>
</el-form-item>
<el-form-item label="账号" prop="system_account">
<el-input v-model="orgAccountForm.system_account" />
</el-form-item>
<el-form-item label="手机号" prop="contact_phone">
<el-input v-model="orgAccountForm.contact_phone" />
</el-form-item>
<el-form-item label="密码" prop="password" v-if="!formType">
<el-input type="password" v-model="orgAccountForm.password" />
</el-form-item>
<el-form-item label="确认密码" prop="confirm_password" v-if="!formType">
<el-input type="password" v-model="orgAccountForm.confirm_password" />
</el-form-item>
<el-form-item label="是否启用" prop="state">
<bg-switch :labels="['否','是']" :values="[0,1]" v-model="orgAccountForm.state"></bg-switch>
</el-form-item>
</el-form>
</template>
<script setup>
import { reactive, ref, onMounted, onBeforeMount, getCurrentInstance } from 'vue';
import { useRoute } from 'vue-router';
const { proxy } = getCurrentInstance()
const { $axios,$message } = proxy
const route = useRoute();
const props = defineProps({
formType: {
type: Boolean,
default: false, //false 新建 true 编辑
},
id: {
type: String,
default: '',
}
});
const orgAccountForm = reactive({
organization_id: '',
select_role: '',
logo: [],
system_account: '',
contact_phone: '',
password: '',
confirm_password: '',
state: 1,
})
const validatePass = (rule, value, callback) => {
if (value !== orgAccountForm.password) {
callback(new Error("密码输入不一致"))
} else {
callback()
}
}
const validateSystemAccount = (rule, value, callback) => {
let params = null;
if (props.id){
params = {id: parseInt(props.id),system_account: value,}
}else {
params = {system_account: value}
}
$axios.post(`/apaas/system/v5/user/check/account`,params)
.then((res) => {
if (res.data.code == 200) {
callback()
}else {
callback(new Error(res.data.data))
}
})
}
const checkPhone = (rule, value, callback) => {
var phone_ruler = /^(?:(?:\+|00)86)?1[3-9]\d{9}$/;
setTimeout(() => {
if (!phone_ruler.test(value)&&value.length!==0) {
callback(new Error("请输入正确的手机号码"));
} else {
callback();
}
});
};
const checkPhoneRepet = (rule, value, callback) => {
let params = null;
if (props.id){
params = {id: parseInt(props.id),contact_phone: value,}
}else {
params = {id: 0,contact_phone: value}
}
$axios.post(`/apaas/system/v5/org/check`,params)
.then((res) => {
if (res.data.code == 200) {
callback()
}else {
callback(new Error(res.data.data))
}
})
}
const orgAccountFormRules = reactive({
organization_id: [
{ required: true, message: '请选择组织', trigger: 'blur' },
],
select_role: [
{ required: true, message: '请选择角色', trigger: 'blur' },
],
system_account: [
{ required: true, message: '请输入账号', trigger: 'blur' },
{ validator: validateSystemAccount, trigger: 'blur' },
],
contact_phone: [
{ required: true, message: '请输入手机号', trigger: 'blur' },
{ validator: checkPhone, trigger: 'blur' },
{ validator: checkPhoneRepet, trigger: 'blur' }
],
password: [
{ required: true, message: '请输入密码', trigger: 'blur' },
{min: 8,message: '密码长度不得低于8位',trigger: 'blur'}
],
confirm_password: [
{ required: true, message: '请确认密码', trigger: 'blur' },
{ validator: validatePass, trigger: 'blur' }
],
})
const orgformAccountRef = ref(null)
const emit = defineEmits(['action'])
const roleList = ref([])
const submitForm = async () => {
if (!orgformAccountRef) return
await orgformAccountRef.value.validate((valid, fields) => {
if (valid) {
emit('action', orgAccountForm)
} else {
emit('action',null)
}
})
}
const clearForm = () => {
if (!orgformAccountRef) return
orgformAccountRef.value.resetFields()
orgAccountForm.select_role = [roleList.value[0].role_id];
}
const setForm = (data) => {
Object.assign(orgAccountForm, data);
}
const orgData = ref([])
const treeProps = {
label: 'name',
children: 'Child',
value: 'organization_id'
}
const getOrgTree = () => {
$axios.get(`/apaas/system/v5/org/tree`)
.then((res) => {
if (res.data.code == 200) {
orgData.value = res.data.data || [];
}else {
$message.error(res.data.data)
}
})
}
const getRoleList = () => {
$axios.get(`/apaas/system/v5/org/select/role?is_admin=2`)
.then((res) => {
if (res.data.code == 200) {
roleList.value = res.data.data;
orgAccountForm.select_role = [roleList.value[0].role_id];
}else {
}
})
}
onBeforeMount(() =>{
getOrgTree()
getRoleList()
orgAccountForm.organization_id = route.query.orgId;
})
onMounted(() => {
})
defineExpose({ submitForm, clearForm, setForm })
</script>
\ No newline at end of file
<template>
<el-form
:label-position="'right'"
label-width="120px"
:model="orgPersonForm"
:rules="orgPersonFormRules"
ref="orgPersonFormRef"
style="max-width: 66%"
>
<el-form-item label="联系人姓名" prop="contact_name">
<el-input v-model="orgPersonForm.contact_name" />
</el-form-item>
<el-form-item label="证件类型" prop="document_type">
<el-select v-model="orgPersonForm.document_type" placeholder="请选择证件类型" style="width: 100%">
<el-option
v-for="item in documentTypeList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="证件号" prop="document_number">
<el-input v-model="orgPersonForm.document_number" />
</el-form-item>
<el-form-item label="联系人邮箱" prop="contact_email">
<el-input v-model="orgPersonForm.contact_email"/>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input type="textarea" :rows="3" v-model="orgPersonForm.remark" />
</el-form-item>
</el-form>
</template>
<script setup>
import { reactive, ref, onMounted } from 'vue'
const orgPersonForm = reactive({
contact_name: '',
document_type: '',
document_number: '',
contact_email: '',
remark: '',
})
const documentTypeList = ref([{
label: '身份证',
value: 1
}])
const orgPersonFormRules = reactive({
contact_email: [
// { required: true, message: '请输入手机号', trigger: 'blur' },
{ type: 'email',message: '请输入正确的邮箱', trigger: 'blur' }
],
})
const orgPersonFormRef = ref(null)
const emit = defineEmits(['action'])
const submitForm = async () => {
if (!orgPersonFormRef) return
await orgPersonFormRef.value.validate((valid, fields) => {
if (valid) {
emit('action', orgPersonForm)
} else {
emit('action',null)
}
})
}
const clearForm = () => {
if (!orgPersonFormRef) return
orgPersonFormRef.value.resetFields()
}
const setForm = (data) => {
Object.assign(orgPersonForm, data);
}
onMounted(() => {
})
defineExpose({ submitForm, clearForm, setForm })
</script>
\ No newline at end of file
......@@ -9,7 +9,7 @@
</div>
<div class="page_content flex_cloumn">
<div class="content_top apaas_scroll">
<div class="content_process">
<div class="content_process" v-if="!route.query.id">
<div>
<el-steps :active="step" >
<el-step title="" :class="{'process_complete': step > 1}">
......@@ -44,21 +44,24 @@
</div>
<div class="content_main">
<platformAccountForm v-show="step === 1" ref="platformAccountFormRef" @action="getPlatformAccountFormData"></platformAccountForm>
<platformAccountForm v-show="step === 1" :form-type="route.query.id ? true : false" :id="route.query.id" ref="platformAccountFormRef" @action="getPlatformAccountFormData"></platformAccountForm>
<platformPersonForm v-show="step === 2" ref="plplatformPersonFormRef" @action="getPlatformPersonFormData"></platformPersonForm>
<div class="process_end" v-show="step === 3">
<div>
<div><img src="@/assets/imgs/img_data-complete.png" alt=""></div>
<div class="font_bold">平台用户新增成功</div>
<div>
<img v-if="successFlag" src="@/assets/imgs/img_data-complete.png" alt="">
<img v-else src="@/assets/imgs/img_data-fail.png" alt="">
</div>
<div class="font_bold">{{route.query.id ? (successFlag ? '平台用户编辑成功' : '平台用户编辑失败') : (successFlag ? '平台用户新增成功' : '平台用户新增失败')}}</div>
<el-button @click="cancel">返回列表</el-button>
<el-button type="primary" @click="continueCreate">继续创建</el-button>
<el-button v-if="!route.query.id" type="primary" @click="continueCreate">继续创建</el-button>
</div>
</div>
</div>
</div>
<div class="content_bottom" v-if="step !== 3">
<div v-show="step === 1">
<div v-show="!route.query.id && step === 1">
<el-button @click="cancel">取消</el-button>
<el-button type="primary" @click="nextStep">下一步</el-button>
</div>
......@@ -67,7 +70,10 @@
<el-button type="primary" @click="previousStep">上一步</el-button>
<el-button type="primary" @click="submit">提交</el-button>
</div>
<div v-show="route.query.id">
<el-button @click="cancel">取消</el-button>
<el-button type="primary" @click="nextStep">保存</el-button>
</div>
</div>
</div>
......@@ -78,8 +84,10 @@
import { useRoute, useRouter } from 'vue-router';
import platformAccountForm from './platform-account-form.vue';
import platformPersonForm from './platform-person-form.vue';
import { reactive, ref,onBeforeMount,toRefs,computed, onBeforeUnmount, onMounted } from 'vue';
import CryptoJS from "crypto-js";
import { reactive, ref,onBeforeMount,toRefs,computed, onMounted, getCurrentInstance } from 'vue';
const { proxy } = getCurrentInstance()
const { $axios,$message } = proxy
const route = useRoute();
const router = useRouter();
const step = ref(1);
......@@ -87,18 +95,21 @@ const platformAccountFormRef = ref(null);
const plplatformPersonFormRef = ref(null);
const formData = reactive({
logo: '',
account: '',
phone: '',
system_account: '',
contact_phone: '',
password: '',
confirm_password: '',
role: '',
is_use: 1,
select_role: '',
state: '',
name: '',
email: '',
contact_name: '',
contact_email: '',
remark: '',
}); //账号信息表单+个人信息表单
const orgId = ref(null);
const successFlag = ref(false)
// 下一步
const nextStep = () => {
......@@ -107,18 +118,66 @@ const nextStep = () => {
//账号信息表单检验触发事件 data为null 校验失败
const getPlatformAccountFormData = (data) => {
if(data) {
formData.value = Object.assign(formData,data);
step.value = 2;
if(route.query.id) {
Object.assign(formData,data);
let params = {
...formData,
logo: formData.logo && formData.logo.length > 0 ? formData.logo[0].url : '',
}
$axios.put(`/apaas/system/v5/org/update/user/${route.query.id}`,params)
.then((res) => {
if (res.data.code == 200) {
successFlag.value = true;
step.value = 3;
}else {
$message.error(res.data.data)
}
})
}else {
Object.assign(formData,data);
step.value = 2;
}
}else {
}
}
//个人信息表单检验触发事件 data为null 校验失败
const getPlatformPersonFormData = (data) => {
if(data) {
formData.value = Object.assign(formData,data);
console.log(formData);
step.value = 3;
if(data) {
Object.assign(formData,data);
if(route.query.id) {
console.log(formData)
// let params = {
// }
// $axios.post(`/apaas/system/v5/org/update/user/${route.query.id}`,params)
// .then((res) => {
// if (res.data.code == 200) {
// successFlag.value = true;
// step.value = 3;
// }else {
// $message.error(res.data.msg)
// }
// })
}else {
const params = {...formData,
organization_id: orgId.value,
logo: formData.logo && formData.logo.length > 0 ? formData.logo[0].url : '',
is_admin: 3,
password: CryptoJS.AES.encrypt(formData.password,"swuE9cmCZQwrkYRV").toString()
};
$axios.post(`/apaas/system/v5/org/add/user`,params)
.then((res) => {
if (res.data.code == 200) {
successFlag.value = true;
step.value = 3;
}else {
$message.error(res.data.data)
}
})
}
}
}
//上一步
......@@ -134,42 +193,53 @@ const continueCreate = () => {
platformAccountFormRef.value.clearForm();
plplatformPersonFormRef.value.clearForm();
step.value = 1;
successFlag.value = false;
}
//取消
const cancel = () => {
router.go(-1);
}
onBeforeUnmount(()=>{
})
onMounted(() => {
if(route.query.type === "1") {
setTimeout(()=> {
platformAccountFormRef.value.setForm({
org: 'a',
code: 'b',
name: 'b',
desc: 'b',
logo: ['b'],
role: 'b',
account: 'b',
password: 'b',
confirm_password: 'b',
url: 'b',
firm_name: 'b',
is_use: 'b',
})
plplatformPersonFormRef.value.setForm({
contact_user: 'c',
phone: 'c',
email: 'c',
remark: 'c',
const getOrgTree = () => {
$axios.get(`/apaas/system/v5/org/tree`)
.then((res) => {
if (res.data.code == 200) {
orgId.value = res.data.data[0].organization_id;
}else {
$message.error(res.data.data)
}
})
}
const getDetail = () => {
$axios.get(`/apaas/system/v5/org/user/${route.query.id}`)
.then((res) => {
if (res.data.code == 200) {
const form = res.data.data;
platformAccountFormRef.value.setForm({
logo: [{url:form.logo}],
system_account: form.system_account,
contact_phone: form.contact_phone,
state: form.state,
contact_name: form.contact_name,
contact_email: form.contact_email,
remark: form.remark,
})
}else {
$message.error(res.data.data)
}
})
},500)
}
onBeforeMount(() => {
getOrgTree()
if(route.query.id) {
getDetail()
}
})
onMounted(() => {
})
</script>
......
......@@ -10,39 +10,70 @@
<el-form-item label="头像" prop="logo">
<bg-upload-image v-model="platformAccountForm.logo" :showTips="true" :limit="1" :fileSize="500" :fileSizeUnit="'KB'" listType="picture-card" :accept="['.jpg','.jpeg','.png']" customTips="请选择图片上传:大小120 * 120像素支持jpg、png等格式,图片需小于500KB"></bg-upload-image>
</el-form-item>
<el-form-item label="账号" prop="account">
<el-input v-model="platformAccountForm.account" />
<el-form-item label="账号" prop="system_account">
<el-input v-model="platformAccountForm.system_account" />
</el-form-item>
<el-form-item label="手机号" prop="phone">
<el-input v-model="platformAccountForm.phone" />
<el-form-item label="手机号" prop="contact_phone">
<el-input v-model="platformAccountForm.contact_phone" />
</el-form-item>
<el-form-item label="密码" prop="password">
<el-form-item v-if="!formType" label="密码" prop="password">
<el-input type="password" v-model="platformAccountForm.password" />
</el-form-item>
<el-form-item label="确认密码" prop="confirm_password">
<el-form-item v-if="!formType" label="确认密码" prop="confirm_password">
<el-input type="password" v-model="platformAccountForm.confirm_password" />
</el-form-item>
<el-form-item label="角色授权" prop="role">
<el-input v-model="platformAccountForm.role" />
<el-form-item v-if="!formType" label="角色授权" prop="select_role">
<el-select v-model="platformAccountForm.select_role" multiple placeholder="请选择角色" style="width: 100%">
<el-option
v-for="item in roleList"
:key="item.role_id"
:label="item.role_name"
:value="item.role_id"
/>
</el-select>
</el-form-item>
<el-form-item label="是否启用" prop="is_use">
<bg-switch :labels="['否','是']" :values="[0,1]" v-model="platformAccountForm.is_use"></bg-switch>
<el-form-item v-if="formType" label="姓名" prop="contact_name">
<el-input v-model="platformAccountForm.contact_name" />
</el-form-item>
<el-form-item v-if="formType" label="邮箱" prop="contact_email">
<el-input v-model="platformAccountForm.contact_email"/>
</el-form-item>
<el-form-item v-if="formType" label="备注" prop="remark">
<el-input type="textarea" :rows="3" v-model="platformAccountForm.remark" />
</el-form-item>
<el-form-item label="是否启用" prop="state">
<bg-switch :labels="['否','是']" :values="[0,1]" v-model="platformAccountForm.state"></bg-switch>
</el-form-item>
</el-form>
</template>
<script setup>
import { reactive, ref, onMounted } from 'vue'
import { reactive, ref, onMounted, onBeforeMount, getCurrentInstance } from 'vue'
const { proxy } = getCurrentInstance()
const { $axios,$message } = proxy
const props = defineProps({
formType: {
type: Boolean,
default: false, //false 新建 true 编辑
},
id: {
type: String,
default: '',
}
});
const platformAccountForm = reactive({
logo: '',
account: '',
phone: '',
logo: [],
system_account: '',
contact_phone: '',
password: '',
confirm_password: '',
role: '',
is_use: 1,
select_role: '',
state: 1,
contact_name: '',
contact_email: '',
remark: '',
})
......@@ -53,26 +84,81 @@ const validatePass = (rule, value, callback) => {
callback()
}
}
const checkPhone = (rule, value, callback) => {
var phone_ruler = /^(?:(?:\+|00)86)?1[3-9]\d{9}$/;
setTimeout(() => {
if (!phone_ruler.test(value)&&value.length!==0) {
callback(new Error("请输入正确的手机号码"));
} else {
callback();
}
});
};
const validateSystemAccount = (rule, value, callback) => {
let params = null;
if (props.id){
params = {id: parseInt(props.id),system_account: value,}
}else {
params = {system_account: value}
}
$axios.post(`/apaas/system/v5/user/check/account`,params)
.then((res) => {
if (res.data.code == 200) {
callback()
}else {
callback(new Error(res.data.data))
}
})
}
const checkPhoneRepet = (rule, value, callback) => {
let params = null;
if (props.id){
params = {id: parseInt(props.id),contact_phone: value,}
}else {
params = {id: 0,contact_phone: value}
}
$axios.post(`/apaas/system/v5/org/check`,params)
.then((res) => {
if (res.data.code == 200) {
callback()
}else {
callback(new Error(res.data.data))
}
})
}
const platformAccountFormRules = reactive({
account: [
system_account: [
{ required: true, message: '请输入账号', trigger: 'blur' },
{ validator: validateSystemAccount, trigger: 'blur' },
],
phone: [
contact_phone: [
{ required: true, message: '请输入手机号', trigger: 'blur' },
{ validator: checkPhone, trigger: 'blur' },
{ validator: checkPhoneRepet, trigger: 'blur' }
],
role: [
select_role: [
{ required: true, message: '请选择角色', trigger: 'blur' },
],
password: [
{ required: true, message: '请输入密码', trigger: 'blur' },
{min: 8,message: '密码长度不得低于8位',trigger: 'blur'}
],
confirm_password: [
{ required: true, message: '请确认密码', trigger: 'blur' },
{ validator: validatePass, trigger: 'blur' }
],
contact_email: [
{ type: 'email',message: '请输入正确的邮箱', trigger: 'blur' }
],
})
const roleList = ref([])
const platformAccountRef = ref(null)
......@@ -95,9 +181,24 @@ const clearForm = () => {
}
const setForm = (data) => {
platformAccountForm.value = Object.assign(platformAccountForm, data);
Object.assign(platformAccountForm, data);
}
const getRoleList = () => {
$axios.get(`/apaas/system/v5/org/select/role?is_admin=3`)
.then((res) => {
if (res.data.code == 200) {
roleList.value = res.data.data;
}else {
}
})
}
onBeforeMount(() => {
getRoleList();
})
onMounted(() => {
})
......
......@@ -7,13 +7,13 @@
ref="platformPersonFormRef"
style="max-width: 66%"
>
<el-form-item label="姓名" prop="name">
<el-input v-model="platformPersonForm.name" />
<el-form-item label="姓名" prop="contact_name">
<el-input v-model="platformPersonForm.contact_name" />
</el-form-item>
<el-form-item label="邮箱">
<el-input v-model="platformPersonForm.email"/>
<el-form-item label="邮箱" prop="contact_email">
<el-input v-model="platformPersonForm.contact_email"/>
</el-form-item>
<el-form-item label="备注">
<el-form-item label="备注" prop="remark">
<el-input type="textarea" :rows="3" v-model="platformPersonForm.remark" />
</el-form-item>
</el-form>
......@@ -23,13 +23,15 @@
import { reactive, ref, onMounted } from 'vue'
const platformPersonForm = reactive({
name: '',
email: '',
contact_name: '',
contact_email: '',
remark: '',
})
const platformPersonFormRules = reactive({
contact_email: [
{ type: 'email',message: '请输入正确的邮箱', trigger: 'blur' }
],
})
const platformPersonFormRef = ref(null)
const emit = defineEmits(['action'])
......@@ -50,7 +52,7 @@ const clearForm = () => {
}
const setForm = (data) => {
platformPersonForm.value = Object.assign(platformPersonForm, data);
Object.assign(platformPersonForm, data);
}
onMounted(() => {
......
<template>
<el-form
:label-position="'right'"
label-width="120px"
:model="systemAccountFormRef"
:rules="systemAccountFormRules"
ref="platformAccountRef"
style="max-width: 66%"
>
<el-form-item label="所属组织机构" prop="org">
<el-input v-model="systemAccountFormRef.org" />
</el-form-item>
<el-form-item label="角色" prop="role">
<el-input v-model="systemAccountFormRef.role" />
</el-form-item>
<el-form-item label="头像" prop="logo">
<bg-upload-image v-model="systemAccountFormRef.logo" :showTips="true" :limit="1" :fileSize="500" :fileSizeUnit="'KB'" listType="picture-card" :accept="['.jpg','.jpeg','.png']" customTips="请选择图片上传:大小120 * 120像素支持jpg、png等格式,图片需小于500KB"></bg-upload-image>
</el-form-item>
<el-form-item label="账号" prop="account">
<el-input v-model="systemAccountFormRef.account" />
</el-form-item>
<el-form-item label="手机号" prop="phone">
<el-input v-model="systemAccountFormRef.phone" />
</el-form-item>
<el-form-item label="密码" prop="password">
<el-input type="password" v-model="systemAccountFormRef.password" />
</el-form-item>
<el-form-item label="确认密码" prop="confirm_password">
<el-input type="password" v-model="systemAccountFormRef.confirm_password" />
</el-form-item>
<el-form-item label="是否启用" prop="is_use">
<bg-switch :labels="['否','是']" :values="[0,1]" v-model="systemAccountFormRef.is_use"></bg-switch>
</el-form-item>
</el-form>
</template>
<script setup>
import { reactive, ref, onMounted } from 'vue'
const systemAccountFormRef = reactive({
org: '',
role: '',
logo: '',
account: '',
phone: '',
password: '',
confirm_password: '',
is_use: 1,
})
const validatePass = (rule, value, callback) => {
if (value !== systemAccountFormRef.password) {
callback(new Error("密码输入不一致"))
} else {
callback()
}
}
const systemAccountFormRules = reactive({
org: [
{ required: true, message: '请选择组织', trigger: 'blur' },
],
role: [
{ required: true, message: '请选择角色', trigger: 'blur' },
],
account: [
{ required: true, message: '请输入账号', trigger: 'blur' },
],
phone: [
{ required: true, message: '请输入手机号', trigger: 'blur' },
],
password: [
{ required: true, message: '请输入密码', trigger: 'blur' },
],
confirm_password: [
{ required: true, message: '请确认密码', trigger: 'blur' },
{ validator: validatePass, trigger: 'blur' }
],
})
const platformAccountRef = ref(null)
const emit = defineEmits(['action'])
const submitForm = async () => {
if (!platformAccountRef) return
await platformAccountRef.value.validate((valid, fields) => {
if (valid) {
emit('action', systemAccountFormRef)
} else {
emit('action',null)
}
})
}
const clearForm = () => {
if (!platformAccountRef) return
platformAccountRef.value.resetFields()
}
const setForm = (data) => {
systemAccountFormRef.value = Object.assign(systemAccountFormRef, data);
}
onMounted(() => {
})
defineExpose({ submitForm, clearForm, setForm })
</script>
\ No newline at end of file
<template>
<el-form
:label-position="'right'"
label-width="120px"
:model="contactForm"
:rules="contactFormRules"
ref="contactRef"
style="max-width: 66%"
>
<el-form-item label="联系人姓名" prop="name">
<el-input v-model="contactForm.name" />
</el-form-item>
<el-form-item label="证件类型" prop="certificate_type">
<el-input v-model="contactForm.certificate_type" />
</el-form-item>
<el-form-item label="证件号" prop="certificate_account">
<el-input v-model="contactForm.certificate_account" />
</el-form-item>
<el-form-item label="联系人邮箱">
<el-input v-model="contactForm.email"/>
</el-form-item>
<el-form-item label="备注">
<el-input type="textarea" :rows="3" v-model="contactForm.remark" />
</el-form-item>
</el-form>
</template>
<script setup>
import { reactive, ref, onMounted } from 'vue'
const contactForm = reactive({
name: '',
certificate_type: '',
certificate_account: '',
email: '',
remark: '',
})
const contactFormRules = reactive({
})
const contactRef = ref(null)
const emit = defineEmits(['action'])
const submitForm = async () => {
if (!contactRef) return
await contactRef.value.validate((valid, fields) => {
if (valid) {
emit('action', contactForm)
} else {
emit('action',null)
}
})
}
const clearForm = () => {
if (!contactRef) return
contactRef.value.resetFields()
}
const setForm = (data) => {
contactForm.value = Object.assign(contactForm, data);
}
onMounted(() => {
})
defineExpose({ submitForm, clearForm, setForm })
</script>
\ No newline at end of file
This diff is collapsed.
......@@ -10,29 +10,31 @@
<div class="page_content apaas_scroll">
<div class="info_row">
<div class="title">
<div><span class="icon_box"></span> 基础信息</div>
<div><span class="icon_box"></span> 账号信息</div>
<div class="dashed_line">
</div>
</div>
<div class="info_content">
<div class="img_box">
<img src="/src/assets/imgs/home_ic_user.png" style="height: 96px;width: 96px;border-radius: 99px" alt="">
<img v-if="logo" :src="logo" style="height: 96px;width: 96px;border-radius: 99px" alt="">
<img v-else src="/src/assets/imgs/home_ic_user.png" style="height: 96px;width: 96px;border-radius: 99px" alt="">
</div>
<div class="info_box">
<bg-info :data="baseInfo"></bg-info>
<bg-info :data="accountInfo"></bg-info>
</div>
</div>
</div>
<div>
<div class="title">
<div><span class="icon_box"></span> 基础信息</div>
<div><span class="icon_box"></span> 个人信息</div>
<div class="dashed_line">
</div>
</div>
<div class="info_content">
<div class="img_box"></div>
<div class="info_box">
<bg-info :data="contactInfo"></bg-info>
<bg-info v-if="accountType === 2" :data="personInfo"></bg-info>
<bg-info v-if="accountType === 3" :data="personInfo2"></bg-info>
</div>
</div>
</div>
......@@ -44,103 +46,145 @@
import { reactive, toRefs, ref, } from '@vue/reactivity'
import { getCurrentInstance } from 'vue'
import { computed, onBeforeMount } from '@vue/runtime-core'
import { useRouter } from 'vue-router';
import { useRoute } from 'vue-router';
const baseInfo = reactive(
const { proxy } = getCurrentInstance()
const { $axios,$message } = proxy
const route = useRoute();
const accountInfo = reactive(
[
{
name: "所属机构",
value: "某某省/某某市/大数据局",
nameWidth: 112
name: "手机号",
value: "",
nameWidth: 130
},
{
name: "业务系统编码",
value: "00000001",
nameWidth: 112
name: "账号",
value: "",
nameWidth: 130
},
{
name: "业务系统名称",
value: "大数据处理系统",
nameWidth: 112
name: "角色",
value: "",
nameWidth: 130
},
{
name: "账号",
value: "admin001",
nameWidth: 112
name: "所属组织",
value: "",
nameWidth: 130
},
{
name: "AppID",
value: "dasjkjjk",
nameWidth: 112
name: "创建人",
value: "",
nameWidth: 130
},
{
name: "AppSecret",
value: "asda*******************jhjh",
nameWidth: 112
name: "创建账号",
value: "",
nameWidth: 130
},
{
name: "创建人",
value: "admin(机构管理员)",
nameWidth: 112
name: "最后编辑时间",
value: "",
nameWidth: 130
},
{
name: "创建时间",
value: "2022-01-01 10:10:10",
nameWidth: 112
value: "",
nameWidth: 130
},
]
)
const personInfo = reactive(
[{
name: "姓名",
value: "",
nameWidth: 130
},
{
name: "是否启用",
value: "",
nameWidth: 112
name: "邮箱",
value: "",
nameWidth: 130
},
{
name: "开发厂商名单",
value: "某某大数据开发商",
nameWidth: 112
name: "证据类型",
value: "",
nameWidth: 130
},
{
name: "访问地址",
value: "http://www.bigdata.com",
full: true,
nameWidth: 112
name: "身份证号",
value: "",
nameWidth: 130
},
{
name: "业务系统描述",
value: "系统描述系统描述系统描述系统描述系统描述系统描述系统描述系统描述系统描述系统描述系统描述系统描述系统描述系统描述系统描述系统描述",
name: "备注",
value: "",
full: true,
nameWidth: 112
nameWidth: 130
},
]
)
])
const contactInfo = reactive(
const personInfo2 = reactive(
[{
name: "联系人姓名",
value: "xxx",
nameWidth: 112
},
{
name: "联系人手机号",
value: "15627365265",
nameWidth: 112
name: "姓名",
value: "",
nameWidth: 130
},
{
name: "联系人邮箱",
value: "http://www.bigdata@163.com",
full: true,
nameWidth: 112
name: "邮箱",
value: "",
nameWidth: 130
},
{
name: "备注",
value: "系统描述系统描述系统描述系统描述系统描述系统描述系统描述系统描述系统描述系统描述系统描述系统描述系统描述系统描述系统描述系统描述",
value: "",
full: true,
nameWidth: 112
nameWidth: 130
},
]
)
])
const logo = ref('')
const accountType = ref(2); //1.业务系统账号 2.组织管理员账号 3.平台用户账号
const getDetail = () => {
$axios.get(`/apaas/system/v5/org/user/${route.query.id}`)
.then((res) => {
if (res.data.code == 200) {
const detail = res.data.data;
accountInfo[0].value = detail.contact_phone;
accountInfo[1].value = detail.system_account;
accountInfo[2].value = detail.system_role && detail.system_role.length > 0 ? detail.system_role.join('') : '';
accountInfo[3].value = detail.organization;
accountInfo[4].value = detail.created_by;
accountInfo[5].value = detail.created_by_account;
accountInfo[6].value = detail.updated_time;
accountInfo[7].value = detail.created_time;
personInfo[0].value = detail.contact_name;
personInfo[1].value = detail.contact_email;
personInfo[2].value = detail.document_type === 1 ? '身份证' : '';
personInfo[3].value = detail.document_number;
personInfo[4].value = detail.remark;
personInfo2[0].value = detail.contact_name;
personInfo2[1].value = detail.contact_email;
personInfo2[2].value = detail.remark;
logo.value = detail.logo;
accountType.value = detail.is_admin;
}else {
$message.error(res.data.data)
}
})
}
onBeforeMount(() => {
if(route.query.id) {
getDetail()
}
})
</script>
......
......@@ -5,11 +5,11 @@
<el-breadcrumb separator="/">
<el-breadcrumb-item> 系统管理 </el-breadcrumb-item>
<el-breadcrumb-item to="/system/role"> 角色管理 </el-breadcrumb-item>
<el-breadcrumb-item> 新建 </el-breadcrumb-item>
<el-breadcrumb-item> {{route.query.id ? "编辑" : "新建"}} </el-breadcrumb-item>
</el-breadcrumb>
</div>
<div class="main_container">
<div class="top_form">
<div class="top_form bg-scroll">
<el-form
ref="form"
:rules="rules"
......@@ -95,7 +95,7 @@ const roleState = reactive({
data_purview: 3,
state: 1,
permission_arr: [],
},
}, // 表单项
rules: {
role_name: [
{ required: true, message: "请输入角色名称", trigger: "blur" },
......@@ -112,13 +112,13 @@ const roleState = reactive({
permission_arr: [
{ required: true, type: "array", validator: checkMenuLength, trigger: "change" }
]
},
}, // 表单校验规则
defaultProps: {
name: 'menu_name',
value: 'id',
children: 'Child',
},
permissionData: [],
}, // 菜单框默认配置
permissionData: [], // 菜单数据
})
const getMenuTree = () => {
axios
......@@ -130,22 +130,37 @@ const getMenuTree = () => {
ElMessage.error(res.data.data)
}
})
}
} // 获取菜单数据
const changeMenu = (val) => {
roleState.formData.permission_arr = val
}
} // 修改选中的菜单
const getRoleDetail = () => {
axios
.get(`/apaas/system/v5/role/detail/${route.query.id}`)
.then((res) => {
if (res.data.code == 200) {
console.log(res.data.data)
let { role_name, role_desc, data_purview, state, menus } = res.data.data
let permission_arr = []
if (menus && menus.length > 0) {
menus.forEach(e => {
permission_arr.push(e.id)
})
}
roleState.formData = {
role_name,
role_desc,
data_purview,
state,
permission_arr:[...permission_arr]
}
console.log(roleState.formData.permission_arr)
}else {
ElMessage.error(res.data.data)
}
})
}
} // 获取角色详情
const saveRole = () => {
roleState.form.validate(valid => {
......@@ -169,7 +184,7 @@ const saveRole = () => {
}
})
}else { // 编辑
params.id = route.query.id
params.id = +route.query.id
axios
.post(`/apaas/system/v5/role/update`,params)
.then((res) => {
......@@ -183,10 +198,12 @@ const saveRole = () => {
}
}
})
}
} // 新增或编辑角色的保存
onBeforeMount(() => {
getMenuTree()
if (route.query.id) {
// 有id表示是编辑,请求详情,回显
getRoleDetail()
}
})
......
This diff is collapsed.
......@@ -180,7 +180,7 @@ var adminMenu = [
dict_group_id: "09938937-3db9-47de-b967-7777ea4ebb2d",
menuType: 2, //system:64c156e0-bfff-4bfc-a63a-56effe130a25:apaas后管,能力注册页等 font:2cb4f767-fad7-44f2-afa3-f055e15dd2b6:apaas前台页 manager:09938937-3db9-47de-b967-7777ea4ebb2d:apaas管理中心 知识中心:26d3903a-863e-4efc-b53e-0fb8772ddaa4
show: false,
path: "/system/organization/system-user",
path: "/system/organization/org-user",
},
{
menuName: "用户详情",
......
......@@ -24,17 +24,17 @@
resolved "https://registry.npmmirror.com/@element-plus/icons-vue/-/icons-vue-2.0.6.tgz"
integrity sha512-lPpG8hYkjL/Z97DH5Ei6w6o22Z4YdNglWCNYOPcB33JCF2A4wye6HFgSI7hEt9zdLyxlSpiqtgf9XcYU+m5mew==
"@floating-ui/core@^0.7.3":
version "0.7.3"
resolved "https://registry.npmmirror.com/@floating-ui/core/-/core-0.7.3.tgz"
integrity sha512-buc8BXHmG9l82+OQXOFU3Kr2XQx9ys01U/Q9HMIrZ300iLc8HLMgh7dcCqgYzAzf4BkoQvDcXf5Y+CuEZ5JBYg==
"@floating-ui/core@^1.0.1":
version "1.0.1"
resolved "https://mirrors.cloud.tencent.com/npm/@floating-ui%2fcore/-/core-1.0.1.tgz#00e64d74e911602c8533957af0cce5af6b2e93c8"
integrity sha512-bO37brCPfteXQfFY0DyNDGB3+IMe4j150KFQcgJ5aBP295p9nBGeHEs/p0czrRbtlHq4Px/yoPXO/+dOCcF4uA==
"@floating-ui/dom@^0.5.4":
version "0.5.4"
resolved "https://registry.npmmirror.com/@floating-ui/dom/-/dom-0.5.4.tgz"
integrity sha512-419BMceRLq0RrmTSDxn8hf9R3VCJv2K9PUfugh5JyEFmdjzDo+e8U5EdR8nzKq8Yj1htzLm3b6eQEEam3/rrtg==
"@floating-ui/dom@^1.0.1":
version "1.0.4"
resolved "https://mirrors.cloud.tencent.com/npm/@floating-ui%2fdom/-/dom-1.0.4.tgz#cc0f2a03db7193b1b932b90d09c5c81235682a60"
integrity sha512-maYJRv+sAXTy4K9mzdv0JPyNW5YPVHrqtY90tEdI6XNpuLOP26Ci2pfwPsKBA/Wh4Z3FX5sUrtUFTdMYj9v+ug==
dependencies:
"@floating-ui/core" "^0.7.3"
"@floating-ui/core" "^1.0.1"
"@intlify/core-base@9.1.10":
version "9.1.10"
......@@ -119,10 +119,10 @@
resolved "https://registry.npmmirror.com/@types/lodash/-/lodash-4.14.182.tgz"
integrity sha512-/THyiqyQAP9AfARo4pF+aCGcyiQ94tX/Is2I7HofNRqoYLgN1PBoOWu2/zTA5zMxzP5EFutMtWtGAFRKUe961Q==
"@types/web-bluetooth@^0.0.14":
version "0.0.14"
resolved "https://registry.npmmirror.com/@types/web-bluetooth/-/web-bluetooth-0.0.14.tgz"
integrity sha512-5d2RhCard1nQUC3aHcq/gHzWYO6K0WJmAbjO7mQJgCQKtZpgXxv1rOM6O/dBDhDYYVutk1sciOgNSe+5YyfM8A==
"@types/web-bluetooth@^0.0.16":
version "0.0.16"
resolved "https://mirrors.cloud.tencent.com/npm/@types%2fweb-bluetooth/-/web-bluetooth-0.0.16.tgz#1d12873a8e49567371f2a75fe3e7f7edca6662d8"
integrity sha512-oh8q2Zc32S6gd/j50GowEjKLoOVOwHP/bWVjKJInBwQqdOYMdPrf1oVlelTlyfFK3CKxL1uahMDAr+vy8T7yMQ==
"@uppy/companion-client@^2.2.2":
version "2.2.2"
......@@ -357,25 +357,25 @@
resolved "https://registry.npmmirror.com/@vue/shared/-/shared-3.2.38.tgz#e823f0cb2e85b6bf43430c0d6811b1441c300f3c"
integrity sha512-dTyhTIRmGXBjxJE+skC8tTWCGLCVc4wQgRRLt8+O9p5ewBAjoBwtCAkLPrtToSr1xltoe3st21Pv953aOZ7alg==
"@vueuse/core@^8.7.5":
version "8.9.4"
resolved "https://registry.npmmirror.com/@vueuse/core/-/core-8.9.4.tgz"
integrity sha512-B/Mdj9TK1peFyWaPof+Zf/mP9XuGAngaJZBwPaXBvU3aCTZlx3ltlrFFFyMV4iGBwsjSCeUCgZrtkEj9dS2Y3Q==
"@vueuse/core@^9.1.0":
version "9.4.0"
resolved "https://mirrors.cloud.tencent.com/npm/@vueuse%2fcore/-/core-9.4.0.tgz#afb30f9494b0954e51a489526566b14f1e2c5fb3"
integrity sha512-JzgenGj1ZF2BHOen5rsFiAyyI9sXAv7aKhNLlm9b7SwYQeKTcxTWdhudonURCSP3Egl9NQaRBzes2lv/1JUt/Q==
dependencies:
"@types/web-bluetooth" "^0.0.14"
"@vueuse/metadata" "8.9.4"
"@vueuse/shared" "8.9.4"
"@types/web-bluetooth" "^0.0.16"
"@vueuse/metadata" "9.4.0"
"@vueuse/shared" "9.4.0"
vue-demi "*"
"@vueuse/metadata@8.9.4":
version "8.9.4"
resolved "https://registry.npmmirror.com/@vueuse/metadata/-/metadata-8.9.4.tgz"
integrity sha512-IwSfzH80bnJMzqhaapqJl9JRIiyQU0zsRGEgnxN6jhq7992cPUJIRfV+JHRIZXjYqbwt07E1gTEp0R0zPJ1aqw==
"@vueuse/metadata@9.4.0":
version "9.4.0"
resolved "https://mirrors.cloud.tencent.com/npm/@vueuse%2fmetadata/-/metadata-9.4.0.tgz#5c8eb105a8ad9eb7b47f78a226ff993560d0bd7f"
integrity sha512-7GKMdGAsJyQJl35MYOz/RDpP0FxuiZBRDSN79QIPbdqYx4Sd0sVTnIC68KJ6Oln0t0SouvSUMvRHuno216Ud2Q==
"@vueuse/shared@8.9.4":
version "8.9.4"
resolved "https://registry.npmmirror.com/@vueuse/shared/-/shared-8.9.4.tgz"
integrity sha512-wt+T30c4K6dGRMVqPddexEVLa28YwxW5OFIPmzUHICjphfAuBFTTdDoyqREZNDOFJZ44ARH1WWQNCUK8koJ+Ag==
"@vueuse/shared@9.4.0":
version "9.4.0"
resolved "https://mirrors.cloud.tencent.com/npm/@vueuse%2fshared/-/shared-9.4.0.tgz#634022fe42b3d5ece1d81d749724966f5071c8c3"
integrity sha512-fTuem51KwMCnqUKkI8B57qAIMcFovtGgsCtAeqxIzH3i6nE9VYge+gVfneNHAAy7lj8twbkNfqQSygOPJTm4tQ==
dependencies:
vue-demi "*"
......@@ -578,18 +578,18 @@ echarts@^5.3.3:
tslib "2.3.0"
zrender "5.3.2"
element-plus@^2.2.9:
version "2.2.9"
resolved "https://registry.npmmirror.com/element-plus/-/element-plus-2.2.9.tgz"
integrity sha512-jYbL0JkCdv95rkT6trZJjCAizLPySa0qcd2cgq+57SKQnCZAcNDDq4GbTuFRnNavdoeCJnuM3HIficTIUpsMOQ==
element-plus@^2.2.19:
version "2.2.19"
resolved "https://mirrors.cloud.tencent.com/npm/element-plus/-/element-plus-2.2.19.tgz#c11cb84b35b7698b2f5fa7ec0fd98034f6861a9e"
integrity sha512-uN0gt9lUus/IHzu5J6vkbYoYJgUtU05osdtFv9RO27bHKOG5GN7dH6uA3OKfkQQ6R2sV8ZxY1rc9PH1X8Dgrow==
dependencies:
"@ctrl/tinycolor" "^3.4.1"
"@element-plus/icons-vue" "^2.0.6"
"@floating-ui/dom" "^0.5.4"
"@floating-ui/dom" "^1.0.1"
"@popperjs/core" "npm:@sxzz/popperjs-es@^2.11.7"
"@types/lodash" "^4.14.182"
"@types/lodash-es" "^4.17.6"
"@vueuse/core" "^8.7.5"
"@vueuse/core" "^9.1.0"
async-validator "^4.2.5"
dayjs "^1.11.3"
escape-html "^1.0.3"
......@@ -597,7 +597,7 @@ element-plus@^2.2.9:
lodash-es "^4.17.21"
lodash-unified "^1.0.2"
memoize-one "^6.0.0"
normalize-wheel-es "^1.1.2"
normalize-wheel-es "^1.2.0"
es5-ext@^0.10.35, es5-ext@^0.10.50, es5-ext@~0.10.14:
version "0.10.62"
......@@ -984,9 +984,9 @@ normalize-path@^3.0.0, normalize-path@~3.0.0:
resolved "https://registry.npmmirror.com/normalize-path/-/normalize-path-3.0.0.tgz"
integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==
normalize-wheel-es@^1.1.2:
normalize-wheel-es@^1.2.0:
version "1.2.0"
resolved "https://registry.npmmirror.com/normalize-wheel-es/-/normalize-wheel-es-1.2.0.tgz"
resolved "https://mirrors.cloud.tencent.com/npm/normalize-wheel-es/-/normalize-wheel-es-1.2.0.tgz#0fa2593d619f7245a541652619105ab076acf09e"
integrity sha512-Wj7+EJQ8mSuXr2iWfnujrimU35R2W4FAErEyTmJoJ7ucwTn2hOUSsRehMb5RSYkxXGTM7Y9QpvPmp++w5ftoJw==
path-parse@^1.0.7:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment