| | |
| | | <el-input v-model="form.description" :rows="2" type="textarea"></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="centerForm" style="width: 24%"> |
| | | <el-form-item label="版本规则:" label-width="110px" prop="revLevel"> |
| | | <el-select v-model="form.revLevel" @change="revLevelChange"> |
| | | <el-option label="不可修订" value="0"></el-option> |
| | | <el-option label="采用一级版本管理" value="1"></el-option> |
| | | <el-option label="采用二级版本管理" value="2"></el-option> |
| | | </el-select> |
| | | <div class="centerForm" style="width: 26%"> |
| | | <el-form-item label="版本规则:" label-width="100px" prop="revLevel" style="margin-bottom: 10px;"> |
| | | <el-radio v-model="form.revLevel" label="0" @input="revLevelChange">不可修订</el-radio><br> |
| | | <el-radio v-model="form.revLevel" label="1" @input="revLevelChange">采用一级版本管理</el-radio><br> |
| | | <el-radio v-model="form.revLevel" label="2" @input="revLevelChange">采用二级版本管理</el-radio> |
| | | </el-form-item> |
| | | <el-form-item v-if="form.revLevel !== '0'" label="版本号规则:" label-width="110px" prop="revisionRuleId"> |
| | | <el-form-item v-if="form.revLevel !== '0'" label="版本号规则:" label-width="100px" prop="revisionRuleId" style="margin-bottom: 5px;"> |
| | | <avue-select v-model="form.revisionRuleId" |
| | | :disabled="form.inputRevisionFlag" |
| | | placeholder="请选择版本号规则" |
| | |
| | | @change="form.revisionRuleId = ''"> |
| | | </el-switch> |
| | | </el-form-item> |
| | | <el-form-item v-if="form.revLevel !== '0'" label="分隔符:" label-width="110px" prop="delimiter"> |
| | | <el-select v-model="form.delimiter" clearable> |
| | | <el-option label="." value="."></el-option> |
| | | <el-option label="-" value="-"></el-option> |
| | | </el-select> |
| | | <el-form-item v-if="form.revLevel !== '0'" label="分隔符:" label-width="100px" prop="delimiter" style="margin-bottom: 5px;"> |
| | | <el-radio v-model="form.delimiter" label=""> </el-radio> |
| | | <el-radio v-model="form.delimiter" label=".">.</el-radio> |
| | | <el-radio v-model="form.delimiter" label="-">-</el-radio> |
| | | </el-form-item> |
| | | <el-form-item v-if="form.revLevel !== '0' && form.revLevel !== '1'" label="版次号规则:" label-width="110px" |
| | | <el-form-item v-if="form.revLevel !== '0' && form.revLevel !== '1'" label="版次号规则:" label-width="100px" |
| | | prop="versionRule"> |
| | | <el-select v-model="form.versionRule" clearable> |
| | | <el-option label="1.2.3..." value="0"></el-option> |
| | | <el-option label="a.b.c..." value="1"></el-option> |
| | | <el-option label="0.1.2..." value="2"></el-option> |
| | | </el-select> |
| | | <el-radio v-model="form.versionRule" label="0">1.2.3...</el-radio> |
| | | <el-radio v-model="form.versionRule" label="1">a.b.c...</el-radio> |
| | | <el-radio v-model="form.versionRule" label="2">0.1.2...</el-radio> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="rightForm" style="width: 26%"> |
| | | <div class="rightForm" style="width: 25%"> |
| | | <el-form-item label="生命周期:" label-width="138px" prop="lifeCycleId"> |
| | | <avue-select v-model="form.lifeCycleId" |
| | | placeholder="请选择生命周期" |
| | | :filterable="true" |
| | | :props="{label: 'id', value: 'id'}" |
| | | :dic="dialogLifeData"></avue-select> |
| | | :dic="lifeData"></avue-select> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="备选生命周期列表:" label-width="138px"> |
| | | <div style="display: flex; align-items: center"> |
| | | <div style="height: 200px; width: 280px; border: 1px solid #bdbbbb;overflow-y: auto"> |
| | | <!-- 内容 --> |
| | | <el-table |
| | | :data="dialogLifeTable" |
| | | :show-header="false" |
| | | style="width: 100%"> |
| | | <el-table-column |
| | | align="center" |
| | | prop="id"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | fixed="right" |
| | | label="操作" |
| | | width="60"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="small" |
| | | style="color:#F56C6C;" |
| | | type="text" |
| | | @click.native.prevent="dialogDeleteLifeTable(scope.$index)"> |
| | | 移除 |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <el-button plain size="mini" style="margin-left: 5px" type="success" |
| | | @click="lifeAddHandler('table')">添加 |
| | | </el-button> |
| | | |
| | | </div> |
| | | <avue-select multiple |
| | | :filterable="true" |
| | | v-model="form.subLifeCycleId" |
| | | placeholder="请选择生命周期" |
| | | :props="{label: 'id', value: 'id'}" |
| | | type="tree" |
| | | :dic="lifeData"></avue-select> |
| | | </el-form-item> |
| | | </div> |
| | | </div> |
| | |
| | | <el-button @click="dialogAttrClose">取 消</el-button> |
| | | <el-button type="primary" @click="dialogAttrAddClickHandler">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | <!-- 生命周期 --> |
| | | <el-dialog |
| | | v-dialogDrag |
| | | :visible.sync="dialogLfeVisible" |
| | | append-to-body="true" |
| | | class="avue-dialog" |
| | | title="生命周期模板" |
| | | width="60%" |
| | | > |
| | | <avue-crud |
| | | :key="dialogLifeKey" |
| | | ref="dialogAttrCrud" |
| | | :data="dialogLifeData" |
| | | :option="dialogLifeOption" |
| | | @row-click="dialogLifeRowClick" |
| | | @search-change="lifeHandleSearch" |
| | | @search-reset="lifeHandleReset" |
| | | > |
| | | </avue-crud> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialogLfeVisible = false">取 消</el-button> |
| | | <el-button type="primary" @click="dialogLifeAddClickHandler">确 定</el-button> |
| | | </span> |
| | | |
| | | </el-dialog> |
| | | |
| | | <!-- 导入 --> |
| | |
| | | createViewLoading: false, // 创建视图 |
| | | versionAddFlag: false, |
| | | inheritTreeData: [], |
| | | dialogLifeDefalutData: [], // 查询重置默认数据 |
| | | lifeType: '', |
| | | dialogLifeTable: [], |
| | | dialogLifeSaveRow: {}, |
| | | dialogLifeKey: Math.random(), |
| | | dialogLifeData: [], |
| | | dialogLifeOption: { |
| | | ...basicOption, |
| | | addBtn: false, |
| | | selection: false, |
| | | refreshBtn: false, |
| | | menu: false, |
| | | height: 450, |
| | | searchMenuSpan: 8, |
| | | highlightCurrentRow: true, |
| | | column: [ |
| | | { |
| | | label: '生命周期模板名', |
| | | prop: 'id', |
| | | searchLabelWidth: 120, |
| | | search: true |
| | | } |
| | | ] |
| | | }, |
| | | dialogLifeLoading: false, |
| | | dialogLfeVisible: false, |
| | | lifeData: [],//生命周期下拉数据 |
| | | versionData: [],//版本规则数据 |
| | | dialogAttrSelectList: [], |
| | | searchAttrParams: {}, |
| | |
| | | fName: '', // 继承自 |
| | | implClass: '', // 实现类 |
| | | description: '', // 描述 |
| | | revLevel: '', // 版本规则 |
| | | revLevel: '2', // 版本规则 |
| | | revisionRuleId: '',// 版本号规则 |
| | | inputRevisionFlag: false, // 手工输入, |
| | | delimiter: '', // 分隔符 |
| | | versionRule: '0', // 版次号规则 |
| | | lifeCycleId: '', // 生命周期 |
| | | subLifeCycleId: '', // 生命周期备选列表, |
| | | subLifeCycleId: [], // 生命周期备选列表, |
| | | apNameArray: "", // 属性池列表’,‘分隔 |
| | | }, |
| | | nodeRow: {}, |
| | |
| | | //获取生命周期数据 |
| | | getLifeCycle(){ |
| | | gridLifeCycle().then(res => { |
| | | this.dialogLifeData = res.data.data; |
| | | this.dialogLifeDefalutData = res.data.data; |
| | | this.lifeData = res.data.data; |
| | | }); |
| | | }, |
| | | // 创建按钮 |
| | |
| | | this.dialogAttrData.splice(index, 1); |
| | | }, |
| | | |
| | | // 生命周期新增 |
| | | lifeAddHandler(val) { |
| | | this.dialogLfeVisible = true; |
| | | this.dialogLifeKey = Math.random(); // 打开时刷新表格避免表格错行 |
| | | this.dialogLifeLoading = true; |
| | | this.lifeType = val; |
| | | }, |
| | | |
| | | // 生命周期行点击 |
| | | dialogLifeRowClick(row) { |
| | | this.dialogLifeSaveRow = row; |
| | | }, |
| | | |
| | | // 生命周期保存 |
| | | dialogLifeAddClickHandler() { |
| | | if (func.isEmptyObject(this.dialogLifeSaveRow)) { |
| | | this.$message.error('请至少选择一条数据'); |
| | | return; |
| | | } |
| | | if (this.lifeType === 'input') { |
| | | this.form.lifeCycleId = this.dialogLifeSaveRow.id; |
| | | } else { |
| | | const flag = this.dialogLifeTable.some(item => item.id === this.dialogLifeSaveRow.id); |
| | | |
| | | if (flag) { |
| | | this.$message.error('已存在相同的数据,请添加其他数据'); |
| | | return; |
| | | } |
| | | this.dialogLifeTable.push(this.dialogLifeSaveRow); |
| | | } |
| | | this.dialogLfeVisible = false; |
| | | }, |
| | | |
| | | // 生命周期备选列表移除 |
| | | dialogDeleteLifeTable(index) { |
| | | this.dialogLifeTable.splice(index, 1) |
| | | }, |
| | | |
| | | // 生命周期搜索 |
| | | lifeHandleSearch(params, done) { |
| | | const {id} = params; |
| | | |
| | | if (!params.id) { |
| | | this.dialogLifeData = this.dialogLifeDefalutData; |
| | | return done(); |
| | | } |
| | | ; |
| | | |
| | | this.dialogLifeData = this.dialogLifeDefalutData.filter(item => { |
| | | return item.id && item.id.includes(id); |
| | | }); |
| | | |
| | | done(); |
| | | |
| | | }, |
| | | |
| | | // 生命周期重置 |
| | | lifeHandleReset() { |
| | | this.dialogLifeData = this.dialogLifeDefalutData; |
| | | }, |
| | | |
| | | // 只能输入英文正则校验 |
| | | validateEnglishOnly(rule, value, callback) { |
| | | if (!value) { |
| | |
| | | fName: '', // 继承自 |
| | | implClass: '', // 实现类 |
| | | description: '', // 描述 |
| | | revLevel: '', // 版本规则 |
| | | revLevel: '2', // 版本规则 |
| | | revisionRuleId: '',// 版本号规则 |
| | | inputRevisionFlag: 'false', // 手工输入 |
| | | delimiter: '', // 分隔符 |
| | | versionRule: '0', // 版次号规则 |
| | | lifeCycleId: '', // 生命周期 |
| | | subLifeCycleId: '', // 生命周期备选列表, |
| | | subLifeCycleId: [], // 生命周期备选列表, |
| | | lifeCycleIds:'', |
| | | apNameArray: "", // 属性池列表’,‘分隔 |
| | | }; |
| | | this.dialogLifeTable = []; // 将生命周期表格置空 |
| | | this.dialogAttrData = []; // 将属性池表格置空 |
| | | this.form = {...form}; |
| | | this.$refs.form.clearValidate(); |
| | |
| | | |
| | | // 版本规则切换 置空其他条件 |
| | | revLevelChange() { |
| | | this.form.versionRule = ""; |
| | | this.form.inputRevisionFlag = false; |
| | | this.form.delimiter = ""; |
| | | this.form.versionRule = "0"; |
| | |
| | | this.$message.error('请检查版本号规则不能为空'); |
| | | return; |
| | | } |
| | | this.form.subLifeCycleId = this.dialogLifeTable ? this.dialogLifeTable.map(item => item.id).join(',') : ""; |
| | | this.form.lifeCycleIds=this.form.subLifeCycleId.join(','); |
| | | this.form.apNameArray = this.dialogAttrData ? this.dialogAttrData.map(item => item.id).join(',') : ""; |
| | | this.$refs.form.validate((valid) => { |
| | | const saveFunction = this.title === 'add' ? addLifeCycle : updateLifeCycle; |
| | |
| | | if (this.nodeRow.id === 'topNode') { |
| | | this.$message.error('请选择子节点进行修改') |
| | | return; |
| | | } |
| | | }debugger; |
| | | this.form = {...this.nodeRow}; |
| | | this.form.inputRevisionFlag = JSON.parse(this.form.inputRevisionFlag); // 字符串false转换为布尔值 |
| | | // this.form.fName = this.nodeRow.id === 'topNode' ? "" : this.nodeRow.id; |
| | | this.dialogLifeTable = (this.nodeRow.lifeCycleIds && this.nodeRow.lifeCycleIds.trim()) |
| | | this.form.subLifeCycleId = (this.nodeRow.lifeCycleIds && this.nodeRow.lifeCycleIds.trim()) |
| | | ? this.nodeRow.lifeCycleIds.split(',').map(item => ({id: item.trim()})) |
| | | : []; |
| | | this.dialogAttrData = this.nodeRow.attributes ? JSON.parse(this.nodeRow.attributes) : []; |
| | |
| | | this.$message.error('请至少选择一条数据'); |
| | | return; |
| | | } |
| | | ; |
| | | |
| | | this.$confirm('您确定要删除所选择的数据吗?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | |
| | | this.checkViewData = this.checkViewDataSearch; |
| | | return done(); |
| | | } |
| | | ; |
| | | |
| | | this.checkViewData = this.checkViewDataSearch.filter(item => { |
| | | return item.source && item.source.includes(source); |
| | |
| | | indexName: this.indexForm.name, |
| | | } |
| | | addIndex([params]).then(res => { |
| | | console.log(res) |
| | | this.$message.success('创建成功'); |
| | | this.indexDialogClose(); |
| | | }).catch(err => { |
| | |
| | | line-height:22px; |
| | | height: 24px; |
| | | } |
| | | |
| | | .el-radio{ |
| | | margin-right: 20px; |
| | | } |
| | | } |
| | | |
| | | .descBox { |