| | |
| | | <template> |
| | | <div> |
| | | <div style="display: flex;flex-wrap: wrap; display: inline-block" v-if="this.crudArrayFlag" class="app" > |
| | | <div v-if="this.crudArrayFlag" class="app" style="display: flex;flex-wrap: wrap; display: inline-block"> |
| | | <el-button-group> |
| | | <!--新增--> |
| | | <el-button v-if="attrEditVisible == false && attrFlagChiledren==false && editOpenFlag && (!checkStatus || crudLCStatus=='Editing' )" size="small" type="primary" icon="el-icon-plus" plain @click="busineHandle">添加 {{ msg }}</el-button> |
| | | <el-button |
| | | v-if="attrEditVisible == false && attrFlagChiledren==false && editOpenFlag && (!checkStatus || crudLCStatus=='Editing' )" |
| | | icon="el-icon-plus" plain size="small" type="primary" @click="busineHandle">添加 {{ msg }} |
| | | </el-button> |
| | | <!-- 全屏编辑--> |
| | | <el-button v-if=" attrEditVisible == false && attrFlagChiledren==false && editOpenFlag&&(!checkStatus || crudLCStatus=='Editing')" size="small" @click="fullscreenHandle" icon="el-icon-full-screen">全屏编辑</el-button> |
| | | <el-button |
| | | v-if=" attrEditVisible == false && attrFlagChiledren==false && editOpenFlag&&(!checkStatus || crudLCStatus=='Editing')" |
| | | icon="el-icon-full-screen" size="small" @click="fullscreenHandle">全屏编辑 |
| | | </el-button> |
| | | <!-- 验证规则--> |
| | | <el-button v-if="(!checkStatus || crudLCStatus=='Editing' )&& editOpenFlag" icon="el-icon-info" size="small" @click="ruleAddHandler">验证规则</el-button> |
| | | <el-button v-if="(!checkStatus || crudLCStatus=='Editing' )&& editOpenFlag" icon="el-icon-info" size="small" |
| | | @click="ruleAddHandler">验证规则 |
| | | </el-button> |
| | | <!-- 属性分组--> |
| | | <el-button v-if="(!checkStatus || crudLCStatus=='Editing') && editOpenFlag" icon="el-icon-menu" size="small" @click="attrVisibleHandle">属性分组</el-button> |
| | | <el-button v-if="(!checkStatus || crudLCStatus=='Editing') && editOpenFlag" icon="el-icon-menu" size="small" |
| | | @click="attrVisibleHandle">属性分组 |
| | | </el-button> |
| | | </el-button-group> |
| | | <el-button-group> |
| | | <!-- 保存--> |
| | | <el-button v-if="(!checkStatus|| crudLCStatus=='Editing') && editOpenFlag" size="small" type="success" plain @click.prevent="addsHandler" icon="el-icon-check">保存</el-button> |
| | | <el-button v-if="(!checkStatus|| crudLCStatus=='Editing') && editOpenFlag" icon="el-icon-check" plain size="small" |
| | | type="success" @click.prevent="addsHandler">保存 |
| | | </el-button> |
| | | <!-- 预览排序--> |
| | | <el-button size="small" @click="orderHandle" icon="el-icon-arrow-down">预览排序</el-button> |
| | | <el-button icon="el-icon-arrow-down" size="small" @click="orderHandle">预览排序</el-button> |
| | | <!-- 删除--> |
| | | <el-button v-if="(!checkStatus || crudLCStatus=='Editing') && editOpenFlag" size="small" @click="CrudRemove" icon="el-icon-delete">删除</el-button> |
| | | <el-button v-if="(!checkStatus || crudLCStatus=='Editing') && editOpenFlag" icon="el-icon-delete" size="small" |
| | | @click="CrudRemove">删除 |
| | | </el-button> |
| | | <!-- 重置--> |
| | | <el-button size="small" @click="reset" icon="el-icon-refresh-right">重置</el-button> |
| | | <el-button icon="el-icon-refresh-right" size="small" @click="reset">重置</el-button> |
| | | </el-button-group> |
| | | <el-button-group> |
| | | <!--新增--> |
| | | <!-- 分类注入--> |
| | | <el-button v-if="(!checkStatus || crudLCStatus=='Editing') && editOpenFlag" icon="el-icon-magic-stick" size="small" @click="injectBtn">分类注入</el-button> |
| | | <el-button v-if="(!checkStatus || crudLCStatus=='Editing') && editOpenFlag" icon="el-icon-magic-stick" |
| | | size="small" @click="injectBtn">分类注入 |
| | | </el-button> |
| | | <!-- 组合规则--> |
| | | <el-button v-if="(!checkStatus || crudLCStatus=='Editing') && editOpenFlag" icon="el-icon-film" size="small" @click="isShowHandler">组合规则</el-button> |
| | | <el-button v-if="(!checkStatus || crudLCStatus=='Editing') && editOpenFlag" icon="el-icon-film" size="small" |
| | | @click="isShowHandler">组合规则 |
| | | </el-button> |
| | | <!-- 枚举注入--> |
| | | <el-button v-if="(!checkStatus || crudLCStatus=='Editing') && editOpenFlag" icon="el-icon-c-scale-to-original" size="small" @click="enmuVisHandle">枚举注入</el-button> |
| | | <el-button v-if="(!checkStatus || crudLCStatus=='Editing') && editOpenFlag" icon="el-icon-c-scale-to-original" |
| | | size="small" @click="enmuVisHandle">枚举注入 |
| | | </el-button> |
| | | <!-- 级联属性--> |
| | | <el-button v-if="(!checkStatus|| crudLCStatus=='Editing') && editOpenFlag" icon="el-icon-coin" size="small" @click="CascadeHandle">级联属性</el-button> |
| | | <el-button v-if="(!checkStatus|| crudLCStatus=='Editing') && editOpenFlag" icon="el-icon-coin" size="small" |
| | | @click="CascadeHandle">级联属性 |
| | | </el-button> |
| | | </el-button-group> |
| | | |
| | | <el-button-group> |
| | | <!-- 同步到其他模板--> |
| | | <el-button size="small"@click="syncHandle" icon="el-icon-share">同步到其他模板</el-button> |
| | | <el-button icon="el-icon-share" size="small" @click="syncHandle">同步到其他模板</el-button> |
| | | </el-button-group> |
| | | |
| | | <el-button-group> |
| | | <!-- 编码申请预览--> |
| | | <el-button size="small" icon="el-icon-view" @click="applicationHandle" style="">编码申请预览</el-button> |
| | | <el-button icon="el-icon-view" size="small" style="" @click="applicationHandle">编码申请预览</el-button> |
| | | |
| | | </el-button-group> |
| | | <!-- 是否开启编辑 --> |
| | | <el-button-group> |
| | | <el-button size="small" plain icon="el-icon-view" v-if="(!checkStatus|| crudLCStatus=='Editing') && !editOpenFlag && attrEditVisible == false && attrFlagChiledren==false" @click="editOpen" >开启编辑</el-button> |
| | | <el-button v-if="(!checkStatus|| crudLCStatus=='Editing') && !editOpenFlag && attrEditVisible == false && attrFlagChiledren==false" icon="el-icon-view" plain |
| | | size="small" |
| | | @click="editOpen">开启编辑 |
| | | </el-button> |
| | | </el-button-group> |
| | | <el-select v-if="(!checkStatus || crudLCStatus=='Editing') && editOpenFlag" size="small" v-model="selectvalue" placeholder="请选择"> |
| | | <el-select v-if="(!checkStatus || crudLCStatus=='Editing') && editOpenFlag" v-model="selectvalue" placeholder="请选择" |
| | | size="small"> |
| | | <el-option |
| | | v-for="item in selectoptions" |
| | | :key="item.value" |
| | |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | <el-switch v-if="(!checkStatus || crudLCStatus=='Editing') && editOpenFlag" v-model="switchvalue" @change="batchSetFlag" active-value="true" style="margin:6px 0 0 10px"> |
| | | <el-switch v-if="(!checkStatus || crudLCStatus=='Editing') && editOpenFlag" v-model="switchvalue" |
| | | active-value="true" style="margin:6px 0 0 10px" @change="batchSetFlag"> |
| | | </el-switch> |
| | | </div> |
| | | <!-- 弹窗--> |
| | |
| | | </div> |
| | | </el-dialog> |
| | | <!-- 枚举注入--> |
| | | <el-dialog :visible.sync="enumVisible" append-to-body title="枚举注入" :before-close="this.enumBeforeClose"> |
| | | <el-dialog :before-close="this.enumBeforeClose" :visible.sync="enumVisible" append-to-body title="枚举注入"> |
| | | <!-- 渲染表格及按钮 --> |
| | | <!-- 渲染表格及按钮 --> |
| | | <el-alert |
| | | title="请新增后点击单元格输入枚举数据" |
| | | type="success" |
| | | :closable="false" |
| | | style="margin-bottom: 10px;display: inline-block" |
| | | :closable="false"> |
| | | title="请新增后点击单元格输入枚举数据" |
| | | type="success"> |
| | | </el-alert> |
| | | <div> |
| | | <el-button icon="el-icon-plus" type="primary" @click="addRow">新增</el-button> |
| | |
| | | </el-table-column> |
| | | <el-table-column fixed="right" label="操作" width="120"> |
| | | <template slot-scope="scope"> |
| | | <el-button size="small" type="text" plain @click="enumDeleteRow"> |
| | | <el-button plain size="small" type="text" @click="enumDeleteRow"> |
| | | 移除 |
| | | </el-button> |
| | | </template> |
| | |
| | | <el-radio-group v-model="injectOption.classifyInvokeLevel"> |
| | | <el-radio label="min">最小层</el-radio> |
| | | <el-radio label="max">指定层</el-radio> |
| | | <el-input-number v-if="this.injectOption.classifyInvokeLevel == 'max'" v-model="injectOption.classifyNumber" :max="10" :min="0" |
| | | <el-input-number v-if="this.injectOption.classifyInvokeLevel == 'max'" |
| | | v-model="injectOption.classifyNumber" :max="10" :min="0" |
| | | controls-position="right"></el-input-number> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | |
| | | </div> |
| | | </el-dialog> |
| | | <!-- 属性分组--> |
| | | <el-dialog :visible.sync="attrVisible" append-to-body :before-close="attrClose" style="width: 800px; left:30vw;top: 10vh ;" |
| | | <el-dialog :before-close="attrClose" :visible.sync="attrVisible" append-to-body |
| | | style="width: 800px; left:30vw;top: 10vh ;" |
| | | title="输入分组的名称"> |
| | | <el-form ref="form" label-width="70px"> |
| | | <el-form-item label="属性分组"> |
| | |
| | | </el-container> |
| | | </el-dialog> |
| | | <!-- 全屏编辑--> |
| | | <el-dialog :visible.sync="attrEditVisible" append-to-body fullscreen="true" :before-close="escEdit" > |
| | | <attrCrud :ProData="this.ProData" :attrFlagChiledren="this.attrFlag" @editCloseChildren="editClose" :editStyleFlag="editStyleFlag" :editOpenFlag="editOpenFlag" :crudArrayFlag="this.crudArrayFlag"></attrCrud> |
| | | <el-dialog :before-close="escEdit" :visible.sync="attrEditVisible" append-to-body fullscreen="true"> |
| | | <attrCrud :ProData="this.ProData" :attrFlagChiledren="this.attrFlag" :crudArrayFlag="this.crudArrayFlag" |
| | | :editOpenFlag="editOpenFlag" :editStyleFlag="editStyleFlag" |
| | | @editCloseChildren="editClose"></attrCrud> |
| | | </el-dialog> |
| | | <!-- 组合规则--> |
| | | <formula-editor :systemVariableTableData="systemVariableTableData" |
| | | <formula-editor :componentRuleText="componentRuleText" |
| | | :systemVariableTableData="systemVariableTableData" |
| | | :thisSceneTableData="thisSceneTableData" |
| | | :visible.sync="isShowformulaEdit" |
| | | @updateFormulaContent="updataFormlaContent" |
| | | :componentRuleText="componentRuleText" |
| | | ></formula-editor> |
| | | <!-- 新增 --> |
| | | <el-dialog :visible.sync="addVisible" append-to-body title="从业务类型中选择属性"> |
| | | <avue-crud ref="AddOriginPlace" :data="businessData" :option="businessOption" @selection-change="businessSelect"> |
| | | <avue-crud ref="AddOriginPlace" :data="businessData" :option="businessOption" |
| | | @selection-change="businessSelect"> |
| | | <template slot="menuLeft"> |
| | | <div style="display: flex;"> |
| | | <el-select v-model="SelectValue" placeholder="请选择" style="width: 150px !important;"> |
| | |
| | | style="width: 150px"> |
| | | </el-option> |
| | | </el-select> |
| | | <el-input style="width: 400px;margin-left: 20px" v-model="SelectFInd"></el-input> |
| | | <el-input v-model="SelectFInd" style="width: 400px;margin-left: 20px"></el-input> |
| | | <el-button size="small" style="margin-left: 10px" @click="AddFindHandler">查询</el-button> |
| | | </div> |
| | | </template> |
| | |
| | | <!-- 参照配置--> |
| | | <refer-config-dialog |
| | | :display="referConfigVisble" |
| | | @setReferConfigValue="setReferConfigValue" |
| | | :referConfigOption="referConfigOption" |
| | | @setReferConfigValue="setReferConfigValue" |
| | | ></refer-config-dialog> |
| | | |
| | | </div> |
| | | <el-table :data="ProData" |
| | | style="width: 100%" |
| | | :height="this.editStyleFlag? 800 : 343" |
| | | @cell-click="handleCellClicks" |
| | | @select="selectHandle" |
| | | @selection-change="selectionChange" |
| | | @row-click="rowClick" |
| | | v-if="this.crudArrayFlag" |
| | | <el-table v-if="this.crudArrayFlag" |
| | | ref="referAttrCrud" |
| | | v-loading="loading" |
| | | :data="ProData" |
| | | :height="this.editStyleFlag? 800 : 343" |
| | | style="width: 100%" |
| | | @select="selectHandle" |
| | | @cell-click="handleCellClicks" |
| | | @selection-change="selectionChange" |
| | | @row-click="rowClick" |
| | | > |
| | | <el-table-column |
| | | type="selection" |
| | | width="55" fixed> |
| | | fixed |
| | | type="selection" width="55"> |
| | | </el-table-column> |
| | | <!--<el-table-column fixed label="序号" type="index" width="55"></el-table-column>--> |
| | | <el-table-column v-for="(item,index) in this.option.column" :key="item.id" |
| | | <el-table-column v-for="(item,index) in this.option.column" v-if="item.edit !='referName'" |
| | | :key="item.id" |
| | | :fixed="item.fixed" |
| | | :formatter="formAttr" |
| | | :label="item.label" |
| | | :prop="item.prop" |
| | | :formatter="formAttr" |
| | | :width="item.width||(item.label.length >=4 ?'160':item.label.length==3 ?'130':'100')" |
| | | :show-overflow-tooltip="true" |
| | | :sortable="item.sortable" |
| | | :fixed="item.fixed" |
| | | :width="item.width||(item.label.length >=4 ?'160':item.label.length==3 ?'130':'100')" |
| | | align="center" |
| | | v-if="item.edit !='referName'" |
| | | > |
| | | <template slot-scope="{ row }"> |
| | | <el-input ref="inputRef" v-if="editingRows === row && editShows== item.prop && item.prop != 'codeDateFormat' && (item.edit == 'text' ||item.edit == 'refer' )" v-model="row[item.prop]" |
| | | @blur="saveRows" autofocus ></el-input> |
| | | <el-input-number size="small" controls-position="right" v-if="editingRows === row && editShows== item.prop && item.edit == 'number'" v-model="row[item.prop]" |
| | | @blur="saveRows" :style="{width:(item.width-10)+'px'}"></el-input-number> |
| | | <el-select v-model="row[item.prop]" filterable allow-create default-first-option slot="prepend" v-if="editingRows === row && editShows== item.prop && item.edit == 'select' " @blur="selectChangeHandler(item.editConfig,index)"> |
| | | <el-input v-if="editingRows === row && editShows== item.prop && item.prop != 'codeDateFormat' && (item.edit == 'text' ||item.edit == 'refer' )" |
| | | ref="inputRef" |
| | | v-model="row[item.prop]" |
| | | autofocus @blur="saveRows"></el-input> |
| | | <el-input-number v-if="editingRows === row && editShows== item.prop && item.edit == 'number'" v-model="row[item.prop]" |
| | | :style="{width:(item.width-10)+'px'}" |
| | | controls-position="right" |
| | | size="small" @blur="saveRows"></el-input-number> |
| | | <el-select v-if="editingRows === row && editShows== item.prop && item.edit == 'select' " slot="prepend" v-model="row[item.prop]" allow-create default-first-option |
| | | filterable |
| | | @blur="selectChangeHandler(item.editConfig,index)"> |
| | | <el-option |
| | | v-for="optionItem in item.data" |
| | | :key="optionItem.dictValue" |
| | |
| | | </el-option> |
| | | </el-select> |
| | | <el-switch |
| | | v-if="item.edit === 'switch'" v-model="row[item.prop]" active-value="true" :disabled="!editOpenFlag" |
| | | v-if="item.edit === 'switch'" v-model="row[item.prop]" :disabled="!editOpenFlag" active-value="true" |
| | | inactive-value="false"> |
| | | </el-switch> |
| | | <span v-else>{{ row[item.prop] }}</span> |
| | |
| | | { |
| | | label: "可空", |
| | | prop: "nullableFlag", |
| | | formatter:function(row,column){return row.nullableFlag=='true' || row.nullableFlag=='1'?'是':'否'} |
| | | formatter: function (row, column) { |
| | | return row.nullableFlag == 'true' || row.nullableFlag == '1' ? '是' : '否' |
| | | } |
| | | }, |
| | | { |
| | | label: "默认值", |
| | |
| | | }, |
| | | //级联属性清除 |
| | | casRemove() { |
| | | this.selectRow = "" |
| | | this.selectRow = ""; |
| | | this.$set(this.CurrentCell, 'parentCode', this.selectRow); |
| | | this.CascadeVisible = false; |
| | | |
| | | }, |
| | | // 级联属性行单选 |
| | | CascaderowClick(row) { |
| | |
| | | classifyNumber: this.CurrentCell.classifyInvokeLevel == 'min' ? '' : this.CurrentCell.classifyInvokeLevel |
| | | }; |
| | | } else { |
| | | this.injectHandleReset(); |
| | | // this.injectHandleReset(); |
| | | } |
| | | }else if(column.property == 'componentRule'){ |
| | | if(this.CurrentCell){ |
| | |
| | | rulesremove() { |
| | | this.RulesForm.expressionText = "" |
| | | this.RulesForm.TestContent = "" |
| | | this.$set(this.CurrentCell, 'verifyRule', '') |
| | | this.rulesVisible = false |
| | | }, |
| | | // 验证规则确定 |
| | | rulesHandle() { |
| | |
| | | } |
| | | this.$set(this.attrSelectList[0],'classifyInvokeText',data) |
| | | } |
| | | this.injectHandleReset() |
| | | |
| | | // this.injectHandleReset() |
| | | if(this.injectOption.classifyInvokeLevel !== 'min'){ |
| | | this.injectOption.classifyInvokeLevel=this.injectOption.classifyNumber; |
| | | }else { |
| | |
| | | }, |
| | | //分类注入清空 |
| | | injectHandleReset() { |
| | | this.injectOption.classifyInvokeAttrName = "分类名称"; |
| | | this.injectOption.classifyInvokeAttr = "name"; |
| | | this.injectOption.classifyInvokeLevel = "min"; |
| | | this.injectOption.classifyInvokeEditFlag = "true"; |
| | | this.injectOption.classifyNumber = "0"; |
| | | // this.injectOption.classifyInvokeAttrName = "分类名称"; |
| | | // this.injectOption.classifyInvokeAttr = "name"; |
| | | // this.injectOption.classifyInvokeLevel = "min"; |
| | | // this.injectOption.classifyInvokeEditFlag = "true"; |
| | | // this.injectOption.classifyNumber = "0"; |
| | | this.$set(this.CurrentCell, 'classifyInvokeText', '') |
| | | this.injectVisible = false; |
| | | }, |
| | | // 分类注入取消 |
| | | injectRemove() { |
| | |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss" > |
| | | <style lang="scss" scoped> |
| | | .app { |
| | | /deep/ .el-button { |
| | | //margin: 0 10px 10px 0; |
| | | } |
| | | } |
| | | |
| | | .el-button-group { |
| | | margin-right: 10px; |
| | | margin-bottom: 10px; |