fix: modify
parent
75776a12c0
commit
db23e78c12
|
@ -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">
|
||||
|
|
Loading…
Reference in New Issue