| | |
| | | <template> |
| | | <div> |
| | | <div style="display: flex;flex-wrap: wrap;" v-if="this.crudArrayFlag" class="app"> |
| | | |
| | | <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="(!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-group> |
| | | <el-button-group> |
| | | <!-- 保存--> |
| | | <el-button v-if="(!checkStatus|| crudLCStatus=='Editing') && editOpenFlag" size="small" type="success" plain @click="addsHandler" icon="el-icon-check">保存</el-button> |
| | | <!-- 预览排序--> |
| | | <el-button size="small" @click="orderHandle" icon="el-icon-arrow-down">预览排序</el-button> |
| | | <!-- 删除--> |
| | | <el-button v-if="(!checkStatus || crudLCStatus=='Editing') && editOpenFlag" size="small" @click="CrudRemove" icon="el-icon-delete">删除</el-button> |
| | | <!-- 重置--> |
| | | <el-button size="small" @click="reset" icon="el-icon-refresh-right">重置</el-button> |
| | | </el-button-group> |
| | | <el-button-group> |
| | | <!--新增--> |
| | |
| | | <!-- 级联属性--> |
| | | <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="orderHandle" icon="el-icon-arrow-down">预览排序</el-button> |
| | | <!--新增--> |
| | | <!-- 保存--> |
| | | <el-button v-if="(!checkStatus|| crudLCStatus=='Editing') && editOpenFlag" size="small" @click="addsHandler" icon="el-icon-check">保存</el-button> |
| | | <!-- 删除--> |
| | | <el-button v-if="(!checkStatus || crudLCStatus=='Editing') && editOpenFlag" size="small" @click="CrudRemove" icon="el-icon-delete">删除</el-button> |
| | | <!-- 重置--> |
| | | <el-button size="small" @click="reset" icon="el-icon-refresh-right">重置</el-button> |
| | | </el-button-group> |
| | | |
| | | <el-button-group> |
| | | <!-- 同步到其他模板--> |
| | | <el-button size="small"@click="syncHandle" icon="el-icon-share">同步到其他模板</el-button> |
| | |
| | | </div> |
| | | <el-table :data="ProData" |
| | | style="width: 100%" |
| | | :height="this.editStyleFlag ? 450 : 900" |
| | | :height="!this.editStyleFlag ? 450 : 900" |
| | | @cell-click="handleCellClicks" |
| | | @select="selectHandle" |
| | | @selection-change="selectionChange" |
| | |
| | | v-if="item.edit !='referName'" |
| | | > |
| | | <template slot-scope="{ row }"> |
| | | <el-input v-if="editingRows === row && editShows== item.prop && item.prop != 'codeDateFormat' && (item.edit == 'text' ||item.edit == 'refer' )" v-model="row[item.prop]" |
| | | @blur="saveRows" ></el-input> |
| | | <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)"> |
| | |
| | | data() { |
| | | return { |
| | | //全屏编辑高度状态 |
| | | edittStyleFlag:false, |
| | | editStyleFlag:false, |
| | | loading:false, |
| | | referConfigText:"", |
| | | referConfigVisble:false, |
| | |
| | | desc: "当前用户的姓名" |
| | | }, |
| | | { |
| | | formula: "#CURRENTUSER.SECRETGRADE#", |
| | | formula: "#CURRENTUSER.SECRETARIAT#", |
| | | desc: "当前用户密级" |
| | | }, |
| | | { |
| | |
| | | //表格数据 |
| | | CrudRend() { |
| | | if (this.crudOid != '') { |
| | | gridCodeClassifyTemplateAttr({'conditionMap[classifyTemplateOid]': this.crudOid}).then(res => { |
| | | gridCodeClassifyTemplateAttr({'conditionMap[classifyTemplateOid]': this.crudOid,limit:-1}).then(res => { |
| | | this.loading=true |
| | | setTimeout(() => { |
| | | this.ProData = res.data.data; |
| | |
| | | } |
| | | }) |
| | | this.addVisible = false; |
| | | |
| | | }, |
| | | //业务类型选择 |
| | | businessSelect(selection, row) { |
| | |
| | | this.rowOid = row.oid; |
| | | this.CurrentCell=row; |
| | | if(column.property == 'referConfig' ){ |
| | | console.log( this.CurrentCell.referConfig) |
| | | this.referConfigVisble= true; |
| | | this.referConfigOption = { |
| | | referConfig: this.referConfigText || '', |
| | | referConfig: this.CurrentCell.referConfig || '', |
| | | } |
| | | if(this.CurrentCell.referConfig == ''){ |
| | | this.referConfigOption = { |
| | |
| | | }else if(column.property == 'parentCode'){ |
| | | gridCodeClassifyTemplateAttr({ |
| | | 'conditionMap[classifyTemplateOid]': this.Formlist[0].oid, |
| | | 'conditionMap[oid_notequal]': this.CurrentCell.oid |
| | | 'conditionMap[oid_notequal]': this.CurrentCell.oid, |
| | | limit:-1 |
| | | }).then(res => { |
| | | console.log(res) |
| | | this.CascadeData = res.data.data; |
| | |
| | | if (this.crudArray.length < 1) { |
| | | this.$message.warning('请选择一个模板') |
| | | } else { |
| | | this.editStyleFlag=!this.editStyleFlag; |
| | | this.editStyleFlag=true; |
| | | // this.editOpenFlag=true; |
| | | this.attrEditVisible = true; |
| | | this.attrFlag = true; |
| | |
| | | escEdit() { |
| | | this.attrFlagChiledren = false; |
| | | this.attrEditVisible = false; |
| | | this.editStyleFlag=false; |
| | | }, |
| | | //组合规则确定 |
| | | updataFormlaContent(val) { |