fix: modify

catl
时启龙 2024-11-15 10:43:32 +08:00
parent 75776a12c0
commit db23e78c12
1 changed files with 56 additions and 66 deletions

View File

@ -23,78 +23,68 @@
</basic-form-item>
</el-col>
</el-row>
<el-row>
<el-row v-if="!isTemplate">
<el-col :span="24" class="line"></el-col>
<el-col :span="24" class="title">
创建用户
<el-button v-if="!isPreview" class="m-l" type="primary" size="mini" @click="addUser(itemData.rabbitmq_users)"></el-button>
</el-col>
</el-row>
<div v-for="(item, index) in itemData.rabbitmq_users" :key="index" class="search-container">
<el-button type="text" v-if="!isPreview" class="del_operate" @click="removeItem(itemData.rabbitmq_users, index, 'required')">
<i class="el-icon-delete" />
</el-button>
<el-row v-if="isTaskInstance" key="edit">
<el-col :span="12">
<basic-form-item label="用户:" :prop="'rabbitmq_users.' + index + '.user'" validate="required">
<el-input v-model="item.user"></el-input>
</basic-form-item>
</el-col>
<el-col :span="12">
<basic-form-item label="密码:" :prop="'rabbitmq_users.' + index + '.password'" validate="required" required-message="">
<el-input type="password" v-model="item.password" show-password></el-input>
</basic-form-item>
</el-col>
</el-row>
<el-row v-else key="template">
<el-col :span="12">
<basic-form-item label="用户:" :prop="'rabbitmq_users.' + index + '.user'">
<el-input v-model="item.user"></el-input>
</basic-form-item>
</el-col>
<el-col :span="12">
<basic-form-item label="密码:" :prop="'rabbitmq_users.' + index + '.password'" required-message="">
<el-input type="password" v-model="item.password" show-password></el-input>
</basic-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<basic-form-item label="标签:" prop="tags">
<el-input v-model="item.tags" auto-complete="off" :disabled="isPreview"></el-input>
</basic-form-item>
</el-col>
<el-col :span="12">
<basic-form-item label="配置权限:" prop="configure_priv">
<el-input v-model="item.configure_priv" auto-complete="off" :disabled="isPreview"></el-input>
</basic-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<basic-form-item label="读权限:" prop="read_priv">
<el-input v-model="item.read_priv" auto-complete="off" :disabled="isPreview"></el-input>
</basic-form-item>
</el-col>
<el-col :span="12">
<basic-form-item label="写权限:" prop="write_priv">
<el-input v-model="item.write_priv" auto-complete="off" :disabled="isPreview"></el-input>
</basic-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<basic-form-item label="vhost" prop="vhost">
<el-input v-model="item.vhost"></el-input>
</basic-form-item>
</el-col>
<el-col :span="12">
<basic-form-item label="是否为管理员:" prop="is_admin" label-width="120px">
<el-switch v-model="item.is_admin" @change="switchAdmin(index)"></el-switch>
</basic-form-item>
</el-col>
</el-row>
</div>
<template v-if="!isTemplate">
<div v-for="(item, index) in itemData.rabbitmq_users" :key="index" class="search-container">
<el-button type="text" v-if="!isPreview" class="del_operate" @click="removeItem(itemData.rabbitmq_users, index, 'required')">
<i class="el-icon-delete" />
</el-button>
<el-row>
<el-col :span="12">
<basic-form-item label="用户:" :prop="'rabbitmq_users.' + index + '.user'" validate="required">
<el-input v-model="item.user"></el-input>
</basic-form-item>
</el-col>
<el-col :span="12">
<basic-form-item label="密码:" :prop="'rabbitmq_users.' + index + '.password'" validate="required" required-message="">
<el-input type="password" v-model="item.password" show-password></el-input>
</basic-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<basic-form-item label="标签:" prop="tags">
<el-input v-model="item.tags" auto-complete="off" :disabled="isPreview"></el-input>
</basic-form-item>
</el-col>
<el-col :span="12">
<basic-form-item label="配置权限:" prop="configure_priv">
<el-input v-model="item.configure_priv" auto-complete="off" :disabled="isPreview"></el-input>
</basic-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<basic-form-item label="读权限:" prop="read_priv">
<el-input v-model="item.read_priv" auto-complete="off" :disabled="isPreview"></el-input>
</basic-form-item>
</el-col>
<el-col :span="12">
<basic-form-item label="写权限:" prop="write_priv">
<el-input v-model="item.write_priv" auto-complete="off" :disabled="isPreview"></el-input>
</basic-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<basic-form-item label="vhost" prop="vhost">
<el-input v-model="item.vhost"></el-input>
</basic-form-item>
</el-col>
<el-col :span="12">
<basic-form-item label="是否为管理员:" prop="is_admin" label-width="120px">
<el-switch v-model="item.is_admin" @change="switchAdmin(index)"></el-switch>
</basic-form-item>
</el-col>
</el-row>
</div>
</template>
<el-row>
<el-col :span="24" class="line"></el-col>
<el-col :span="24" class="title">