Commit c68a4871 authored by 张俊's avatar 张俊
parents 4139b7f0 8ff082a3
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
> >
<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-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.secret">{{secret(item.value)}}</span>
<span v-else-if="item.idCard">{{idCardShow ? item.value : idcard(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-if="item.callback" @click.stop="item.callback && item.callback()" class="can_click_text">{{item.value}}</span>
<span v-else>{{ item.value }}</span> <span v-else>{{ item.value }}</span>
</span> </span>
...@@ -32,6 +33,7 @@ ...@@ -32,6 +33,7 @@
复制 复制
</a> </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 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 v-if="item.idCard" @click="idCardShow = !idCardShow" class="copy-btn" style="font-size: 14px; color: #a9b1c7;cursor: pointer;" icon="#bg-ic-eye"></bg-icon>
<bg-icon <bg-icon
class="copy-btn" class="copy-btn"
style="font-size: 14px; color: #a9b1c7;cursor: pointer;" style="font-size: 14px; color: #a9b1c7;cursor: pointer;"
...@@ -74,6 +76,7 @@ export default { ...@@ -74,6 +76,7 @@ export default {
data() { data() {
return { return {
show: false, show: false,
idCardShow: false,
stateColor: { stateColor: {
success: '#48ad97', success: '#48ad97',
danger: '#d75138', danger: '#d75138',
...@@ -146,9 +149,17 @@ export default { ...@@ -146,9 +149,17 @@ export default {
const str1 = value.substring(0,3); const str1 = value.substring(0,3);
const str2 = value.substring(value.length-6,value.length); const str2 = value.substring(value.length-6,value.length);
const passwordStr = value.substring(3,value.length-6).split('').map(item => '*').join(''); const passwordStr = value.substring(3,value.length-6).split('').map(item => '*').join('');
console.log(8888888)
console.log(passwordStr)
return str1+passwordStr+str2 return str1+passwordStr+str2
},
idcard(value) {
const len = value.length;
const str1 = value.substring(0,3);
const str2 = value.substring(value.length-4,value.length);
const passwordStr = value.substring(3,value.length-4).split('').map(item => '*').join('');
return str1+passwordStr+str2
},
viewIdCard() {
} }
}, },
}; };
......
...@@ -23,14 +23,25 @@ ...@@ -23,14 +23,25 @@
</template> </template>
<script setup> <script setup>
import { reactive, ref, onMounted } from 'vue' import { reactive, ref, onMounted,getCurrentInstance } from 'vue'
const { proxy } = getCurrentInstance()
const { $axios,$message } = proxy
const contactForm = reactive({ const contactForm = reactive({
contact_name: '', contact_name: '',
contact_phone: '', contact_phone: '',
contact_email: '', contact_email: '',
remark: '', remark: '',
}) })
const props = defineProps({
formType: {
type: Boolean,
default: false, //false 新建 true 编辑
},
id: {
type: String,
default: '',
}
});
const checkPhone = (rule, value, callback) => { const checkPhone = (rule, value, callback) => {
var phone_ruler = /^(?:(?:\+|00)86)?1[3-9]\d{9}$/; var phone_ruler = /^(?:(?:\+|00)86)?1[3-9]\d{9}$/;
...@@ -43,6 +54,24 @@ const checkPhone = (rule, value, callback) => { ...@@ -43,6 +54,24 @@ const checkPhone = (rule, value, 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 contactFormRules = reactive({ const contactFormRules = reactive({
contact_name: [ contact_name: [
{ required: true, message: '请输入联系人姓名', trigger: 'blur' }, { required: true, message: '请输入联系人姓名', trigger: 'blur' },
...@@ -50,6 +79,7 @@ const contactFormRules = reactive({ ...@@ -50,6 +79,7 @@ const contactFormRules = reactive({
contact_phone: [ contact_phone: [
{ required: true, message: '请输入联系人手机号', trigger: 'blur' }, { required: true, message: '请输入联系人手机号', trigger: 'blur' },
{ validator: checkPhone, trigger: 'blur' }, { validator: checkPhone, trigger: 'blur' },
{ validator: checkPhoneRepet, trigger: 'blur' }
], ],
contact_email: [ contact_email: [
{ type: 'email', message: '请输入正确的邮箱', trigger: 'blur' }, { type: 'email', message: '请输入正确的邮箱', trigger: 'blur' },
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
</div> </div>
<div class="content_main"> <div class="content_main">
<systemForm v-show="step === 1" ref="systemFormRef" :form-type="route.query.id ? true : false" :id="route.query.id" @action="getSystemFormData"></systemForm> <systemForm v-show="step === 1" ref="systemFormRef" :form-type="route.query.id ? true : false" :id="route.query.id" @action="getSystemFormData"></systemForm>
<contactForm v-show="step === 2" ref="contactFormRef" @action="getContactFormData"></contactForm> <contactForm v-show="step === 2" ref="contactFormRef" :id="route.query.id" @action="getContactFormData"></contactForm>
<div class="process_end" v-show="step === 3"> <div class="process_end" v-show="step === 3">
<div> <div>
<div> <div>
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<el-form-item label="AppSecret" prop="appsecret" v-if="formType"> <el-form-item label="AppSecret" prop="appsecret" v-if="formType">
<el-input v-model="systemForm.appsecret" :disabled="formType" style="width: 80%;"/> <el-input v-model="systemForm.appsecret" :disabled="formType" style="width: 80%;"/>
<span class="pl-1"><el-button type="primary" @click="copyText(systemForm.appsecret)">复制</el-button></span> <span class="pl-1"><el-button type="primary" @click="copyText(systemForm.appsecret)">复制</el-button></span>
<span class="pl-1"><el-button type="primary">重置</el-button></span> <span class="pl-1"><el-button type="primary" @click="resetSecret">重置</el-button></span>
</el-form-item> </el-form-item>
<el-form-item label="系统LOGO" prop="logo"> <el-form-item label="系统LOGO" prop="logo">
<bg-upload-image v-model="systemForm.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> <bg-upload-image v-model="systemForm.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>
...@@ -233,6 +233,17 @@ const copyText = (data) => { ...@@ -233,6 +233,17 @@ const copyText = (data) => {
} }
); );
} }
const resetSecret = () => {
$axios.get(`/apaas/system/v5/user/reset/secret/${props.id}`)
.then((res) => {
if (res.data.code == 200) {
systemForm.appsecret = res.data.data;
$message.success("重置成功!")
}else {
$message.error(res.data.data)
}
})
}
const getRoleList = () => { const getRoleList = () => {
$axios.get(`/apaas/system/v5/org/select/role?is_admin=1`) $axios.get(`/apaas/system/v5/org/select/role?is_admin=1`)
.then((res) => { .then((res) => {
......
...@@ -155,11 +155,11 @@ const baseInfo = reactive( ...@@ -155,11 +155,11 @@ const baseInfo = reactive(
baseInfo[3].value = detail.system_account; baseInfo[3].value = detail.system_account;
baseInfo[4].value = detail.app_id; baseInfo[4].value = detail.app_id;
baseInfo[5].value = detail.app_secret; baseInfo[5].value = detail.app_secret;
baseInfo[6].value = detail.created_by; baseInfo[6].value = detail.created_by+"("+(detail.created_user_role ? detail.created_user_role.join('') : '')+")";
baseInfo[7].value = detail.created_time; baseInfo[7].value = detail.created_time;
baseInfo[8].value = detail.state === 1 ? '' : ''; baseInfo[8].value = detail.state === 1 ? '' : '';
baseInfo[8].state = detail.state === 1 ? 'success' : 'default'; baseInfo[8].state = detail.state === 1 ? 'success' : 'default';
baseInfo[9].value = detail.develop_id; baseInfo[9].value = detail.develop_name;
baseInfo[10].value = detail.access_address; baseInfo[10].value = detail.access_address;
baseInfo[11].value = detail.business_desc; baseInfo[11].value = detail.business_desc;
......
...@@ -237,7 +237,7 @@ import CryptoJS from "crypto-js"; ...@@ -237,7 +237,7 @@ import CryptoJS from "crypto-js";
{ {
label: "创建时间", label: "创建时间",
prop: "created_time", prop: "created_time",
width: 150 width: 160
}, },
{ {
label: "是否启用", label: "是否启用",
...@@ -524,6 +524,8 @@ import CryptoJS from "crypto-js"; ...@@ -524,6 +524,8 @@ import CryptoJS from "crypto-js";
if (!passwordRef) return if (!passwordRef) return
passwordRef.value.resetFields() passwordRef.value.resetFields()
editFlag.value = false; editFlag.value = false;
password_eye.value = false;
confirm_eye.value = false;
} }
const editConfirm = () => { const editConfirm = () => {
if (!passwordRef) return if (!passwordRef) return
......
...@@ -8,14 +8,13 @@ ...@@ -8,14 +8,13 @@
style="max-width: 80%" style="max-width: 80%"
> >
<el-form-item label="上级目录" prop="p_organization_id" v-if="formType === 'create'"> <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 <el-tree-select
v-model="directoryForm.p_organization_id" v-model="directoryForm.p_organization_id"
:data="orgData" :data="orgData"
:props="treeProps" :props="treeProps"
:render-aftertreeProps-expand="false" :render-after-expand="false"
:filter-node-method="filterNode"
:check-strictly="true" :check-strictly="true"
:disabled="directoryForm.level"
style="width: 80%;" /> style="width: 80%;" />
<el-form-item label="" style="padding-left: 16px"> <el-form-item label="" style="padding-left: 16px">
<el-checkbox v-model="directoryForm.level" @change="isTop" label="顶级"/> <el-checkbox v-model="directoryForm.level" @change="isTop" label="顶级"/>
...@@ -72,7 +71,7 @@ import { reactive, ref, onMounted, onBeforeMount, getCurrentInstance, nextTick } ...@@ -72,7 +71,7 @@ import { reactive, ref, onMounted, onBeforeMount, getCurrentInstance, nextTick }
} }
const setForm = (data) => { const setForm = (data) => {
directoryForm.value = Object.assign(directoryForm, data); Object.assign(directoryForm, data);
} }
const orgData = ref([]) const orgData = ref([])
...@@ -80,7 +79,7 @@ import { reactive, ref, onMounted, onBeforeMount, getCurrentInstance, nextTick } ...@@ -80,7 +79,7 @@ import { reactive, ref, onMounted, onBeforeMount, getCurrentInstance, nextTick }
label: 'name', label: 'name',
children: 'Child', children: 'Child',
value: 'organization_id', value: 'organization_id',
disabled: 'disabled' // disabled: 'disabled'
} }
const getOrgTree = () => { const getOrgTree = () => {
$axios.get(`/apaas/system/v5/org/tree`) $axios.get(`/apaas/system/v5/org/tree`)
...@@ -89,6 +88,7 @@ import { reactive, ref, onMounted, onBeforeMount, getCurrentInstance, nextTick } ...@@ -89,6 +88,7 @@ import { reactive, ref, onMounted, onBeforeMount, getCurrentInstance, nextTick }
const orgDataTemp = res.data.data || [] const orgDataTemp = res.data.data || []
orgDataTemp.shift() orgDataTemp.shift()
orgData.value = filterOrg(orgDataTemp); orgData.value = filterOrg(orgDataTemp);
}else { }else {
$message.error(res.data.data) $message.error(res.data.data)
} }
...@@ -99,7 +99,6 @@ import { reactive, ref, onMounted, onBeforeMount, getCurrentInstance, nextTick } ...@@ -99,7 +99,6 @@ import { reactive, ref, onMounted, onBeforeMount, getCurrentInstance, nextTick }
if(data.length > 0) { if(data.length > 0) {
data.forEach(item => { data.forEach(item => {
item.disabled = item.data_type === 0 ? false : true; item.disabled = item.data_type === 0 ? false : true;
if(item.Child){ if(item.Child){
filterOrg(item.Child) filterOrg(item.Child)
}else { }else {
...@@ -110,10 +109,6 @@ import { reactive, ref, onMounted, onBeforeMount, getCurrentInstance, nextTick } ...@@ -110,10 +109,6 @@ import { reactive, ref, onMounted, onBeforeMount, getCurrentInstance, nextTick }
return data; return data;
} }
const filterNode = (value, data) => {
return data.data_type === 0
}
const isTop = (data) => { const isTop = (data) => {
directoryForm.p_organization_id = data ? ' ' : ''; //空格绕过表单非空校验 directoryForm.p_organization_id = data ? ' ' : ''; //空格绕过表单非空校验
} }
......
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
v-model="dialogDirectory" v-model="dialogDirectory"
:title="action === 'create' ? '新增目录' : '编辑目录' " :title="action === 'create' ? '新增目录' : '编辑目录' "
width="758px" width="758px"
:before-close="handleCloseDirectoryDirectory" :before-close="handleCloseDirectory"
destroy-on-close destroy-on-close
> >
<div class="dialog_form"> <div class="dialog_form">
...@@ -412,6 +412,7 @@ import { downloadFileFormatNew } from '@/services/helper' ...@@ -412,6 +412,7 @@ import { downloadFileFormatNew } from '@/services/helper'
password: '', password: '',
confirm_password: '', confirm_password: '',
}) })
const search = ref('')
const validatePass = (rule, value, callback) => { const validatePass = (rule, value, callback) => {
if (value !== passwordForm.password) { if (value !== passwordForm.password) {
callback(new Error("密码输入不一致")) callback(new Error("密码输入不一致"))
...@@ -796,7 +797,7 @@ import { downloadFileFormatNew } from '@/services/helper' ...@@ -796,7 +797,7 @@ import { downloadFileFormatNew } from '@/services/helper'
} }
const editAccount = (data) => { const editAccount = (data) => {
if(selectTreeDataType === 1) { if(selectTreeDataType.value === 1) {
router.push({ router.push({
path: "/system/organization/org-user", path: "/system/organization/org-user",
query: { query: {
......
...@@ -8,7 +8,14 @@ ...@@ -8,7 +8,14 @@
style="max-width: 80%" style="max-width: 80%"
> >
<el-form-item label="上级目录" prop="p_organization_id" v-if="formType === 'create'"> <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-tree-select
v-model="orgForm.p_organization_id"
:data="orgData"
:props="treeProps"
:render-after-expand="false"
:check-strictly="true"
:disabled="orgForm.level"
style="width: 80%;" />
<el-form-item label="" style="padding-left: 16px"> <el-form-item label="" style="padding-left: 16px">
<el-checkbox v-model="orgForm.level" @change="isTop" label="顶级"/> <el-checkbox v-model="orgForm.level" @change="isTop" label="顶级"/>
</el-form-item> </el-form-item>
...@@ -83,7 +90,7 @@ import { reactive, ref, onMounted, onBeforeMount, getCurrentInstance } from 'vue ...@@ -83,7 +90,7 @@ import { reactive, ref, onMounted, onBeforeMount, getCurrentInstance } from 'vue
} }
const setForm = (data) => { const setForm = (data) => {
orgForm.value = Object.assign(orgForm, data); Object.assign(orgForm, data);
} }
const orgData = ref([]) const orgData = ref([])
...@@ -122,11 +129,6 @@ import { reactive, ref, onMounted, onBeforeMount, getCurrentInstance } from 'vue ...@@ -122,11 +129,6 @@ import { reactive, ref, onMounted, onBeforeMount, getCurrentInstance } from 'vue
return data; return data;
} }
const filterNode = (value, data) => {
return data.data_type === 0
}
const isTop = (data) => { const isTop = (data) => {
orgForm.p_organization_id = data ? ' ' : ''; //空格绕过表单非空校验 orgForm.p_organization_id = data ? ' ' : ''; //空格绕过表单非空校验
} }
......
...@@ -53,6 +53,9 @@ const orgPersonFormRules = reactive({ ...@@ -53,6 +53,9 @@ const orgPersonFormRules = reactive({
// { required: true, message: '请输入手机号', trigger: 'blur' }, // { required: true, message: '请输入手机号', trigger: 'blur' },
{ type: 'email',message: '请输入正确的邮箱', trigger: 'blur' } { type: 'email',message: '请输入正确的邮箱', trigger: 'blur' }
], ],
document_number: [
{ pattern: /(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)|(^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}[0-9Xx]$)/, message: '请输入正确的身份证号', trigger: 'blur' }
]
}) })
const orgPersonFormRef = ref(null) const orgPersonFormRef = ref(null)
const emit = defineEmits(['action']) const emit = defineEmits(['action'])
......
...@@ -38,18 +38,19 @@ ...@@ -38,18 +38,19 @@
v-show="actionFlag" v-show="actionFlag"
:style="{ top: acTop, left: acLeft }" :style="{ top: acTop, left: acLeft }"
> >
<!-- 平台用户组织 -->
<div v-if="selectData && selectData.data_type === 2" class="action" @click="treeAction({type: 'directory',action: 'create',target: null})">新建目录</div> <div v-if="selectData && selectData.data_type === 2" class="action" @click="treeAction({type: 'directory',action: 'create',target: null})">新建目录</div>
<div v-if="selectData && selectData.data_type === 2" class="action" @click="treeAction({type: 'org',action: 'create',target: null})" >新建组织</div> <div v-if="selectData && selectData.data_type === 2" class="action" @click="treeAction({type: 'org',action: 'create',target: null})" >新建组织</div>
<!-- 目录 -->
<div v-if="selectData && selectData.data_type === 0" class="action" @click="treeAction({type: 'directory',action: 'create',target: 'local'})">新建本级目录</div> <div v-if="selectData && selectData.data_type === 0" class="action" @click="treeAction({type: 'directory',action: 'create',target: 'local'})">新建本级目录</div>
<div v-if="selectData && selectData.data_type === 0" class="action" @click="treeAction({type: 'directory',action: 'create',target: 'child'})">新建下级目录</div> <div v-if="selectData && selectData.data_type === 0" class="action" @click="treeAction({type: 'directory',action: 'create',target: 'child'})">新建下级目录</div>
<div v-if="selectData && selectData.data_type === 0" class="action" @click="treeAction({type: 'org',action: 'create',target: 'local'})">新建本级组织</div> <div v-if="selectData && selectData.data_type === 0 && selectData.level !== 1" class="action" @click="treeAction({type: 'org',action: 'create',target: 'local'})">新建本级组织</div>
<div v-if="selectData && selectData.data_type === 0" class="action" @click="treeAction({type: 'org',action: 'create',target: 'child'})">新建下级组织</div> <div v-if="selectData && selectData.data_type === 0" class="action" @click="treeAction({type: 'org',action: 'create',target: 'child'})">新建下级组织</div>
<div v-if="selectData && selectData.data_type === 0" class="action" @click="treeAction({type: 'directory',action: 'edit',target: 'local'})">编辑目录</div> <div v-if="selectData && selectData.data_type === 0" class="action" @click="treeAction({type: 'directory',action: 'edit',target: 'local'})">编辑目录</div>
<div v-if="selectData && selectData.data_type === 0" class="action" @click="treeAction({type: 'directory',action: 'delete',target: 'local'})">删除</div> <div v-if="selectData && selectData.data_type === 0" class="action" @click="treeAction({type: 'directory',action: 'delete',target: 'local'})">删除</div>
<div v-if="selectData && selectData.data_type === 0" class="action" @click="treeAction({type: 'directory',action: 'mvup',target: 'local'})">上移</div> <div v-if="selectData && selectData.data_type === 0" class="action" @click="treeAction({type: 'directory',action: 'mvup',target: 'local'})">上移</div>
<div v-if="selectData && selectData.data_type === 0" class="action" @click="treeAction({type: 'directory',action: 'mvdown',target: 'local'})">下移</div> <div v-if="selectData && selectData.data_type === 0" class="action" @click="treeAction({type: 'directory',action: 'mvdown',target: 'local'})">下移</div>
<!-- 组织 -->
<div v-if="selectData && selectData.data_type === 1" class="action" @click="treeAction({type: 'org',action: 'create',target: 'local'})">新建本级组织</div> <div v-if="selectData && selectData.data_type === 1" class="action" @click="treeAction({type: 'org',action: 'create',target: 'local'})">新建本级组织</div>
<div v-if="selectData && selectData.data_type === 1" class="action" @click="treeAction({type: 'org',action: 'edit',target: 'local'})">编辑组织</div> <div v-if="selectData && selectData.data_type === 1" class="action" @click="treeAction({type: 'org',action: 'edit',target: 'local'})">编辑组织</div>
<div v-if="selectData && selectData.data_type === 1" class="action" @click="treeAction({type: 'org',action: 'delete',target: 'local'})">删除</div> <div v-if="selectData && selectData.data_type === 1" class="action" @click="treeAction({type: 'org',action: 'delete',target: 'local'})">删除</div>
...@@ -132,7 +133,7 @@ import { useRouter } from 'vue-router'; ...@@ -132,7 +133,7 @@ import { useRouter } from 'vue-router';
} }
const emit = defineEmits(['action']) const emit = defineEmits(['action','select'])
const handleNodeClick = (node,nodeAttr,treeNode,event) => { const handleNodeClick = (node,nodeAttr,treeNode,event) => {
selectData.value = node; selectData.value = node;
emit('select',selectData); emit('select',selectData);
......
...@@ -116,6 +116,7 @@ const accountInfo = reactive( ...@@ -116,6 +116,7 @@ const accountInfo = reactive(
{ {
name: "身份证号", name: "身份证号",
value: "", value: "",
idCard: true,
nameWidth: 130 nameWidth: 130
}, },
{ {
......
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