Commit 676c6858 authored by 李鹏 's avatar 李鹏

删除多余文件

parent 26f4c4e9
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<!-- 角色管理 -->
<template>
<div class="page_container">
<bg-breadcrumb></bg-breadcrumb>
<div class="main_container">
<div class="form_content apaas_scroll_nor">
<el-form ref="refForm" :model="formData" :rules="rules" label-width="96px" class="registerForm">
<el-form-item label="LOGO" prop="logoUrl">
<bg-upload-image
v-model="formData.logoUrl"
:showTips="true"
customTips="请选择图片上传:支持jpg、png等格式,图片需小于500KB"
:fileSize="500"
:fileSizeUnit="'KB'"
:limit="1"
listType="picture-card"
@change="changeLogo"
:accept="['.jpg', '.jpeg', '.png']"></bg-upload-image>
</el-form-item>
<el-form-item label="登录背景图" prop="backgroundUrl">
<bg-upload-image
v-model="formData.backgroundUrl"
:fileSize="2"
:showTips="true"
customTips="请选择图片上传:大小1920 * 1026像素支持jpg、png等格式,图片需小于2MB"
:limit="1"
listType="picture-card"
@change="changeBanner"
:accept="['.jpg', '.jpeg', '.png']"></bg-upload-image>
</el-form-item>
<bg-form-gap title="底部所有权内容"></bg-form-gap>
<el-form-item label="内容" prop="patent">
<el-input
v-model.trim="formData.patent"
placeholder="例如:Copyright © 某某大数据, All Rights Reserved."></el-input>
</el-form-item>
<bg-form-gap title="底部ICP备案"></bg-form-gap>
<el-form-item label="内容" prop="icpFiling">
<el-input placeholder="请输入" v-model.trim="formData.icpFiling"></el-input>
</el-form-item>
<el-form-item label="跳转连接" prop="icpUrl">
<el-input placeholder="例如:https://...或http://..." v-model.trim="formData.icpUrl"></el-input>
</el-form-item>
<bg-form-gap title="底部公安网备案"></bg-form-gap>
<el-form-item label="内容" prop="publicSecurityFiling">
<el-input placeholder="请输入" v-model.trim="formData.publicSecurityFiling"></el-input>
</el-form-item>
<el-form-item label="跳转连接" prop="publicSecurityUrl">
<el-input placeholder="例如:https://...或http://..." v-model.trim="formData.publicSecurityUrl"></el-input>
</el-form-item>
<bg-form-gap title="法律声明"></bg-form-gap>
<el-form-item label="跳转连接" prop="legalStatementUrl">
<el-input placeholder="例如:https://...或http://..." v-model.trim="formData.legalStatementUrl"></el-input>
</el-form-item>
<bg-form-gap title="隐私政策"></bg-form-gap>
<el-form-item label="跳转连接" prop="privacyPolicyUrl">
<el-input placeholder="例如:https://...或http://..." v-model.trim="formData.privacyPolicyUrl"></el-input>
</el-form-item>
</el-form>
</div>
<div class="operate_btns">
<el-button type="primary" @click="save"> 保存 </el-button>
</div>
</div>
</div>
</template>
<script setup>
import { reactive, toRefs, ref, onBeforeMount, nextTick } from "vue";
import axios from "../../../../request/http.js";
import { ElMessage } from "element-plus";
import bgBreadcrumb from "@/components/bg-breadcrumb.vue";
import { validateLink } from "@/services/rules.js";
import store from "../../../../store";
const refForm = ref(null);
const state = reactive({
formData: {
logoUrl: [],
backgroundUrl: [],
patent: "",
icpFiling: "",
icpUrl: "",
publicSecurityFiling: "",
publicSecurityUrl: "",
legalStatementUrl: "",
privacyPolicyUrl: "",
}, //表单数据
rules: {
logoUrl: [{ required: true, message: "请上传Logo", trigger: "change" }],
backgroundUrl: [{ required: true, message: "请上传背景图", trigger: "change" }],
icpUrl: [{ validator: validateLink, trigger: "blur" }],
publicSecurityUrl: [{ validator: validateLink, trigger: "blur" }],
legalStatementUrl: [{ validator: validateLink, trigger: "blur" }],
privacyPolicyUrl: [{ validator: validateLink, trigger: "blur" }],
}, //表单校验规则
});
const changeLogo = (value) => {
if (value && value.length > 0) {
refForm.value.clearValidate("logoUrl");
}
};
const changeBanner = (value) => {
if (value && value.length > 0) {
refForm.value.clearValidate("backgroundUrl");
}
};
const save = () => {
refForm.value.validate((valid) => {
if (valid) {
let params = {
...state.formData,
};
params.logoUrl = JSON.stringify(params.logoUrl);
params.backgroundUrl = JSON.stringify(params.backgroundUrl);
axios.put(`/apaas/system/v5/login/updateLogin`, params).then((res) => {
if (res.data.code == 200) {
ElMessage.success(res.data.msg);
getLoginPageConfig();
} else {
ElMessage.error(res.data.data);
}
});
} else {
ElMessage.error("请先将表单填写完整");
}
});
};
const getLoginPageConfig = () => {
axios.get(`/apaas/system/v5/login/loginDetail`).then((res) => {
if (res.data.code == 200) {
let data = res.data.data;
store.commit("setSystemLogo", data.logoUrl);
data.logoUrl = data.logoUrl ? JSON.parse(data.logoUrl) : [];
data.backgroundUrl = data.backgroundUrl ? JSON.parse(data.backgroundUrl) : [];
Object.assign(state.formData, data);
} else {
ElMessage.error(res.data.data);
}
});
};
onBeforeMount(() => {
getLoginPageConfig();
});
const { formData, rules } = toRefs(state);
</script>
<style lang="scss" scoped>
.page_container {
.main_container {
position: relative;
margin: 0 0 16px;
width: 100%;
height: calc(100% - 62px);
padding: 32px 0 70px;
overflow: auto;
background-color: #fff;
box-shadow: 0px 1px 4px 0px rgba(0, 7, 101, 0.15);
border-radius: 6px;
.form_content {
overflow: auto;
height: 100%;
padding-left: 24px;
.el-form {
width: 60%;
:deep() .el-form-item {
&:nth-of-type(1) {
.el-upload--picture-card {
width: 120px;
height: 120px;
}
}
&:nth-of-type(2) {
.el-upload--picture-card {
width: 367px;
height: 196px;
}
}
}
}
:deep() .gap-title {
font-size: 16px;
color: #202531;
}
}
.operate_btns {
position: absolute;
bottom: 0;
width: 100%;
height: 70px;
text-align: right;
line-height: 68px;
border-top: solid 1px #e6e9ef;
.el-button {
width: 92px;
margin-right: 16px;
}
}
}
}
</style>
This diff is collapsed.
This diff is collapsed.
<template>
<div class="detail_container">
<bg-breadcrumb></bg-breadcrumb>
<div class="main_container">
<div class="question-box">
<div>问题分类 - {{ category.problem_type }}{{ category.problem_number }}/8)</div>
<el-button type="primary" @click="handleQuestionUpdate('create')">
<bg-icon style="font-size: 12px; color: #fff; margin-right: 8px" icon="#bg-ic-add"></bg-icon>
新增
</el-button>
<div class="table_container" style="padding: 0">
<div class="table bg-scroll">
<bg-table ref="bgTable" :headers="headers" :rows="tableRows" :isIndex="true" :stripe="true">
<template #action="{ row }">
<bg-table-btn @click="handleQuestionUpdate('edit', row)">编辑</bg-table-btn>
<bg-table-btn @click="handleDeleteDialog(row)">删除</bg-table-btn>
<bg-table-btn @click="moveRow(row, 1)" :disabled="!row.canMoveUp">上移</bg-table-btn>
<bg-table-btn @click="moveRow(row, 2)" :disabled="!row.canMoveDown">下移</bg-table-btn>
</template>
</bg-table>
</div>
<!-- <bg-pagination
:page="filter.page"
:size="filter.size"
:total="tableTotal"
@change-page="changePage"
@change-size="changeSize">
</bg-pagination> -->
</div>
</div>
</div>
<el-dialog
class="dialog_box"
:title="questionEditType == 'create' ? '新增' : '编辑'"
v-model="dialogQuestionEdit"
width="614px">
<el-form ref="bgForm" :model="ruleForm" :rules="rules" label-width="80px" class="bg_form">
<el-form-item label="标题" prop="title">
<el-input
v-model="ruleForm.title"
type="text"
show-word-limit
maxlength="50"
placeholder="请输入标题"></el-input>
</el-form-item>
<el-form-item label="回复内容" prop="content">
<el-input
v-model="ruleForm.content"
type="textarea"
:rows="8"
show-word-limit
maxlength="500"
placeholder="请输入回复内容"></el-input>
</el-form-item>
</el-form>
<template #footer>
<div class="apaas_button">
<el-button type="default" @click="dialogQuestionEdit = false">取消</el-button>
<el-button type="primary" @click="handleSaveCategory(bgForm)">保存</el-button>
</div>
</template>
</el-dialog>
<el-dialog
class="dialog_box"
title="提示"
v-model="dialogDelete"
width="400px"
:before-close="
() => {
dialogDelete = false;
}
">
<div>确定要删除吗?</div>
<template #footer>
<div class="apaas_button">
<el-button type="default" @click="dialogDelete = false">取 消</el-button>
<el-button type="primary" @click="deleteData">确 定</el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script setup>
import { onMounted, reactive, toRefs, ref } from "vue";
import bgBreadcrumb from "@/components/bg-breadcrumb.vue";
import { useRoute } from "vue-router";
import axios from "@/request/http.js";
import { ElMessage } from "element-plus";
const route = useRoute();
const { id } = route.query;
const bgForm = ref(null);
const state = reactive({
category: {},
tableRows: [],
// filter: {
// page: 1,
// limit: 10,
// },
headers: [
{
label: "标题",
prop: "title",
width: 180,
},
{
label: "回复内容",
prop: "content",
},
{
label: "操作",
prop: "action",
width: 260,
fixed: "right",
},
],
questionEditType: "",
dialogQuestionEdit: false,
ruleForm: {
title: "",
content: "",
},
rules: {
title: [{ required: true, message: "请输入标题", trigger: "blur" }],
content: [{ required: true, message: "请输入回复内容", trigger: "blur" }],
},
dialogDelete: false,
actionRow: null,
});
const handleDeleteDialog = (row) => {
state.actionRow = row;
state.dialogDelete = true;
};
const deleteData = () => {
axios.delete(`/apaas/system/v5/customer/service/problem/${state.actionRow.id}`).then(({ data }) => {
if (data.code === 200) {
ElMessage.success("操作成功");
getCategoryWithQuestions();
state.dialogDelete = false;
} else {
ElMessage.error(data.data);
}
});
};
const handleQuestionUpdate = (type, row) => {
state.dialogQuestionEdit = true;
state.questionEditType = type;
if (type !== "create") {
state.actionRow = row;
state.ruleForm.title = row.problem_type;
}
};
const handleSaveCategory = async (formEl) => {
if (!formEl) return;
await formEl.validate((valid, fields) => {
if (valid) {
const isNew = state.questionEditType === "create";
axios
.post(
"/apaas/system/v5/customer/service/problem",
Object.assign(
{
problem_type_id: state.category.problem_type_id,
title: state.ruleForm.title,
content: state.ruleForm.content,
},
!isNew && { id: actionRow.id }
)
)
.then(({ data }) => {
if (data.code === 200) {
getCategoryWithQuestions();
ElMessage.success("添加成功");
state.dialogQuestionEdit = false;
state.ruleForm.title = "";
state.ruleForm.content = "";
} else {
ElMessage.error(data.data);
}
});
} else {
console.log("error submit!", fields);
}
});
};
const getCategoryList = () => {
axios.get(`/apaas/system/v5/customer/service/problem/type`).then((res) => {
if (res.data.code == 200) {
const [category] = res.data.data.filter((item) => item.id.toString() === id);
state.category = category;
} else {
ElMessage.error(res.data.data);
}
});
};
const getQuestionList = () => {
axios.get(`/apaas/system/v5/customer/service/problem/${id}`).then(({ data }) => {
state.tableRows = data.data || [];
if (state.tableRows.length > 0) {
state.tableRows.forEach((e) => {
e.canMoveUp = true;
e.canMoveDown = true;
});
state.tableRows[0].canMoveUp = false;
state.tableRows[state.tableRows.length - 1].canMoveDown = false;
}
});
};
const moveRow = (row, type) => {
let index;
state.tableRows.forEach((e, i) => {
if (e.id == row.id) {
index = i;
}
});
let nextRow;
if (type == 1) {
// 上移
nextRow = state.tableRows[index - 1];
} else {
// 下移
nextRow = state.tableRows[index + 1];
}
let params = [
{
id: row.id,
sort: nextRow.sort,
},
{
id: nextRow.id,
sort: row.sort,
},
];
axios
.post(`/apaas/system/v5/customer/service/problem/sort`, [...params])
.then((res) => {
if (res.data.code == 200) {
ElMessage.success("操作成功");
getCategoryWithQuestions();
} else {
ElMessage.error(res.data.data);
}
})
.catch((err) => {
console.log(err);
});
};
const getCategoryWithQuestions = () => {
getCategoryList();
getQuestionList();
};
onMounted(() => {
getCategoryWithQuestions();
});
const { category, tableRows, headers, ruleForm, rules, questionEditType, dialogQuestionEdit, dialogDelete } =
toRefs(state);
</script>
<style lang="scss" scoped>
.detail_container {
width: 100%;
padding: 0 24px;
height: 100%;
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: stretch;
font-size: 14px;
.main_container {
padding: 40px;
flex-grow: 1;
width: 100%;
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: stretch;
background-color: #fff;
box-shadow: 0px 1px 4px 0px rgba(0, 7, 101, 0.15);
border-radius: 6px;
margin: 0 0 16px;
position: relative;
height: calc(100% - 62px);
.table_container {
height: calc(100% - 70px);
padding: 0 16px;
.table {
max-height: calc(100% - 64px);
}
}
}
}
.question-box {
height: 100%;
.el-button {
margin: 40px 0 8px;
}
}
:deep(.el-dialog__body) {
padding-bottom: 0;
}
</style>
<template>
<el-form
:label-position="'right'"
label-width="120px"
:model="contactForm"
:rules="contactFormRules"
ref="contactRef"
style="max-width: 66%">
<el-form-item label="联系人姓名" prop="contact_name">
<el-input v-model="contactForm.contact_name" />
</el-form-item>
<el-form-item label="联系人手机号" prop="contact_phone">
<el-input v-model="contactForm.contact_phone" />
</el-form-item>
<el-form-item label="联系人邮箱" prop="contact_email">
<el-input v-model="contactForm.contact_email" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input type="textarea" :rows="3" v-model="contactForm.remark" show-word-limit maxlength="300" />
</el-form-item>
</el-form>
</template>
<script setup>
import { reactive, ref, onMounted } from "vue";
const contactForm = reactive({
contact_name: "",
contact_phone: "",
contact_email: "",
remark: "",
});
const props = defineProps({
formType: {
type: Boolean,
default: false, //false 新增 true 编辑
},
id: {
type: String,
default: "",
},
});
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 checkName = (rule, value, callback) => {
var reg = /^[a-zA-Z0-9\u4e00-\u9fa5]+$/;
if (!reg.test(value)) {
callback(new Error("只能输入字母、数字和汉字"));
} else {
callback();
}
};
const contactFormRules = reactive({
contact_name: [
{ required: true, message: "请输入联系人姓名", trigger: "blur" },
{ max: 50, message: "联系人姓名最大长度为50个字符", trigger: "blur" },
{ validator: checkName, trigger: "blur" },
],
contact_phone: [
{ required: true, message: "请输入联系人手机号", trigger: "blur" },
{ validator: checkPhone, trigger: "blur" },
],
contact_email: [
{ type: "email", message: "请输入正确的邮箱", trigger: "blur" },
{ max: 100, message: "邮箱最大长度为100个字符", trigger: "blur" },
],
});
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) => {
Object.assign(contactForm, data);
};
onMounted(() => {});
defineExpose({ submitForm, clearForm, setForm });
</script>
<template>
<div class="page_container">
<bg-breadcrumb></bg-breadcrumb>
<div class="page_content flex_cloumn">
<div class="content_top apaas_scroll">
<div class="content_process">
<div>
<el-steps :active="step">
<el-step title="" :class="{ process_complete: step > 1 }">
<template #icon>
<span class="process_desc">
<span class="icon_box" v-if="step > 0"
><bg-icon class="step_icon" icon="#bg-ic-file"></bg-icon
></span>
<span class="circle" v-else></span>
业务系统信息
</span>
</template>
</el-step>
<el-step title="" :class="{ process_complete: step > 2 }">
<template #icon>
<span class="process_desc">
<span class="icon_box" v-if="step > 1"
><bg-icon class="step_icon" icon="#bg-ic-file-staff"></bg-icon
></span>
<span class="circle" v-else></span>
联系人信息
</span>
</template>
</el-step>
<el-step title="">
<template #icon>
<span class="process_desc">
<span class="icon_box" v-if="step > 2"
><bg-icon class="step_icon" icon="#bg-ic-file-success"></bg-icon
></span>
<span class="circle" v-else></span>
完成
</span>
</template>
</el-step>
</el-steps>
</div>
</div>
<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>
<contactForm
v-show="step === 2"
ref="contactFormRef"
:id="route.query.id"
@action="getContactFormData"></contactForm>
<div class="process_end" v-show="step === 3">
<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 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">
<el-button @click="cancel">取消</el-button>
<el-button type="primary" @click="nextStep">下一步</el-button>
</div>
<div v-show="step === 2">
<el-button @click="cancel">取消</el-button>
<el-button type="primary" @click="previousStep">上一步</el-button>
<el-button type="primary" @click="submit">保存</el-button>
</div>
</div>
</div>
</div>
</template>
<script setup>
import { useRoute, useRouter } from "vue-router";
import systemForm from "./system-form.vue";
import contactForm from "./contact-form.vue";
import { reactive, ref, onBeforeMount, toRefs, computed, onBeforeUnmount, onMounted } from "vue";
import CryptoJS from "crypto-js";
import axios from "@/request/http.js";
import { ElMessage } from "element-plus";
import bgBreadcrumb from "@/components/bg-breadcrumb.vue";
const route = useRoute();
const router = useRouter();
const step = ref(1);
const systemFormRef = ref(null);
const contactFormRef = ref(null);
const formData = reactive({
organization_id: "",
business_code: "",
business_name: "",
business_desc: "",
logo: "",
system_role_id: "",
system_account: "",
system_phone: "",
password: "",
confirm_password: "",
access_address: "",
develop_id: "",
state: 1,
contact_name: "",
contact_phone: "",
contact_email: "",
remark: "",
}); //业务系统表单+联系人表单
const successFlag = ref(false);
// 下一步
const nextStep = () => {
systemFormRef.value.submitForm();
};
//业务系统表单检验触发事件 data为null 校验失败
const getSystemFormData = (data) => {
if (data) {
Object.assign(formData, data);
step.value = 2;
} else {
}
};
//联系人表单检验触发事件 data为null 校验失败
const getContactFormData = (data) => {
if (data) {
Object.assign(formData, data);
if (route.query.id) {
console.log(formData);
let params = {
...formData,
id: parseInt(route.query.id),
logo: formData.logo && formData.logo.length > 0 ? formData.logo[0].url : "",
};
axios.post(`/apaas/system/v5/user/update`, params).then((res) => {
if (res.data.code == 200) {
successFlag.value = true;
step.value = 3;
} else {
ElMessage.error(res.data.data);
}
});
} else {
let params = {
...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) => {
if (res.data.code == 200) {
successFlag.value = true;
step.value = 3;
} else {
ElMessage.error(res.data.data);
}
});
}
}
};
//上一步
const previousStep = () => {
step.value--;
};
//提交表单
const submit = () => {
contactFormRef.value.submitForm();
};
//继续创建 清空表单
const continueCreate = () => {
systemFormRef.value.clearForm();
contactFormRef.value.clearForm();
step.value = 1;
successFlag.value = false;
};
//取消
const cancel = () => {
// router.go(-1);
router.push({
path: "/develop/account",
query: {
id: formData.organization_id,
},
});
};
const getDetail = () => {
axios.get(`/apaas/system/v5/user/detail/${route.query.id}`).then((res) => {
if (res.data.code == 200) {
const form = res.data.data;
systemFormRef.value.setForm({
organization_id: form.organization_id,
system_role_id: form.system_role_id,
logo: form.logo ? [{ url: form.logo }] : [],
business_code: form.business_code,
business_name: form.business_name,
business_desc: form.business_desc,
system_account: form.system_account,
system_phone: form.system_phone,
access_address: form.access_address,
develop_id: form.develop_id,
state: form.state,
appid: form.app_id,
appsecret: form.app_secret,
});
contactFormRef.value.setForm({
contact_name: form.contact_name,
contact_phone: form.contact_phone,
contact_email: form.contact_email,
remark: form.remark,
});
} else {
ElMessage.error(res.data.data);
}
});
};
onBeforeUnmount(() => {});
onMounted(() => {
if (route.query.id) {
getDetail();
}
});
</script>
<style scoped>
.flex_cloumn {
display: flex;
flex-direction: column;
}
.content_top {
flex: 1;
display: flex;
flex-direction: column;
overflow: auto;
}
/* .content_top::-webkit-scrollbar {
width: 5px;
height: 0px;
}
.content_top::-webkit-scrollbar-thumb {
background: #dedede;
border-radius: 10px;
height: 0px;
}
.content_top::-webkit-scrollbar-track {
background: transparent;
border-radius: 2px;
} */
.content_bottom {
height: 68px;
line-height: 68px;
text-align: right;
padding: 0 20px;
border-top: 1px solid #e6e9ef;
}
.content_process {
border-bottom: 1px solid #e6e9ef;
padding: 38px 16%;
}
.content_main {
flex: 1;
padding: 30px;
box-sizing: border-box;
}
.process_desc {
background-color: #fff;
display: inline-block;
position: absolute;
padding: 0 5px;
font-size: 18px;
color: #202531;
font-weight: bold;
}
.process_desc img {
height: 25px;
width: 25px;
vertical-align: middle;
}
.process_end {
height: 100%;
display: flex;
justify-content: center;
align-items: center;
}
.process_end div {
text-align: center;
}
.step_icon {
color: #fff;
font-weight: 600;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.icon_box {
display: inline-block;
background-color: #2b4695;
width: 48px;
height: 48px;
border-radius: 99px;
position: relative;
border: 3px solid #b0bee8;
vertical-align: middle;
}
.circle {
display: inline-block;
background-color: #a9b1c7;
width: 24px;
height: 24px;
border-radius: 99px;
position: relative;
border: 4px solid #e6e9ef;
vertical-align: middle;
}
.content_process :deep() .el-step.is-horizontal .el-step__line {
height: 4px;
}
.content_process :deep() .el-step__head.is-finish .el-step__line {
background: linear-gradient(to right, #2b4695 50%, #e6e9ef 50%);
}
.process_complete :deep() .el-step__head.is-finish .el-step__line {
background: linear-gradient(to right, #2b4695 100%, #e6e9ef 0%);
}
</style>
This diff is collapsed.
<template>
<div class="page_container">
<bg-breadcrumb></bg-breadcrumb>
<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 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="baseInfo"></bg-info>
</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 :data="contactInfo"></bg-info>
</div>
</div>
</div>
</div>
</div>
</template>
<script setup>
import { reactive, toRefs, ref, onBeforeMount } from "vue";
import { useRoute, useRouter } from "vue-router";
import axios from "@/request/http.js";
import { ElMessage } from "element-plus";
import bgBreadcrumb from "@/components/bg-breadcrumb.vue";
const route = useRoute();
const baseInfo = reactive([
{
name: "所属组织",
value: "",
nameWidth: 130,
},
{
name: "业务系统编码",
value: "",
nameWidth: 130,
},
{
name: "业务系统名称",
value: "",
nameWidth: 130,
},
{
name: "账号",
value: "",
nameWidth: 130,
},
{
name: "AppID",
value: "",
nameWidth: 130,
},
{
name: "AppSecret",
value: "",
copy_icon: true,
secret: true,
nameWidth: 130,
},
{
name: "创建人",
value: "",
nameWidth: 130,
},
{
name: "创建时间",
value: "",
nameWidth: 130,
},
{
name: "是否启用",
value: "",
state: "",
nameWidth: 130,
},
{
name: "开发厂商名称",
value: "",
nameWidth: 130,
},
{
name: "访问地址",
value: "",
full: true,
nameWidth: 130,
},
{
name: "业务系统描述",
value: "",
full: true,
nameWidth: 130,
},
]);
const contactInfo = reactive([
{
name: "联系人姓名",
value: "",
nameWidth: 130,
},
{
name: "联系人手机号",
value: "",
nameWidth: 130,
},
{
name: "联系人邮箱",
value: "",
full: true,
nameWidth: 130,
},
{
name: "备注",
value: "",
full: true,
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 + "(" + (detail.created_user_role ? detail.created_user_role.join("") : "") + ")";
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_name;
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 {
ElMessage.error(res.data.data);
}
});
};
onBeforeMount(() => {
getDetail();
});
</script>
<style scoped>
.page_content {
padding: 15px;
overflow: auto;
}
.info_content {
display: flex;
}
.info_row {
margin-bottom: 40px;
}
.img_box {
width: 120px;
}
.info_box {
width: 60%;
}
.title {
font-size: 18px;
color: #1a1a1a;
font-weight: bold;
margin-bottom: 10px;
display: flex;
align-items: center;
}
.dashed_line {
flex: 1;
height: 1px;
margin: 0 10px;
border-bottom: dashed 1px #dadee7;
}
.icon_box {
display: inline-block;
width: 4px;
height: 14px;
background-color: #3759be;
border-radius: 2px;
margin-right: 5px;
}
</style>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
import $axios from "@/request/http";
export const topId = "00000000-0000-0000-0000-000000000000";
export const $imgAdd = function (args, editorRef) {
const [pos, $file] = args;
const formdata = new FormData();
formdata.append("file", $file);
formdata.append("directory", "image");
$axios
.post("/apaas/common/image/upload", formdata, {
headers: { "Content-Type": "multipart/form-data" },
})
.then(({ data }) => {
editorRef.$img2Url(pos, data.data);
});
};
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