diff --git a/src/assets/css/index.css b/src/assets/css/index.css
index 76fbdd61293a785139b1317d75d8a67af0bd6ad1..57b282d9032c42c29746592a026ed006866c8b8f 100644
--- a/src/assets/css/index.css
+++ b/src/assets/css/index.css
@@ -1513,6 +1513,11 @@ border-radius:8px;
font-weight: bold;
margin-bottom: 20px;
}
+.header_info {
+ font-size: 14px;
+ color: #404a62;
+ padding-left: 20px;
+}
.name_btn {
color: #3759be;
cursor: pointer;
@@ -1527,3 +1532,11 @@ border-radius:8px;
font-size: 14px;
color: #404a62;
}
+.icon_eye {
+ font-size: 12px;
+ color: #a9b1c7;
+ margin-right: 8px;
+ vertical-align: baseline;
+ cursor: pointer;
+}
+
diff --git a/src/bg-ui/bg-table-btns-more.vue b/src/bg-ui/bg-table-btns-more.vue
index c24d3e1704e7c6587ef93c4f988fb97e39b9b602..a739e6d37fcea720785d0c7c7fd3f61f4e21cf1c 100644
--- a/src/bg-ui/bg-table-btns-more.vue
+++ b/src/bg-ui/bg-table-btns-more.vue
@@ -38,6 +38,7 @@ export default {
}
},
clickAction({ callback }) {
+ this.$parent.hideBox()
typeof callback === "function" && callback();
},
getName({ name }) {
diff --git a/src/bg-ui/bg-table-btns.vue b/src/bg-ui/bg-table-btns.vue
index 2849bdab0cc851aec72e0a5ecd23432615b0fae1..53e6fe18e43a1574f3c270d6c908cede0c421ac5 100644
--- a/src/bg-ui/bg-table-btns.vue
+++ b/src/bg-ui/bg-table-btns.vue
@@ -53,6 +53,9 @@ export default {
},
},
methods: {
+ hideBox() {
+ this.showMore = false
+ },
isDisabled({ disabled }) {
if (typeof disabled === "function") {
return disabled();
diff --git a/src/bg-ui/bg-upload-image.vue b/src/bg-ui/bg-upload-image.vue
index dfe1d14ca8befa87a283742854382dee87b58cf3..1ed93f55d79b99015d811863c388ef8260e8a7ed 100644
--- a/src/bg-ui/bg-upload-image.vue
+++ b/src/bg-ui/bg-upload-image.vue
@@ -59,7 +59,7 @@ export default {
},
action: {
type: String,
- default: "/apaas/static/image/upload",
+ default: "/apaas/common/file/upload",
},
autoUpload: {
type: Boolean,
diff --git a/src/bg-ui/index.scss b/src/bg-ui/index.scss
index 7b31c81ed62778a03e43faf168ba02acdcf4337f..380b31ad9407adc2138d8a905e9f54b94aec2ca2 100644
--- a/src/bg-ui/index.scss
+++ b/src/bg-ui/index.scss
@@ -2045,6 +2045,7 @@ a {
background-color: #2b4695;
cursor: pointer;
user-select: none;
+ transition: all .3s;
> .label {
font-size: 12px;
diff --git a/src/page/main/config/dict/index.vue b/src/page/main/config/dict/index.vue
index 25641aa2e1c9762e4a6f940bdf0133930732d918..5f7d8d060d4d0df55a06f31942bcc689a5562c36 100644
--- a/src/page/main/config/dict/index.vue
+++ b/src/page/main/config/dict/index.vue
@@ -56,7 +56,7 @@
-
+
-
-
业务系统新增成功
+
+

+

+
+
{{route.query.id ? (successFlag ? '业务系统编辑成功' : '业务系统编辑失败') : (successFlag ? '业务系统新建成功' : '业务系统新建失败')}}
返回列表
-
继续创建
+
继续创建
@@ -78,30 +81,35 @@
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 { reactive, ref,onBeforeMount,toRefs,computed, onBeforeUnmount, onMounted, getCurrentInstance } from 'vue';
+import CryptoJS from "crypto-js";
+const { proxy } = getCurrentInstance()
+const { $axios,$message } = proxy
const route = useRoute();
const router = useRouter();
const step = ref(1);
const systemFormRef = ref(null);
const contactFormRef = ref(null);
const formData = reactive({
- org: '',
- code: '',
- name: '',
- desc: '',
+ organization_id: '',
+ business_code: '',
+ business_name: '',
+ business_desc: '',
logo: '',
- role: '',
- account: '',
+ system_role_id: '',
+ system_account: '',
password: '',
- url: '',
- firm_name: '',
- is_use: '',
- contact_user: '',
- phone: '',
- email: '',
+ confirm_password: '',
+ access_address: '',
+ develop_id: '',
+ state: 1,
+
+ contact_name: '',
+ contact_phone: '',
+ contact_email: '',
remark: '',
}); //业务系统表单+联系人表单
+const successFlag = ref(false)
// 下一步
const nextStep = () => {
@@ -116,12 +124,64 @@ const getSystemFormData = (data) => {
}
}
-//联系人表单检验触发事件 data为null 校验失败
+//联系人表单检验触发事件 data为null 校验失败
const getContactFormData = (data) => {
+
if(data) {
formData.value = Object.assign(formData,data);
- console.log(formData);
- step.value = 3;
+ if(route.query.id) {
+ console.log(formData)
+ let params = {
+ id: parseInt(route.query.id),
+ business_name: formData.value.business_name,
+ system_account: formData.value.system_account,
+ contact_email: formData.value.contact_email,
+ contact_phone: formData.value.contact_phone,
+ contact_name: formData.value.contact_name,
+ logo: formData.value.logo && formData.value.logo.length > 0 ? formData.value.logo[0].url : '',
+ state: formData.value.state,
+ business_desc: formData.value.business_desc,
+ develop_id: formData.value.develop_id,
+ access_address: formData.value.access_address,
+ remark: formData.value.remark
+ }
+ $axios.post(`/apaas/system/v5/user/update`,params)
+ .then((res) => {
+ if (res.data.code == 200) {
+ successFlag.value = true;
+ step.value = 3;
+ }else {
+ $message.error(res.data.msg)
+ }
+ })
+ }else {
+ let params = {
+ organization_id: formData.value.organization_id,
+ system_role_id: "ab98a936-9046-455b-aba3-4c73671024d0",
+ logo: formData.value.logo && formData.value.logo.length > 0 ? formData.value.logo[0].url : '',
+ password: CryptoJS.AES.encrypt(formData.value.password,"swuE9cmCZQwrkYRV").toString(),
+ business_code: formData.value.business_code,
+ business_name: formData.value.business_name,
+ business_desc: formData.value.business_desc,
+ system_account: formData.value.system_account,
+ access_address: formData.value.access_address,
+ develop_id: formData.value.develop_id,
+ state: formData.value.state,
+ contact_name: formData.value.contact_name,
+ contact_phone: formData.value.contact_phone,
+ contact_email: formData.value.contact_email,
+ remark: formData.value.remark,
+ }
+ $axios.put(`/apaas/system/v5/user/create`,params)
+ .then((res) => {
+ if (res.data.code == 200) {
+ successFlag.value = true;
+ step.value = 3;
+ }else {
+ $message.error(res.data.msg)
+ }
+ })
+ }
}
}
//上一步
@@ -137,42 +197,54 @@ const continueCreate = () => {
systemFormRef.value.clearForm();
contactFormRef.value.clearForm();
step.value = 1;
+ successFlag = false;
}
//取消
const cancel = () => {
router.go(-1);
}
-onBeforeUnmount(()=>{
-
-})
-onMounted(() => {
- if(route.query.type === "1") {
- setTimeout(()=> {
- systemFormRef.value.setForm({
- org: 'a',
- code: 'b',
- name: 'b',
- desc: 'b',
- logo: ['b'],
- role: 'b',
- account: 'b',
- password: 'b',
- confirm_password: 'b',
- url: 'b',
- firm_name: 'b',
- is_use: 'b',
-
- })
+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: [{url:form.logo}],
+ business_code: form.business_code,
+ business_name: form.business_name,
+ business_desc: form.business_desc,
+ system_account: form.system_account,
+ 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_user: 'c',
- phone: 'c',
- email: 'c',
- remark: 'c',
+ contact_name: form.contact_name,
+ contact_phone: form.contact_phone,
+ contact_email: form.contact_email,
+ remark: form.remark,
})
- },500)
+ }else {
+ $message.error(res.data.msg)
+ }
+ })
}
-})
+
+ onBeforeUnmount(()=>{
+
+ })
+ onMounted(() => {
+ if(route.query.id) {
+ getDetail()
+ }
+ })
diff --git a/src/page/main/develop/account/add/system-form.vue b/src/page/main/develop/account/add/system-form.vue
index 6980b6fc81a3b7e1345380defeef3324f7086ea5..85f047f18f9ede03d925b4701ccfa8004d529688 100644
--- a/src/page/main/develop/account/add/system-form.vue
+++ b/src/page/main/develop/account/add/system-form.vue
@@ -7,63 +7,94 @@
ref="systemRef"
style="max-width: 66%"
>
-
-
+
+
-
-
+
+
-
-
+
+
+
+
+
+ 复制
+
+
+
+ 复制
+ 重置
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
+
+
+
+
-
-
+
+
+
+
+
+
-
-
+
+
-
-
+
+
-
-
+
+