场景中心修改

This commit is contained in:
caorui 2025-05-30 19:59:25 +08:00
parent 8991490409
commit 2215356adb
4 changed files with 1499 additions and 118 deletions

View File

@ -0,0 +1,241 @@
<template>
<base-right-dialog
@handleClose="examineHandleClose"
@handleConfirmClick="handleConfirmClick"
:dialogVisible="dialogVisible"
size="500px"
:appendBody="true"
:loading="true"
:footerShow="true"
:submitShow="true"
:submitTitle="'保存'"
title="新增应用账号授权"
>
<div class="rightDialogClass_main" style="background: #fff; padding: 10px">
<base-form
style="padding-top: 0 !important"
spanWidth="130px"
ref="customForm"
:formRow="accountFormRow"
:isFunBtn="false"
:rules="accountRules"
alignAt="block"
:span="24"
>
</base-form>
</div>
</base-right-dialog>
</template>
<script>
import { authApi } from "@/api/apis/auth";
import baseRightDialog from "@/components/base/baseRightDialog/index.vue";
import baseForm from "@/components/base/baseNewForm";
export default {
components: {
baseRightDialog,
baseForm,
},
data() {
return {
dialogVisible: false,
accountFormRow: [
{
elCol: [
{
label: "账号名称",
prop: "name",
tag: "elInput",
span: 24,
},
],
},
{
elCol: [
{
label: "登录账号",
prop: "userName",
tag: "elInput",
span: 24,
},
],
},
{
elCol: [
{
label: "登录密码",
prop: "password",
tag: "elInput",
span: 24,
},
],
},
{
elCol: [
{
label: "数据库类型",
prop: "dbType",
tag: "elSelect",
options: [],
optionValue: "columnContent",
optionLabel: "columnValue",
span: 24,
},
],
},
{
elCol: [
{
label: "数据库名称",
prop: "dbName",
tag: "elInput",
span: 24,
},
],
},
{
elCol: [
{
label: "ip地址",
prop: "ipAddress",
tag: "elInput",
span: 24,
},
],
},
{
elCol: [
{
label: "端口",
prop: "port",
tag: "elInput",
span: 24,
},
],
},
],
accountRules: {
name: [
{
required: true,
message: "请输入",
trigger: "change, blur",
},
],
userName: [
{
required: true,
message: "请输入",
trigger: "change, blur",
},
],
password: [
{
required: true,
message: "请输入",
trigger: "change, blur",
},
],
dbType: [
{
required: true,
message: "请选择",
trigger: "change, blur",
},
],
dbName: [
{
required: true,
message: "请输入",
trigger: "change, blur",
},
],
ipAddress: [
{
required: true,
message: "请输入",
trigger: "change, blur",
},
],
port: [
{
required: true,
message: "请输入",
trigger: "change, blur",
},
],
},
appID: "",
accountType: "",
};
},
methods: {
openDialog(appID) {
this.queryDictionaryList();
this.appID = appID;
this.dialogVisible = true;
this.$nextTick(() => {
this.$refs.customForm?.resetFields("ruleForm");
});
},
async queryDictionaryList() {
let params = {
tabName: "sys_flow_step_account",
columnName: "db_type",
};
let res = await authApi(
"sysdictionaryshopnewService",
"",
"queryDictionaryList",
"",
params
);
if (res.status == 200) {
this.accountFormRow[3].elCol[0].options = res.attribute;
}
},
handleConfirmClick() {
this.$refs.customForm.$refs["ruleForm"].validate((valid) => {
if (valid) {
let params = {
...this.$refs.customForm.ruleForm,
appId: this.appID,
};
this.SaveAccountData(params);
} else {
this.$message({ message: "请选择必填项", type: "warning" });
return;
}
});
},
async SaveAccountData(params) {
let res = await authApi(
"sysApplicationAccountService",
"",
"saveAccount",
"",
params
);
if (res.status == "200") {
this.$vmNews("新增账号成功", "success");
this.dialogVisible = false;
this.$emit("handleConfirmClick");
}
},
examineHandleClose() {
this.dialogVisible = false;
},
},
};
</script>
<style scoped lang="scss">
::v-deep .el-form-item__content {
width: 100% !important;
}
::v-deep .label {
text-align: left !important;
}
</style>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1748587059398" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6748" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M486.691591 738.679719c0 114.043383-92.448552 206.490911-206.490911 206.490911S73.708745 852.723102 73.708745 738.679719c0-114.042359 92.449575-206.490911 206.491934-206.490911L417.860946 532.188808l68.830645 0 0 68.830645L486.691591 738.679719 486.691591 738.679719zM532.579711 738.679719c0 114.043383 92.448552 206.490911 206.490911 206.490911s206.490911-92.447529 206.490911-206.490911c0-114.042359-92.448552-206.490911-206.490911-206.490911L601.410356 532.188808l-68.830645 0 0 68.830645L532.579711 738.679719 532.579711 738.679719zM486.691591 279.8108c0-114.043383-92.448552-206.490911-206.490911-206.490911S73.708745 165.767418 73.708745 279.8108s92.449575 206.490911 206.491934 206.490911L417.860946 486.301711l68.830645 0L486.691591 417.471067 486.691591 279.8108 486.691591 279.8108zM532.579711 279.8108 532.579711 279.8108c0-114.043383 92.448552-206.490911 206.490911-206.490911s206.490911 92.448552 206.490911 206.490911-92.448552 206.490911-206.490911 206.490911L601.410356 486.301711l-68.830645 0L532.579711 417.471067 532.579711 279.8108 532.579711 279.8108z" fill="#f18709" p-id="6749"></path></svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -524,14 +524,14 @@ export default {
// //
getFuncBtn(btnEven) { getFuncBtn(btnEven) {
if (btnEven.menuName == "新增") { if (btnEven.menuName == "新增") {
this.$refs.addDialogChunk.openDialog( // this.$refs.addDialogChunk.openDialog(
"-4252471217359269890", // "-4252471217359269890",
"3-33003", // "3-33003",
"add", // "add",
3 // 3
); // );
// this.$refs.addSence.openDialog("", "add", this.projectClassificationID); this.$refs.addSence.openDialog("", "add", this.projectClassificationID);
} }
}, },
//hyt 2024/08/14 //hyt 2024/08/14
@ -560,9 +560,9 @@ export default {
// //
viewChunkData(row) { viewChunkData(row) {
this.$refs.viewDialogChunk.openDialog( this.$refs.viewDialogChunk.openDialog(
row.sceneID, row.id,
row.sceneName, row.name,
row.triggerMode, row.triggerModeId,
row row
); );
}, },