Commit 27a9ff96 authored by 张俊's avatar 张俊
parents c5ac0b79 804b6957
...@@ -41,19 +41,19 @@ steps: # 定义流水线执行步骤,这些步骤将顺序执行 ...@@ -41,19 +41,19 @@ steps: # 定义流水线执行步骤,这些步骤将顺序执行
- export NODE_ENV=production - export NODE_ENV=production
- yarn build - yarn build
# - name: s3-cache-build - name: s3-cache-build
# image: registry.cn-qingdao.aliyuncs.com/wod/devops-s3-cache:1.0 image: registry.cn-qingdao.aliyuncs.com/wod/devops-s3-cache:1.0
# network_mode: host network_mode: host
# settings: settings:
# rebuild: true rebuild: true
# hash: package.json hash: package.json
# mount: mount:
# - node_modules - node_modules
# endpoint: http://cache.wodcloud.com endpoint: http://cache.wodcloud.com
# access_key: access_key:
# from_secret: ACCESS_KEY_MINIO from_secret: ACCESS_KEY_MINIO
# secret_key: secret_key:
# from_secret: SECRET_KEY_MINIO from_secret: SECRET_KEY_MINIO
- name: docker - name: docker
image: registry.cn-qingdao.aliyuncs.com/wod/devops-docker:1.0 image: registry.cn-qingdao.aliyuncs.com/wod/devops-docker:1.0
...@@ -65,7 +65,7 @@ steps: # 定义流水线执行步骤,这些步骤将顺序执行 ...@@ -65,7 +65,7 @@ steps: # 定义流水线执行步骤,这些步骤将顺序执行
base: registry.cn-qingdao.aliyuncs.com/wod/nginx:1.19.5 # 基础镜像,根据项目需求进行使用,如果第三方登录改成ui-base base: registry.cn-qingdao.aliyuncs.com/wod/nginx:1.19.5 # 基础镜像,根据项目需求进行使用,如果第三方登录改成ui-base
dockerfile: .beagle/dockerfile dockerfile: .beagle/dockerfile
repo: wod/apaas-system-ui # 生成镜像的 分组/名称 repo: wod/apaas-system-ui # 生成镜像的 分组/名称
version: "5.0.1" # 版本号 version: "5.0.3" # 版本号
channel: alpha # 后缀 example: alpha test fix-alpha fix等 channel: alpha # 后缀 example: alpha test fix-alpha fix等
args: "TARGETOS=linux,TARGETARCH=amd64" # 不同架构的构建参数 args: "TARGETOS=linux,TARGETARCH=amd64" # 不同架构的构建参数
registry: registry.cn-qingdao.aliyuncs.com # 私有仓库地址 registry: registry.cn-qingdao.aliyuncs.com # 私有仓库地址
...@@ -80,7 +80,7 @@ steps: # 定义流水线执行步骤,这些步骤将顺序执行 ...@@ -80,7 +80,7 @@ steps: # 定义流水线执行步骤,这些步骤将顺序执行
namespace: apaas-v5 namespace: apaas-v5
deployment: apaas-manage-ui deployment: apaas-manage-ui
container: apaas-manage-ui container: apaas-manage-ui
image: registry.cn-qingdao.aliyuncs.com/wod/apaas-system-ui:5.0.1-alpha image: registry.cn-qingdao.aliyuncs.com/wod/apaas-system-ui:5.0.3-alpha
environment: environment:
KUBERNETES_SERVER: KUBERNETES_SERVER:
from_secret: KUBERNETES_SERVER from_secret: KUBERNETES_SERVER
...@@ -96,7 +96,7 @@ steps: # 定义流水线执行步骤,这些步骤将顺序执行 ...@@ -96,7 +96,7 @@ steps: # 定义流水线执行步骤,这些步骤将顺序执行
base: registry.cn-qingdao.aliyuncs.com/wod/nginx:1.19.5-arm64 base: registry.cn-qingdao.aliyuncs.com/wod/nginx:1.19.5-arm64
dockerfile: .beagle/dockerfile dockerfile: .beagle/dockerfile
repo: wod/apaas-system-ui repo: wod/apaas-system-ui
version: "5.0.1" version: "5.0.3"
channel: alpha-arm64 channel: alpha-arm64
args: "TARGETOS=linux,TARGETARCH=arm64" args: "TARGETOS=linux,TARGETARCH=arm64"
registry: registry.cn-qingdao.aliyuncs.com registry: registry.cn-qingdao.aliyuncs.com
...@@ -134,8 +134,8 @@ steps: ...@@ -134,8 +134,8 @@ steps:
REGISTRY_PASSWORD: REGISTRY_PASSWORD:
from_secret: REGISTRY_PASSWORD_ALIYUN from_secret: REGISTRY_PASSWORD_ALIYUN
settings: settings:
source: registry.cn-qingdao.aliyuncs.com/wod/apaas-system-ui:5.0.1-alpha source: registry.cn-qingdao.aliyuncs.com/wod/apaas-system-ui:5.0.3-alpha
target: registry.cn-qingdao.aliyuncs.com/wod/apaas-system-ui:5.0.1 target: registry.cn-qingdao.aliyuncs.com/wod/apaas-system-ui:5.0.3
registry: registry.cn-qingdao.aliyuncs.com registry: registry.cn-qingdao.aliyuncs.com
- name: harbor-arm64 - name: harbor-arm64
...@@ -152,8 +152,8 @@ steps: ...@@ -152,8 +152,8 @@ steps:
REGISTRY_PASSWORD: REGISTRY_PASSWORD:
from_secret: REGISTRY_PASSWORD_ALIYUN from_secret: REGISTRY_PASSWORD_ALIYUN
settings: settings:
source: registry.cn-qingdao.aliyuncs.com/wod/apaas-system-ui:5.0.1-alpha-arm64 source: registry.cn-qingdao.aliyuncs.com/wod/apaas-system-ui:5.0.3-alpha-arm64
target: registry.cn-qingdao.aliyuncs.com/wod/apaas-system-ui:5.0.1-arm64 target: registry.cn-qingdao.aliyuncs.com/wod/apaas-system-ui:5.0.3-arm64
registry: registry.cn-qingdao.aliyuncs.com registry: registry.cn-qingdao.aliyuncs.com
##--------------对于需要保密的信息隐藏,减少账户信息的泄密⬇-----------------## ##--------------对于需要保密的信息隐藏,减少账户信息的泄密⬇-----------------##
--- ---
......
...@@ -31,7 +31,10 @@ ...@@ -31,7 +31,10 @@
:class="{current:isCurrent(item.children&&item.children.length?[...getChildrenPath(item.children),item.path]:[item.path])}" :class="{current:isCurrent(item.children&&item.children.length?[...getChildrenPath(item.children),item.path]:[item.path])}"
@click="$router.push(item.path)" @click="$router.push(item.path)"
> >
<span :style="{ paddingLeft: `${deep*2}em` }">{{ item.menuName }}</span> <span :style="{ paddingLeft: item.icon ? `${deep*2 - 1.37}em` :`${deep*2}em` }">
<bg-icon v-if="item.icon" style="color:#7c8292;" :icon="'#'+item.icon"></bg-icon>
{{ item.menuName }}
</span>
</div> </div>
</template> </template>
</li> </li>
......
...@@ -44,6 +44,10 @@ ...@@ -44,6 +44,10 @@
</div> </div>
</template> </template>
</el-upload> </el-upload>
<el-dialog title="图片预览" v-model="dialogVisible" custom-class="bg-upload-image-dialog">
<img style="margin:30px 0;width: 600px;" :src="dialogImageUrl" alt="Preview Image" />
</el-dialog>
</template> </template>
<script> <script>
...@@ -59,7 +63,7 @@ export default { ...@@ -59,7 +63,7 @@ export default {
}, },
action: { action: {
type: String, type: String,
default: "/apaas/common/file/upload", default: "/apaas/common/image/upload",
}, },
autoUpload: { autoUpload: {
type: Boolean, type: Boolean,
...@@ -74,7 +78,7 @@ export default { ...@@ -74,7 +78,7 @@ export default {
}, },
multiple: { multiple: {
type: Boolean, type: Boolean,
default: true, default: false,
}, },
accept: { accept: {
...@@ -100,7 +104,7 @@ export default { ...@@ -100,7 +104,7 @@ export default {
default: "", default: "",
},// 自定义提示内容 },// 自定义提示内容
}, },
emits: ['update:modelValue'], emits: ['update:modelValue',"change"],
computed: { computed: {
acceptTypes() { acceptTypes() {
if (Array.isArray(this.accept)) { if (Array.isArray(this.accept)) {
...@@ -142,6 +146,8 @@ export default { ...@@ -142,6 +146,8 @@ export default {
return { return {
fileList: [], fileList: [],
UploadFilled, UploadFilled,
dialogImageUrl:'',
dialogVisible:false
}; };
}, },
watch: { watch: {
...@@ -154,9 +160,22 @@ export default { ...@@ -154,9 +160,22 @@ export default {
if (newStr !== oldStr) { if (newStr !== oldStr) {
this.fileList = [...this.modelValue]; this.fileList = [...this.modelValue];
} }
this.$nextTick().then(() => {
this.checkLimit(this.modelValue)
});
}, },
}, },
methods: { methods: {
checkLimit(filelist) {
const limit = this.limit
const uploadDom = this.$refs['upload']
const length = uploadDom.$el.children[0].children.length
if (filelist.length === limit) {
uploadDom.$el.children[0].children[length-1].style.display = 'none'
} else {
uploadDom.$el.children[0].children[length-1]?uploadDom.$el.children[0].children[length-1].style.display = '':''
}
},
handleBeforeUpload(file) { handleBeforeUpload(file) {
let units = { let units = {
KB: 1024, KB: 1024,
...@@ -181,17 +200,21 @@ export default { ...@@ -181,17 +200,21 @@ export default {
}, },
handleSuccess(response, file, fileList) { handleSuccess(response, file, fileList) {
this.updateFileList(fileList); this.updateFileList(fileList);
this.checkLimit(fileList)
}, },
handleRemove(file, fileList) { handleRemove(file, fileList) {
this.updateFileList(fileList); this.updateFileList(fileList);
this.checkLimit(fileList)
}, },
handlePreview({ name, url }) { handlePreview({ name, url }) {
let a = document.createElement("a"); // 生成一个a元素 this.dialogImageUrl = url
let event = new MouseEvent("click"); // 创建一个单击事件 this.dialogVisible = true
// let a = document.createElement("a"); // 生成一个a元素
// let event = new MouseEvent("click"); // 创建一个单击事件
a.download = name; // 设置图片名称 // a.download = name; // 设置图片名称
a.href = url; // 将生成的URL设置为a.href属性 // a.href = url; // 将生成的URL设置为a.href属性
a.dispatchEvent(event); // 触发a的单击事件 // a.dispatchEvent(event); // 触发a的单击事件
}, },
updateFileList(fileList) { updateFileList(fileList) {
let values = fileList.map((v) => { let values = fileList.map((v) => {
...@@ -206,6 +229,7 @@ export default { ...@@ -206,6 +229,7 @@ export default {
console.log(values); console.log(values);
this.$emit("update:modelValue", values); this.$emit("update:modelValue", values);
this.$emit("change",values);
}, },
submitUpload() { submitUpload() {
this.$refs.upload.submit(); this.$refs.upload.submit();
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
:disabled="actionDisabled" :disabled="actionDisabled"
style="max-width: 600px" style="max-width: 600px"
multiple multiple
drag
> >
<!-- <el-button type="primary"> <!-- <el-button type="primary">
上传附件 上传附件
...@@ -175,6 +176,10 @@ export default { ...@@ -175,6 +176,10 @@ export default {
}, },
handleExceed(file, fileList) { handleExceed(file, fileList) {
console.log(file, fileList); console.log(file, fileList);
if (fileList && fileList.length == this.limit) {
this.$message.error(`最多只允许上传${this.limit}个文件`)
return false
}
}, },
handlePreview(val) { handlePreview(val) {
let a = document.createElement("a"); // 生成一个a元素 let a = document.createElement("a"); // 生成一个a元素
...@@ -209,3 +214,9 @@ export default { ...@@ -209,3 +214,9 @@ export default {
}, },
}; };
</script> </script>
<style>
.bg-upload .el-upload-dragger{
padding: 0;
border: 0;
}
</style>
...@@ -2559,6 +2559,7 @@ a { ...@@ -2559,6 +2559,7 @@ a {
width: 100%; width: 100%;
.el-checkbox { .el-checkbox {
width: 100%;
.el-checkbox__label { .el-checkbox__label {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
...@@ -2620,7 +2621,7 @@ a { ...@@ -2620,7 +2621,7 @@ a {
} }
.bg-permission-option--self { .bg-permission-option--self {
width: 168px; width: 128px;
&.full-option { &.full-option {
width: 100%; width: 100%;
...@@ -2628,7 +2629,7 @@ a { ...@@ -2628,7 +2629,7 @@ a {
} }
.bg-permission-option--list { .bg-permission-option--list {
width: calc(100% - 168px); width: calc(100% - 128px);
&.flex-wrap { &.flex-wrap {
display: flex; display: flex;
...@@ -2640,10 +2641,13 @@ a { ...@@ -2640,10 +2641,13 @@ a {
>.bg-permission-option { >.bg-permission-option {
>.bg-permission-option--self { >.bg-permission-option--self {
width: 168px; width: 128px;
border-right: none; border-right: none;
border-bottom: none; border-bottom: none;
} }
} }
} }
}
.bg-upload-image-dialog {
width: 650px;
} }
\ No newline at end of file
...@@ -103,6 +103,16 @@ ...@@ -103,6 +103,16 @@
<el-form-item label="名称" prop="name"> <el-form-item label="名称" prop="name">
<el-input <el-input
v-model="formData.name" v-model="formData.name"
show-word-limit
:maxlength="
nodeClassifyId == 'eb9c7d70-c123-42b7-8e61-dde1b022b669'
? 6
: nodeClassifyId == 'efd9ec3b-7f18-49e2-9d88-bcca022243bb'
? 4
: nodeClassifyId == '949a1138-4995-464e-97a9-424d097eb271'
? 2
: 20
"
placeholder="请输入名称" placeholder="请输入名称"
></el-input> ></el-input>
</el-form-item> </el-form-item>
...@@ -232,8 +242,7 @@ const state = reactive({ ...@@ -232,8 +242,7 @@ const state = reactive({
}, },
rules: { rules: {
name: [ name: [
{ required: true, message: "请输入名称", trigger: "blur" }, { required: true, message: "请输入名称", trigger: "blur" }
{ max: 20, message: "名称最大为20字", trigger: "blur"}
], ],
describe: [ describe: [
{ required: true, message: "请输入描述", trigger: "blur" }, { required: true, message: "请输入描述", trigger: "blur" },
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<el-input v-model="contactForm.contact_email"/> <el-input v-model="contactForm.contact_email"/>
</el-form-item> </el-form-item>
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
<el-input type="textarea" :rows="3" v-model="contactForm.remark" /> <el-input type="textarea" :rows="3" v-model="contactForm.remark" show-word-limit maxlength="300"/>
</el-form-item> </el-form-item>
</el-form> </el-form>
</template> </template>
...@@ -44,37 +44,47 @@ const props = defineProps({ ...@@ -44,37 +44,47 @@ const props = defineProps({
}); });
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}$/;
setTimeout(() => { setTimeout(() => {
if (!phone_ruler.test(value)&&value.length!==0) { if (!phone_ruler.test(value)&&value.length!==0) {
callback(new Error("请输入正确的手机号码")); callback(new Error("请输入正确的手机号码"));
} else { } else {
callback(); callback();
} }
}); });
}; };
const checkPhoneRepet = (rule, value, callback) => { const checkPhoneRepet = (rule, value, callback) => {
let params = null; let params = null;
if (props.id){ if (props.id){
params = {id: parseInt(props.id),contact_phone: value,} params = {id: parseInt(props.id),contact_phone: value,}
}else { }else {
params = {id: 0,contact_phone: value} 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))
}
})
}
$axios.post(`/apaas/system/v5/org/check`,params) const checkName = (rule, value, callback) => {
.then((res) => { var reg = /^[a-zA-Z0-9\u4e00-\u9fa5]+$/
if (res.data.code == 200) { if (!reg.test(value)) {
callback() callback(new Error("只能输入字母、数字和汉字"))
}else { }else {
callback(new Error(res.data.data)) callback()
} }
}) }
}
const contactFormRules = reactive({ const contactFormRules = reactive({
contact_name: [ contact_name: [
{ required: true, message: '请输入联系人姓名', trigger: 'blur' }, { required: true, message: '请输入联系人姓名', trigger: 'blur' },
{ max: 50, message: "联系人姓名最大长度为50个字符", trigger: "blur"},
{ validator: checkName, trigger: 'blur' },
], ],
contact_phone: [ contact_phone: [
{ required: true, message: '请输入联系人手机号', trigger: 'blur' }, { required: true, message: '请输入联系人手机号', trigger: 'blur' },
...@@ -83,6 +93,7 @@ const contactFormRules = reactive({ ...@@ -83,6 +93,7 @@ const contactFormRules = reactive({
], ],
contact_email: [ contact_email: [
{ type: 'email', message: '请输入正确的邮箱', trigger: 'blur' }, { type: 'email', message: '请输入正确的邮箱', trigger: 'blur' },
{ max: 100, message: "邮箱最大长度为100个字符", trigger: "blur"},
] ]
}) })
const contactRef = ref(null) const contactRef = ref(null)
......
...@@ -191,7 +191,7 @@ const getDetail = () => { ...@@ -191,7 +191,7 @@ const getDetail = () => {
systemFormRef.value.setForm({ systemFormRef.value.setForm({
organization_id: form.organization_id, organization_id: form.organization_id,
system_role_id: form.system_role_id, system_role_id: form.system_role_id,
logo: [{url:form.logo}], logo: form.logo ? [{url:form.logo}] : [],
business_code: form.business_code, business_code: form.business_code,
business_name: form.business_name, business_name: form.business_name,
business_desc: form.business_desc, business_desc: form.business_desc,
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<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>
</el-form-item> </el-form-item>
<el-form-item label="业务系统概述" prop="business_desc"> <el-form-item label="业务系统概述" prop="business_desc">
<el-input type="textarea" :rows="3" v-model="systemForm.business_desc" /> <el-input type="textarea" :rows="3" v-model="systemForm.business_desc" show-word-limit maxlength="300" />
</el-form-item> </el-form-item>
<el-form-item label="角色" prop="system_role_id" v-if="!formType"> <el-form-item label="角色" prop="system_role_id" v-if="!formType">
<el-select v-model="systemForm.system_role_id" placeholder="请选择角色" :disabled="true" style="width: 100%"> <el-select v-model="systemForm.system_role_id" placeholder="请选择角色" :disabled="true" style="width: 100%">
...@@ -118,39 +118,49 @@ const validatePass = (rule, value, callback) => { ...@@ -118,39 +118,49 @@ const validatePass = (rule, value, callback) => {
} }
} }
const validateBusinessName = (rule, value, callback) => { const validateBusinessName = (rule, value, callback) => {
let params = null; let reg = /^[a-zA-Z0-9\u4e00-\u9fa5]+$/
if (props.id){ if (!reg.test(value)) {
params = {id: parseInt(props.id),business_name: value,organization_id: systemForm.organization_id} callback(new Error("只能输入字母、数字和汉字"))
}else { }else {
params = {business_name: value,organization_id: systemForm.organization_id} let params = null;
} if (props.id){
params = {id: parseInt(props.id),business_name: value,organization_id: systemForm.organization_id}
$axios.post(`/apaas/system/v5/user/check/business`,params) }else {
.then((res) => { params = {business_name: value,organization_id: systemForm.organization_id}
if (res.data.code == 200) { }
callback()
}else { $axios.post(`/apaas/system/v5/user/check/business`,params)
.then((res) => {
if (res.data.code == 200) {
callback()
}else {
callback(new Error(res.data.data)) callback(new Error(res.data.data))
} }
}) })
}
} }
const validateSystemAccount = (rule, value, callback) => { const validateSystemAccount = (rule, value, callback) => {
let params = null; let reg = /^[a-zA-Z0-9]+$/
if (props.id){ if (!reg.test(value)) {
params = {id: parseInt(props.id),system_account: value,} callback(new Error("只能输入字母和数字"))
}else { }else {
params = {system_account: value} let params = null;
} if (props.id){
params = {id: parseInt(props.id),system_account: value,}
$axios.post(`/apaas/system/v5/user/check/account`,params) }else {
.then((res) => { params = {system_account: value}
if (res.data.code == 200) { }
callback()
}else { $axios.post(`/apaas/system/v5/user/check/account`,params)
.then((res) => {
if (res.data.code == 200) {
callback()
}else {
callback(new Error(res.data.data)) callback(new Error(res.data.data))
} }
}) })
}
} }
const formRules = reactive({ const formRules = reactive({
...@@ -159,6 +169,7 @@ const formRules = reactive({ ...@@ -159,6 +169,7 @@ const formRules = reactive({
], ],
business_name: [ business_name: [
{ required: true, message: '请输入业务系统名称', trigger: 'blur' }, { required: true, message: '请输入业务系统名称', trigger: 'blur' },
{ max: 50, message: '业务系统名称最大长度为50个字符', trigger: 'blur' },
{ validator: validateBusinessName, trigger: 'blur' }, { validator: validateBusinessName, trigger: 'blur' },
], ],
system_role_id: [ system_role_id: [
...@@ -166,16 +177,24 @@ const formRules = reactive({ ...@@ -166,16 +177,24 @@ const formRules = reactive({
], ],
system_account: [ system_account: [
{ required: true, message: '请输入账号', trigger: 'blur' }, { required: true, message: '请输入账号', trigger: 'blur' },
{ min: 4,message: '帐号长度不得低于4个字符',trigger: 'blur' },
{ max: 20,message: '帐号最大长度为20个字符',trigger: 'blur' },
{ validator: validateSystemAccount, trigger: 'blur' }, { validator: validateSystemAccount, trigger: 'blur' },
], ],
password: [ password: [
{ required: true, message: '请输入密码', trigger: 'blur' }, { required: true, message: '请输入密码', trigger: 'blur' },
{min: 8,message: '密码长度不得低于8位',trigger: 'blur'} { min: 8,message: '密码长度不得低于8位',trigger: 'blur' }
], ],
confirm_password: [ confirm_password: [
{ required: true, message: '请确认密码', trigger: 'blur' }, { required: true, message: '请确认密码', trigger: 'blur' },
{ validator: validatePass, trigger: 'blur' } { validator: validatePass, trigger: 'blur' }
], ],
access_address: [
{ max: 500,message: '访问地址最大长度为500个字符',trigger: 'blur' },
],
develop_id: [
{ required: true, message: "请选择开发厂商", trigger: "change"}
]
}) })
const systemRef = ref(null) const systemRef = ref(null)
...@@ -258,14 +277,13 @@ const getRoleList = () => { ...@@ -258,14 +277,13 @@ const getRoleList = () => {
const getFirmList = () => { const getFirmList = () => {
$axios.get(`/apaas/system/v5/dictionary/developer/list`) $axios.get(`/apaas/system/v5/dictionary/developer/list`)
.then((res) => { .then((res) => {
if (res.data.code == 200) { if (res.data.code == 200) {
firmList.value = res.data.data; firmList.value = res.data.data || [];
}else { }else {
$message.error(res.data.data)
} }
}) })
} }
onBeforeMount(() =>{ onBeforeMount(() =>{
......
...@@ -217,17 +217,16 @@ import CryptoJS from "crypto-js"; ...@@ -217,17 +217,16 @@ import CryptoJS from "crypto-js";
{ {
label: "业务系统编码", label: "业务系统编码",
prop: "business_code", prop: "business_code",
width: 180 minWidth: 160
}, },
{ {
label: "业务系统名称", label: "业务系统名称",
prop: "business_name", prop: "business_name",
minWidth: 180 minWidth: 160
}, },
{ {
label: "账号", label: "账号",
prop: "system_account", prop: "system_account",
width: 150
}, },
{ {
label: "所属机构", label: "所属机构",
...@@ -242,7 +241,6 @@ import CryptoJS from "crypto-js"; ...@@ -242,7 +241,6 @@ import CryptoJS from "crypto-js";
{ {
label: "是否启用", label: "是否启用",
prop: "state", prop: "state",
width: 80
}, },
{ {
label: "操作", label: "操作",
...@@ -557,7 +555,7 @@ import CryptoJS from "crypto-js"; ...@@ -557,7 +555,7 @@ import CryptoJS from "crypto-js";
} }
const clearSelected = () => { const clearSelected = () => {
dataTable.value.clearSelection(); dataTable.value.clearTable();
} }
......
...@@ -300,7 +300,7 @@ const fileAction = (val,data,parent,disabled=false) => { ...@@ -300,7 +300,7 @@ const fileAction = (val,data,parent,disabled=false) => {
let newChild = { let newChild = {
menu_name: "新菜单", // 菜单名称 menu_name: "新菜单", // 菜单名称
menu_id: 'new' + state.newMenuId, // 菜单id,用于新增后选中 menu_id: 'new' + state.newMenuId, // 菜单id,用于新增后选中
menu_type: !parent ? 0 : parent.menu_type == 0 ? 0 : parent.menu_type == 1 ? 1 : 2, // 新增本级的类型 menu_type: !parent ? 0 : parent.menu_type == 0 ? 0 : 2, // 新增本级的类型
dict_group_id: parent ? parent.dict_group_id : "", // 父级的分组 有则继承,无则自选 dict_group_id: parent ? parent.dict_group_id : "", // 父级的分组 有则继承,无则自选
state: 1, // 启用状态 state: 1, // 启用状态
menu_url: "", // 路径 menu_url: "", // 路径
...@@ -320,7 +320,7 @@ const fileAction = (val,data,parent,disabled=false) => { ...@@ -320,7 +320,7 @@ const fileAction = (val,data,parent,disabled=false) => {
let newChild = { let newChild = {
menu_name: "新菜单", menu_name: "新菜单",
menu_id: 'new' + state.newMenuId, menu_id: 'new' + state.newMenuId,
menu_type: data.menu_type == 0 ? 0 : data.menu_type == 1 ? 1 : 2, menu_type: data.menu_type == 0 ? 0 : 2,
dict_group_id: data.dict_group_id, dict_group_id: data.dict_group_id,
state: 1, state: 1,
menu_url: "", menu_url: "",
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<el-form-item label="类型" prop="menu_type" v-if="!topLevel"> <el-form-item label="类型" prop="menu_type" v-if="!topLevel">
<el-radio-group v-model="menuForm.menu_type" :disabled="radioDisabled"> <el-radio-group v-model="menuForm.menu_type" :disabled="radioDisabled">
<el-radio :label="0" :disabled="typeDisFlag != 0">目录</el-radio> <el-radio :label="0" :disabled="typeDisFlag != 0">目录</el-radio>
<el-radio :label="1" :disabled="typeDisFlag == 2">菜单</el-radio> <el-radio :label="1" :disabled="typeDisFlag != 2 && typeDisFlag != 0">菜单</el-radio>
<el-radio :label="2">子页面</el-radio> <el-radio :label="2">子页面</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
......
...@@ -27,9 +27,22 @@ ...@@ -27,9 +27,22 @@
</div> </div>
<div class="flex_right"> <div class="flex_right">
<div class="info_container bgc_white"> <div class="info_container bgc_white">
<div class="title"><span class="icon_box"><bg-icon class="step_icon" icon="#bg-ic-file"></bg-icon></span> 基本信息 <bg-icon style="font-size: 14px" class="step_icon" icon="#bg-ic-arrow-right"></bg-icon> </div> <div class="title">
<bg-info v-if="selectTreeDataType === 1" :data="baseInfo"></bg-info> <span class="icon_box">
<bg-info v-if="selectTreeDataType === 2" :data="baseInfo2"></bg-info> <span class="step_icon">
<bg-icon icon="#bg-ic-file"></bg-icon>
</span>
<span>
基本信息
</span>
</span>
<span class="can_click_text detail_btn" v-if="selectTreeDataType === 1" @click="toOrgDetail">
查看详情
<bg-icon style="font-size: 8px; color: #95a3ca; vertical-align: middle" icon="#bg-ic-arrow-right" />
</span>
</div>
<bg-info class="info_box" v-if="selectTreeDataType === 1" :data="baseInfo"></bg-info>
<bg-info class="info_box" v-if="selectTreeDataType === 2" :data="baseInfo2"></bg-info>
</div> </div>
<div class="main_container bgc_white"> <div class="main_container bgc_white">
<bg-filter-group @search="changeSearch" v-model="filter.key_word" placeholder="请输入关键字"> <bg-filter-group @search="changeSearch" v-model="filter.key_word" placeholder="请输入关键字">
...@@ -880,7 +893,7 @@ import { downloadFileFormatNew } from '@/services/helper' ...@@ -880,7 +893,7 @@ import { downloadFileFormatNew } from '@/services/helper'
} }
const clearSelected = () => { const clearSelected = () => {
dataTable.value.clearSelection(); dataTable.value.clearTable();
} }
...@@ -932,13 +945,33 @@ import { downloadFileFormatNew } from '@/services/helper' ...@@ -932,13 +945,33 @@ import { downloadFileFormatNew } from '@/services/helper'
color: #202531; color: #202531;
font-weight: bold; font-weight: bold;
margin-bottom: 10px; margin-bottom: 10px;
max-width: 960px;
display: flex;
justify-content: space-between;
align-items: center;
}
.detail_btn {
font-size: 14px;
font-weight: normal;
} }
.icon_box { .icon_box {
background-color: rgb(42, 74, 167); display: flex;
color: rgb(255, 255, 255); align-items: center;
padding: 2px 4px; }
border-radius: 4px; .step_icon {
font-size: 14px; display: inline-block;
width: 20px;
height: 20px;
text-align: center;
line-height: 20px;
background-color: #2a4aa7;
color: #fff;
border-radius: 4px;
font-size: 14px;
margin-right: 8px;
}
.info_box {
max-width: 960px;
} }
.main_container { .main_container {
flex: 1; flex: 1;
...@@ -969,7 +1002,7 @@ import { downloadFileFormatNew } from '@/services/helper' ...@@ -969,7 +1002,7 @@ import { downloadFileFormatNew } from '@/services/helper'
bottom: unset bottom: unset
} }
.dialog_form { .dialog_form {
padding: 16px; padding: 24px 8px 6px;
} }
</style> </style>
\ No newline at end of file
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
:model="orgForm" :model="orgForm"
:rules="formRules" :rules="formRules"
ref="orgRef" ref="orgRef"
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 <el-tree-select
...@@ -27,12 +26,16 @@ ...@@ -27,12 +26,16 @@
<el-input v-model="orgForm.organization_code" /> <el-input v-model="orgForm.organization_code" />
</el-form-item> </el-form-item>
<el-form-item label="组织介绍" prop="description"> <el-form-item label="组织介绍" prop="description">
<el-input type="textarea" :rows="3" v-model="orgForm.description" /> <el-input type="textarea" :rows="3" v-model="orgForm.description" maxlength="300" show-word-limit />
</el-form-item> </el-form-item>
<el-form-item label="组织附件" prop="logo"> <el-form-item label="组织附件" prop="logo">
<bg-upload v-model="orgForm.attachment" customTips :limit="3" <bg-upload
:fileTypes="['doc','docx','xls','xlsx','pdf','jpg','jpeg','png','zip','rar']" v-model="orgForm.attachment"
:otherInfo="'最多可上传三个附件,可上传zip,rar,doc,docx,xlsx,xls,png,jpg,可上传营业执照和相关协议文件等'"> 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> <span>将文件拖到此处,或 点击上传</span>
</bg-upload> </bg-upload>
</el-form-item> </el-form-item>
...@@ -41,105 +44,119 @@ ...@@ -41,105 +44,119 @@
<script setup> <script setup>
import { reactive, ref, onMounted, onBeforeMount, getCurrentInstance } from 'vue' import { reactive, ref, onMounted, onBeforeMount, getCurrentInstance } from 'vue'
const props = defineProps({ const props = defineProps({
formType: { formType: {
type: String, type: String,
default: 'create', //false 新建 true 编辑 default: 'create', //false 新建 true 编辑
}, },
}); });
const { proxy } = getCurrentInstance() const { proxy } = getCurrentInstance()
const { $axios,$message } = proxy const { $axios,$message } = proxy
const orgForm = reactive({ const orgForm = reactive({
p_organization_id: '', p_organization_id: '',
level: false, level: false,
name: '', name: '',
organization_code: '', organization_code: '',
description: '', description: '',
attachment: [] attachment: []
}) })
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 orgRef = ref(null) const checkCode = (rule, value, callback) => {
const emit = defineEmits(['action']) var reg = /^[a-zA-Z0-9]+$/
if (!reg.test(value)) {
callback(new Error("只能输入字母和数字"))
}else {
callback()
}
}
const submitForm = async () => { const checkName = (rule, value, callback) => {
if (!orgRef) return var reg = /^[a-zA-Z\u4e00-\u9fa5]+$/
await orgRef.value.validate((valid, fields) => { if (!reg.test(value)) {
if (valid) { callback(new Error("只能输入字母和汉字"))
emit('action', orgForm) }else {
} else { callback()
emit('action',null)
}
})
} }
}
const clearForm = () => { const formRules = reactive({
if (!orgRef) return p_organization_id: [
orgRef.value.resetFields() { required: true, message: '输入上级目录', trigger: 'blur' },
} ],
name: [
{ required: true, message: '请输入机构名称', trigger: 'blur' },
{ max: 50, message: '机构名称最大长度为50位', trigger: 'blur' },
{ validator: checkName, trigger: 'blur' }
],
organization_code: [
{ required: true, message: '请输入组织机构代码', trigger: 'blur' },
{ max: 18, message: '组织机构代码最大长度为18位', trigger: 'blur' },
{ validator: checkCode, trigger: 'blur' }
],
})
const setForm = (data) => { const orgRef = ref(null)
Object.assign(orgForm, data); const emit = defineEmits(['action'])
}
const orgData = ref([]) const submitForm = async () => {
const treeProps = { if (!orgRef) return
label: 'name', await orgRef.value.validate((valid, fields) => {
children: 'Child', if (valid) {
value: 'organization_id', emit('action', orgForm)
disabled: 'disabled' } else {
} emit('action',null)
const getOrgTree = () => { }
$axios.get(`/apaas/system/v5/org/tree`) })
.then((res) => { }
const clearForm = () => {
if (!orgRef) return
orgRef.value.resetFields()
}
const setForm = (data) => {
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) { if (res.data.code == 200) {
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)
} }
}) })
} }
const filterOrg = (data) => {
if(data.length > 0) {
data.forEach(item => {
item.disabled = item.data_type === 0 ? false : true;
if(item.Child){ const filterOrg = (data) => {
filterOrg(item.Child) if(data.length > 0) {
}else { data.forEach(item => {
return item.disabled = item.data_type === 0 ? false : true;
} if(item.Child){
}) filterOrg(item.Child)
}else {
return
} }
return data; })
}
const isTop = (data) => {
orgForm.p_organization_id = data ? ' ' : ''; //空格绕过表单非空校验
} }
return data;
}
onBeforeMount(() => { const isTop = (data) => {
getOrgTree() orgForm.p_organization_id = data ? ' ' : ''; //空格绕过表单非空校验
}) }
onBeforeMount(() => {
onMounted(() => { getOrgTree()
})
}) onMounted(() => {})
defineExpose({ submitForm, clearForm, setForm }) defineExpose({ submitForm, clearForm, setForm })
</script> </script>
\ No newline at end of file
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<el-breadcrumb separator="/"> <el-breadcrumb separator="/">
<el-breadcrumb-item> 组织管理 </el-breadcrumb-item> <el-breadcrumb-item> 组织管理 </el-breadcrumb-item>
<el-breadcrumb-item :to="{ path: '/system/organization' }"> 组织管理 </el-breadcrumb-item> <el-breadcrumb-item :to="{ path: '/system/organization' }"> 组织管理 </el-breadcrumb-item>
<el-breadcrumb-item> 新增组织管理员 </el-breadcrumb-item> <el-breadcrumb-item> {{route.query.id ? '编辑组织用户':'新增组织管理员'}} </el-breadcrumb-item>
</el-breadcrumb> </el-breadcrumb>
</div> </div>
<div class="page_content flex_cloumn"> <div class="page_content flex_cloumn">
...@@ -144,12 +144,14 @@ const getOrgPersonFormData = (data) => { ...@@ -144,12 +144,14 @@ const getOrgPersonFormData = (data) => {
}) })
}else { }else {
const params = {...formData, const params = {
// organization_id: orgId.value, ...formData,
logo: formData.logo && formData.logo.length > 0 ? formData.logo[0].url : '', // organization_id: orgId.value,
is_admin: 2, logo: formData.logo && formData.logo.length > 0 ? formData.logo[0].url : '',
password: CryptoJS.AES.encrypt(formData.password,"swuE9cmCZQwrkYRV").toString() is_admin: 2,
}; password: CryptoJS.AES.encrypt(formData.password,"swuE9cmCZQwrkYRV").toString()
};
params.document_type = params.document_type == "" ? 0 : params.document_type
$axios.post(`/apaas/system/v5/org/add/user`,params) $axios.post(`/apaas/system/v5/org/add/user`,params)
.then((res) => { .then((res) => {
if (res.data.code == 200) { if (res.data.code == 200) {
...@@ -190,7 +192,7 @@ const getDetail = () => { ...@@ -190,7 +192,7 @@ const getDetail = () => {
orgAccountRef.value.setForm({ orgAccountRef.value.setForm({
organization_id: form.organization_id, organization_id: form.organization_id,
select_role: form.select_role, select_role: form.select_role,
logo: [{url:form.logo}], logo: form.logo ? [{url:form.logo}] : [],
system_account: form.system_account, system_account: form.system_account,
contact_phone: form.contact_phone, contact_phone: form.contact_phone,
state: form.state, state: form.state,
...@@ -199,7 +201,7 @@ const getDetail = () => { ...@@ -199,7 +201,7 @@ const getDetail = () => {
orgPersonRef.value.setForm({ orgPersonRef.value.setForm({
contact_name: form.contact_name, contact_name: form.contact_name,
document_type: form.document_type, document_type: form.document_type ? form.document_type : "",
document_number: form.document_number, document_number: form.document_number,
contact_email: form.contact_email, contact_email: form.contact_email,
remark: form.remark, remark: form.remark,
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<el-breadcrumb separator="/"> <el-breadcrumb separator="/">
<el-breadcrumb-item> 组织管理 </el-breadcrumb-item> <el-breadcrumb-item> 组织管理 </el-breadcrumb-item>
<el-breadcrumb-item :to="{ path: '/system/organization' }"> 组织管理 </el-breadcrumb-item> <el-breadcrumb-item :to="{ path: '/system/organization' }"> 组织管理 </el-breadcrumb-item>
<el-breadcrumb-item> 新增平台用户 </el-breadcrumb-item> <el-breadcrumb-item> {{route.query.id ? '编辑平台用户':'新增平台用户'}} </el-breadcrumb-item>
</el-breadcrumb> </el-breadcrumb>
</div> </div>
<div class="page_content flex_cloumn"> <div class="page_content flex_cloumn">
...@@ -217,7 +217,7 @@ const getDetail = () => { ...@@ -217,7 +217,7 @@ const getDetail = () => {
if (res.data.code == 200) { if (res.data.code == 200) {
const form = res.data.data; const form = res.data.data;
platformAccountFormRef.value.setForm({ platformAccountFormRef.value.setForm({
logo: [{url:form.logo}], logo: form.logo ? [{url:form.logo}] : [],
system_account: form.system_account, system_account: form.system_account,
contact_phone: form.contact_phone, contact_phone: form.contact_phone,
state: form.state, state: form.state,
......
<template> <template>
<div class="page_container"> <div class="page_container">
<div class="bg-breadcrumb"> <div class="bg-breadcrumb">
<el-breadcrumb separator="/"> <el-breadcrumb separator="/">
<el-breadcrumb-item> 组织管理 </el-breadcrumb-item> <el-breadcrumb-item> 组织管理 </el-breadcrumb-item>
<el-breadcrumb-item :to="{ path: '/system/organization' }"> 组织管理 </el-breadcrumb-item> <el-breadcrumb-item :to="{ path: '/system/organization' }"> 组织管理 </el-breadcrumb-item>
<el-breadcrumb-item> 用户详情 </el-breadcrumb-item> <el-breadcrumb-item> 用户详情 </el-breadcrumb-item>
</el-breadcrumb> </el-breadcrumb>
</div>
<div class="page_content apaas_scroll">
<div class="info_row">
<div class="title">
<div><span class="icon_box"></span> 账号信息</div>
<div class="dashed_line">
</div>
</div> </div>
<div class="page_content apaas_scroll"> <div class="info_content">
<div class="info_row"> <div class="img_box">
<div class="title"> <img v-if="logo" :src="logo" style="height: 96px;width: 96px;border-radius: 99px" alt="">
<div><span class="icon_box"></span> 账号信息</div> <img v-else src="/src/assets/imgs/home_ic_user.png" style="height: 96px;width: 96px;border-radius: 99px" alt="">
<div class="dashed_line">
</div>
</div>
<div class="info_content">
<div class="img_box">
<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="accountInfo"></bg-info>
</div>
</div>
</div> </div>
<div> <div class="info_box">
<div class="title"> <bg-info :data="accountInfo"></bg-info>
<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 v-if="accountType === 2" :data="personInfo"></bg-info>
<bg-info v-if="accountType === 3" :data="personInfo2"></bg-info>
</div>
</div>
</div> </div>
</div> </div>
</div>
<div>
<div class="title">
<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 v-if="accountType === 2" :data="personInfo"></bg-info>
<bg-info v-if="accountType === 3" :data="personInfo2"></bg-info>
</div>
</div>
</div>
</div> </div>
</div>
</template> </template>
<script setup> <script setup>
...@@ -52,159 +52,152 @@ const { proxy } = getCurrentInstance() ...@@ -52,159 +52,152 @@ const { proxy } = getCurrentInstance()
const { $axios,$message } = proxy const { $axios,$message } = proxy
const route = useRoute(); const route = useRoute();
const accountInfo = reactive( const accountInfo = reactive([
[ {
{ name: "手机号",
name: "手机号", value: "",
value: "", nameWidth: 130
nameWidth: 130 },
}, {
{ name: "账号",
name: "账号", value: "",
value: "", nameWidth: 130
nameWidth: 130 },
}, {
{ name: "角色",
name: "角色", value: "",
value: "", nameWidth: 130
nameWidth: 130 },
}, {
{ name: "所属组织",
name: "所属组织", value: "",
value: "", nameWidth: 130
nameWidth: 130 },
}, {
{ name: "创建人",
name: "创建人", value: "",
value: "", nameWidth: 130
nameWidth: 130 },
}, {
{ name: "创建账号",
name: "创建账号", value: "",
value: "", nameWidth: 130
nameWidth: 130 },
}, {
{ name: "最后编辑时间",
name: "最后编辑时间", value: "",
value: "", nameWidth: 130
nameWidth: 130 },
}, {
{ name: "创建时间",
name: "创建时间", value: "",
value: "", nameWidth: 130
nameWidth: 130 },
}, ])
]
) const personInfo = reactive([
{
const personInfo = reactive( name: "姓名",
[{ value: "",
name: "姓名", nameWidth: 130
value: "", },
nameWidth: 130 {
}, name: "邮箱",
{ value: "",
name: "邮箱", nameWidth: 130
value: "", },
nameWidth: 130 {
}, name: "证据类型",
{ value: "",
name: "证据类型", nameWidth: 130
value: "", },
nameWidth: 130 {
}, name: "身份证号",
{ value: "",
name: "身份证号", idCard: true,
value: "", nameWidth: 130
idCard: true, },
nameWidth: 130 {
}, name: "备注",
{ value: "",
name: "备注", full: true,
value: "", nameWidth: 130
full: true, },
nameWidth: 130 ])
},
]) const personInfo2 = reactive([
{
const personInfo2 = reactive( name: "姓名",
[{ value: "",
name: "姓名", nameWidth: 130
value: "", },
nameWidth: 130 {
}, name: "邮箱",
{ value: "",
name: "邮箱", nameWidth: 130
value: "", },
nameWidth: 130 {
}, name: "备注",
{ value: "",
name: "备注", full: true,
value: "", nameWidth: 130
full: true, },
nameWidth: 130 ])
},
]) const logo = ref('')
const accountType = ref(2); //1.业务系统账号 2.组织管理员账号 3.平台用户账号
const logo = ref('') const getDetail = () => {
const accountType = ref(2); //1.业务系统账号 2.组织管理员账号 3.平台用户账号 $axios.get(`/apaas/system/v5/org/user/${route.query.id}`)
.then((res) => {
const getDetail = () => { if (res.data.code == 200) {
$axios.get(`/apaas/system/v5/org/user/${route.query.id}`) const detail = res.data.data;
.then((res) => { accountInfo[0].value = detail.contact_phone;
if (res.data.code == 200) { accountInfo[1].value = detail.system_account;
const detail = res.data.data; accountInfo[2].value = detail.system_role && detail.system_role.length > 0 ? detail.system_role.join('') : '';
accountInfo[0].value = detail.contact_phone; accountInfo[3].value = detail.organization;
accountInfo[1].value = detail.system_account; accountInfo[4].value = detail.created_by;
accountInfo[2].value = detail.system_role && detail.system_role.length > 0 ? detail.system_role.join('') : ''; accountInfo[5].value = detail.created_by_account;
accountInfo[3].value = detail.organization; accountInfo[6].value = detail.updated_time;
accountInfo[4].value = detail.created_by; accountInfo[7].value = detail.created_t
accountInfo[5].value = detail.created_by_account; personInfo[0].value = detail.contact_name;
accountInfo[6].value = detail.updated_time; personInfo[1].value = detail.contact_email;
accountInfo[7].value = detail.created_time; personInfo[2].value = detail.document_type === 1 ? '身份证' : '';
personInfo[3].value = detail.document_number;
personInfo[0].value = detail.contact_name; personInfo[4].value = detail.rem
personInfo[1].value = detail.contact_email; personInfo2[0].value = detail.contact_name;
personInfo[2].value = detail.document_type === 1 ? '身份证' : ''; personInfo2[1].value = detail.contact_email;
personInfo[3].value = detail.document_number; personInfo2[2].value = detail.rem
personInfo[4].value = detail.remark; logo.value = detail.logo;
accountType.value = detail.is_ad
personInfo2[0].value = detail.contact_name; }else {
personInfo2[1].value = detail.contact_email; $message.error(res.data.data)
personInfo2[2].value = detail.remark; }
})
logo.value = detail.logo; }
accountType.value = detail.is_admin;
}else { onBeforeMount(() => {
$message.error(res.data.data) if(route.query.id) {
} getDetail()
})
} }
})
onBeforeMount(() => {
if(route.query.id) {
getDetail()
}
})
</script> </script>
<style scoped> <style scoped>
.page_content { .page_content {
padding: 15px; padding: 15px;
overflow: auto; overflow: auto;
} }
.info_content { .info_content {
display: flex; display: flex;
} }
.info_row { .info_row {
margin-bottom: 40px; margin-bottom: 40px;
} }
.img_box { .img_box {
width: 120px; width: 120px;
} }
.info_box { .info_box {
width: 60%; width: 60%;
} }
.title { .title {
...@@ -216,19 +209,19 @@ const accountInfo = reactive( ...@@ -216,19 +209,19 @@ const accountInfo = reactive(
align-items: center; align-items: center;
} }
.dashed_line { .dashed_line {
flex: 1; flex: 1;
height: 1px; height: 1px;
margin: 0 10px; margin: 0 10px;
border-bottom: dashed 1px #dadee7; border-bottom: dashed 1px #dadee7;
} }
.icon_box { .icon_box {
display: inline-block; display: inline-block;
width: 4px; width: 4px;
height: 14px; height: 14px;
background-color: #3759be; background-color: #3759be;
border-radius: 2px; border-radius: 2px;
margin-right: 5px; margin-right: 5px;
} }
</style> </style>
\ No newline at end of file
...@@ -146,7 +146,7 @@ ...@@ -146,7 +146,7 @@
</template> </template>
</el-cascader> </el-cascader>
<el-input <el-input
v-model="userFilter.search" v-model.trim="userFilter.search"
placeholder="请输入内容" placeholder="请输入内容"
style="width: 200px" style="width: 200px"
:prefix-icon="Search" :prefix-icon="Search"
...@@ -339,6 +339,9 @@ const changeSearch = (val) => { ...@@ -339,6 +339,9 @@ const changeSearch = (val) => {
} // 表格关键字筛选 } // 表格关键字筛选
const changeUseRow = (row) => { const changeUseRow = (row) => {
if (row.role_type == 1 || row.role_type == 2) {
return
}
axios axios
.post(`/apaas/system/v5/role/state/${row.id}/${row.state}`) .post(`/apaas/system/v5/role/state/${row.id}/${row.state}`)
.then((res) => { .then((res) => {
......
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