| | |
| | | } |
| | | }) |
| | | } |
| | | //时间格式下拉菜单 |
| | | //可输可选下拉菜单 |
| | | export const listByFlag = (params) =>{ |
| | | return request({ |
| | | url:'/api/ubcs-code/bdSelectInputController/listByFlag', |
| | | url:'/api/ubcs-system/dict-biz/listByFlag', |
| | | method: 'get', |
| | | params:{ |
| | | ...params |
| | |
| | | > |
| | | <el-table-column |
| | | type="selection" |
| | | width="55"> |
| | | width="55" fixed> |
| | | </el-table-column> |
| | | <!--<el-table-column fixed label="序号" type="index" width="55"></el-table-column>--> |
| | | <el-table-column v-for="item in this.option.column" :key="item.id" |
| | | <el-table-column v-for="(item,index) in this.option.column" :key="item.id" |
| | | :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" |
| | | align="center" |
| | | > |
| | | <template slot-scope="{ row }"> |
| | | <el-input v-if="editingRows === row && editShows== item.prop && item.prop != 'codeDateFormat' && (item.edit == 'text' || item.edit == 'select' ||item.edit == 'refer' )" v-model="row[item.prop]" |
| | | <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-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]" slot="prepend" v-if="editingRows === row && editShows== item.prop && item.prop == 'codeDateFormat' && row[item.prop] ==''" @focus="DataChangeHandler"> |
| | | <el-option label="餐厅名" value="1"></el-option> |
| | | <el-option label="订单号" value="2"></el-option> |
| | | <el-option label="用户电话" value="3"></el-option> |
| | | <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' " @focus="DataChangeHandler(item.editConfig,index)"> |
| | | <el-option |
| | | v-for="optionItem in item.data" |
| | | :key="optionItem.key" |
| | | :label="optionItem.value" |
| | | :value="optionItem.key"> |
| | | </el-option> |
| | | </el-select> |
| | | <el-switch |
| | | v-if="item.edit === 'switch'" v-model="row[item.prop]" active-value="true" |
| | |
| | | <el-table-column |
| | | fixed="right" |
| | | label="操作" |
| | | width="120"> |
| | | width="70"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="small" |
| | |
| | | prop: "prefixValue", |
| | | sortable: true, |
| | | edit: 'select', |
| | | editConfig: { |
| | | extraParams: { |
| | | code: 'codeclstempattr', |
| | | dictKey: 'prefix' |
| | | } |
| | | }, |
| | | cell: false, |
| | | }, |
| | | { |
| | |
| | | prop: "suffixValue", |
| | | sortable: true, |
| | | edit: 'select', |
| | | editConfig: { |
| | | extraParams: { |
| | | code: 'codeclstempattr', |
| | | dictKey: 'suffix' |
| | | } |
| | | }, |
| | | cell: false, |
| | | }, |
| | | { |
| | |
| | | sortable: true, |
| | | width: 135, |
| | | edit: 'select', |
| | | editConfig: { |
| | | extraParams: { |
| | | code: 'codeclstempattr', |
| | | dictKey: 'dateFormates' |
| | | } |
| | | }, |
| | | cell: false, |
| | | }, |
| | | { |
| | |
| | | console.log(row,column) |
| | | }, |
| | | //时间下拉格式 |
| | | DataChangeHandler(){ |
| | | debugger |
| | | listByFlag({comboxKey: 'codedateformat', |
| | | id: 'codedateformat', |
| | | namespace: 'codeclstempattr', |
| | | flag: 'dateFormates'}).then(res=>{ |
| | | console.log(res) |
| | | DataChangeHandler(editConfig,index){ |
| | | listByFlag(editConfig.extraParams).then(res=>{ |
| | | console.log(res); |
| | | this.option.column[index].data=res; |
| | | }) |
| | | }, |
| | | //属性分组按钮 |
| | |
| | | precisionLength: (citem.precisionLength ? citem.precisionLength : '') + (citem.scaleLength ? '(' + citem.scaleLength + ')' : ''), |
| | | classifyTemplateOid: this.crudOid, |
| | | classifytemplateoid: this.crudOid, |
| | | formDisplayFlag: true, |
| | | tableDisplayFlag: true, |
| | | sortAttrFlag: false, |
| | | queryAttrFlag: true, |
| | | seniorQueryAttrFlag: true, |
| | | formDisplayFlag: 'true', |
| | | tableDisplayFlag: 'true', |
| | | sortAttrFlag: 'false', |
| | | queryAttrFlag: 'true', |
| | | seniorQueryAttrFlag: 'true', |
| | | attrTableWidth: 120 |
| | | }) |
| | | this.ProData.push(JSON.parse(JSON.stringify(this.busineAddList))) |