| | |
| | | :icon="item.paramVOS.webUiButtonIcon ? item.paramVOS.webUiButtonIcon : (item.paramVOS.webUiButtonMethods === 'edit' ? 'el-icon-edit' : (item.paramVOS.webUiButtonMethods === 'delete' ? 'el-icon-delete' : ''))" |
| | | :type="item.paramVOS.webUiButtonType || 'text'" plain |
| | | size="small" |
| | | @click="buttonClick(item,scope)"> |
| | | @click="buttonClick(item)"> |
| | | {{ item.name }} |
| | | </el-button> |
| | | <!-- 表格内按钮操作对话框表单 --> |
| | |
| | | <el-button v-for="item in basicButtonList" |
| | | :key="item.oid" |
| | | :icon="item.paramVOS.webUiButtonIcon" |
| | | :type="(item.paramVOS.webUiButtonType !== 'text' ? item.paramVOS.buttonType : 'primary') || 'primary'" |
| | | :type="(item.paramVOS.webUiButtonType !== 'text' ? item.paramVOS.webUiButtonType : 'primary') || 'primary'" |
| | | plain |
| | | size="small" |
| | | @click="buttonClick(item)"> |
| | |
| | | type: Object, |
| | | }, |
| | | butttonList: { |
| | | type: Array |
| | | }, |
| | | selectList: { |
| | | type: Array |
| | | } |
| | | }, |
| | |
| | | }, |
| | | computed: { |
| | | basicButtonList() { |
| | | // const basicColumn = this.butttonList.filter(item => item.id !== 'launchworkflow'); // 首先过滤出来基础表单事件的按钮 |
| | | const basicColumn = this.butttonList; |
| | | |
| | | if (this.type === 'form') { |
| | | |
| | | return basicColumn; |
| | | |
| | | } else if (this.type === 'table') { |
| | | |
| | | const top = basicColumn.filter(item => item.paramVOS.webUiButtonLocation === 'top' || func.isEmpty(item.paramVOS.webUiButtonLocation)); // 过滤出来表格上面区域展示的按钮 |
| | | const menu = basicColumn.filter(item => item.paramVOS.webUiButtonLocation === 'menu'); // 过滤出来操作栏展示的按钮 |
| | | |
| | |
| | | } |
| | | |
| | | function handleEdit() { |
| | | this.visible = true; |
| | | this.$refs.dynamicForm.form = this.scope.row; |
| | | const location = item.paramVOS.webUiButtonLocation; |
| | | if (location === 'menu') { |
| | | this.visible = true; |
| | | this.$refs.dynamicForm.form = this.scope.row; |
| | | } else if (location === 'top' && this.selectList.length === 1) { |
| | | this.visible = true; |
| | | this.$refs.dynamicForm.form = this.selectList[0]; |
| | | } else { |
| | | const messageText = this.selectList.length > 1 ? '只能选择一条数据进行编辑!' : '请选择一条数据进行编辑!'; |
| | | this.$message.warning(messageText); |
| | | } |
| | | } |
| | | |
| | | function handleDelete() { |
| | | this.$message.success('删除成功!'); |
| | | const location = item.paramVOS.webUiButtonLocation; |
| | | if (location === 'top') { |
| | | if (this.selectList.length <= 0) { |
| | | this.$message.warning('请至少选择一条数据!') |
| | | } else { |
| | | this.$message.success('删除成功!'); |
| | | } |
| | | } else if (location === 'menu') { |
| | | this.$message.success('删除成功!'); |
| | | } |
| | | } |
| | | |
| | | const methodHandlers = { |
| | |
| | | } |
| | | }, |
| | | mounted() { |
| | | // console.log('componentVO--',this.componentVO.tableDefineVO.cols[0]) |
| | | }, |
| | | computed: { |
| | | option() { |
| | |
| | | <avue-form v-model="form" :option="option" @submit="submitHandler" @reset-change="changeHandler"> |
| | | <template v-for="item in slotData" :slot="item.prop + 'Label'"> |
| | | <span> |
| | | <span>{{ item.label }} </span> |
| | | <span>{{ item.label }}</span> |
| | | <el-tooltip |
| | | v-if="item.keyAttr" |
| | | class="item" |
| | |
| | | <template> |
| | | <div class="UI-dynamic" :id="'UI-dynamic-'+areasName+componentVO.oid"> |
| | | <avue-crud v-model="form" |
| | | ref="dataTable" |
| | | :data="tableList" |
| | | :option="option" |
| | | :page.sync="page" |
| | | :table-loading="loading"> |
| | | <!--top区域按钮--> |
| | | <template slot="menuLeft" slot-scope="scope"> |
| | | <dynamic-button LocationType="top" type="table":butttonList="componentVO.buttons" ></dynamic-button> |
| | | </template> |
| | | <avue-crud v-model="form" |
| | | ref="dataTable" |
| | | :data="tableList" |
| | | :option="option" |
| | | :page.sync="page" |
| | | :table-loading="loading" |
| | | @selection-change="selectChange"> |
| | | <!--top区域按钮--> |
| | | <template slot="menuLeft" slot-scope="scope"> |
| | | <dynamic-button LocationType="top" type="table":butttonList="componentVO.buttons" :selectList="selectList"></dynamic-button> |
| | | </template> |
| | | |
| | | <!--menu区域按钮--> |
| | | <template slot="menu" slot-scope="scope"> |
| | | <dynamic-button :scope="scope" LocationType="menu" type="table":butttonList="componentVO.buttons" ></dynamic-button> |
| | | </template> |
| | | </avue-crud> |
| | | </div> |
| | | <!--menu区域按钮--> |
| | | <template slot="menu" slot-scope="scope"> |
| | | <dynamic-button :scope="scope" LocationType="menu" type="table":butttonList="componentVO.buttons" :selectList="selectList"></dynamic-button> |
| | | </template> |
| | | </avue-crud> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | //所在区域是否已显示,针对tab和collapse |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | dataStore:{ |
| | | //弹窗时按钮所属区域选中数据 |
| | | type:Array, |
| | | default: [] |
| | | }, |
| | | }, |
| | | data() { |
| | |
| | | addBtn: false, |
| | | editBtn: false, |
| | | delBtn: false, |
| | | selection:true, |
| | | height: '100%', |
| | | calcHeight: 15, |
| | | indexFixed: false, |
| | | menuFixed: false, |
| | | column: [], |
| | | }, |
| | | selectList:[] |
| | | } |
| | | }, |
| | | computed: { |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | selectChange(row){ |
| | | this.selectList = row; |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | "pkComponent": "2D6D571B-BB6E-677D-9764-191BC5D5D3F1", |
| | | "pkParentOid": "", |
| | | "url": "RefreshAction" |
| | | } |
| | | }, |
| | | { |
| | | "actionVO": { |
| | | "actionCls": "", |
| | | "actionUsedType": "business", |
| | | "bsUrl": "BaseEditAction#doAction", |
| | | "createTime": "2013-11-09 10:32:41.000", |
| | | "creator": "eddieliu", |
| | | "csClass": "plm.uif.actions.client.EditAction", |
| | | "description": "修改业务对象", |
| | | "id": "edit", |
| | | "lastModifier": "developer", |
| | | "lastModifyTime": "2013-11-09 10:32:41.000", |
| | | "licensors": null, |
| | | "name": "修改", |
| | | "oid": "F8534EFE-130B-0CB3-D477-2AC7B19B7DC4" |
| | | }, |
| | | "areaType": "tab", |
| | | "authorization": true, |
| | | "children": null, |
| | | "createTime": "2022-07-18 17:30:52.000", |
| | | "creator": "developer", |
| | | "csUrl": "plm.uif.actions.client.EditAction", |
| | | "description": "", |
| | | "displayMode": "textandimage", |
| | | "hidden": false, |
| | | "iconPath": "", |
| | | "id": "edit", |
| | | "lastModifier": "developer", |
| | | "lastModifyTime": "2022-07-18 17:30:52.000", |
| | | "name": "修改", |
| | | "oid": "43F34DC1-C229-359B-AED3-38CA9E7D1534", |
| | | "orderNum": 1, |
| | | "paramVOS": { |
| | | "owner": "true", |
| | | "context": "CreateAuditQuestionDocume", |
| | | "type": "document", |
| | | 'webUiButtonLocation': 'top', |
| | | 'webUiButtonMethods': 'edit', |
| | | }, |
| | | "pkComponent": "E00C3C31-D27F-E3AC-6C2B-1882EE8B6FEE", |
| | | "pkParentOid": "", |
| | | "url": "BaseEditAction#doAction" |
| | | }, |
| | | { |
| | | "actionVO": { |
| | | "actionCls": "", |
| | | "actionUsedType": "business", |
| | | "bsUrl": "BaseEditAction#doAction", |
| | | "createTime": "2013-11-09 10:32:41.000", |
| | | "creator": "eddieliu", |
| | | "csClass": "plm.uif.actions.client.EditAction", |
| | | "description": "修改业务对象", |
| | | "id": "edit", |
| | | "lastModifier": "developer", |
| | | "lastModifyTime": "2013-11-09 10:32:41.000", |
| | | "licensors": null, |
| | | "name": "修改", |
| | | "oid": "F8534EFE-130B-0CB3-D477-2AC7B19B7DC4" |
| | | }, |
| | | "areaType": "tab", |
| | | "authorization": true, |
| | | "children": null, |
| | | "createTime": "2022-07-18 17:30:52.000", |
| | | "creator": "developer", |
| | | "csUrl": "plm.uif.actions.client.EditAction", |
| | | "description": "", |
| | | "displayMode": "textandimage", |
| | | "hidden": false, |
| | | "iconPath": "", |
| | | "id": "edit", |
| | | "lastModifier": "developer", |
| | | "lastModifyTime": "2022-07-18 17:30:52.000", |
| | | "name": "修改", |
| | | "oid": "43F34DC1-C229-359B-AED3-38CA9E7D1534", |
| | | "orderNum": 1, |
| | | "paramVOS": { |
| | | "owner": "true", |
| | | "context": "CreateAuditQuestionDocume", |
| | | "type": "document", |
| | | 'webUiButtonLocation': 'menu', |
| | | 'webUiButtonMethods': 'edit', |
| | | }, |
| | | "pkComponent": "E00C3C31-D27F-E3AC-6C2B-1882EE8B6FEE", |
| | | "pkParentOid": "", |
| | | "url": "BaseEditAction#doAction" |
| | | }, |
| | | { |
| | | "actionVO": { |
| | | "actionCls": "", |
| | | "actionUsedType": "business", |
| | | "bsUrl": "", |
| | | "createTime": "2021-12-03 15:28:19.000", |
| | | "creator": "developer", |
| | | "csClass": "net=VCI.Plugin.631.Actions.dll", |
| | | "description": "删除工艺问题", |
| | | "id": "deleteprocessquestion", |
| | | "lastModifier": "developer", |
| | | "lastModifyTime": "2021-12-03 15:28:19.000", |
| | | "licensors": null, |
| | | "name": "删除工艺问题", |
| | | "oid": "FD73DF30-7269-8A85-1B62-B92435000280" |
| | | }, |
| | | "areaType": "tab", |
| | | "authorization": true, |
| | | "children": null, |
| | | "createTime": "2022-07-18 17:30:52.000", |
| | | "creator": "developer", |
| | | "csUrl": "net=VCI.Plugin.631.Actions.dll", |
| | | "description": "", |
| | | "displayMode": "textandimage", |
| | | "hidden": false, |
| | | "iconPath": "", |
| | | "id": "deleteprocessquestion", |
| | | "lastModifier": "developer", |
| | | "lastModifyTime": "2022-07-18 17:30:52.000", |
| | | "name": "删除", |
| | | "oid": "BE973D4A-CB99-10FC-3E31-F3010259F823", |
| | | "orderNum": 2, |
| | | "paramVOS": { |
| | | "owner": "true", |
| | | 'webUiButtonLocation': 'menu', |
| | | 'webUiButtonType': 'text', |
| | | 'webUiButtonMethods': 'delete' |
| | | }, |
| | | "pkComponent": "E00C3C31-D27F-E3AC-6C2B-1882EE8B6FEE", |
| | | "pkParentOid": "", |
| | | "url": "" |
| | | }, |
| | | { |
| | | "actionVO": { |
| | | "actionCls": "", |
| | | "actionUsedType": "business", |
| | | "bsUrl": "", |
| | | "createTime": "2021-12-03 15:28:19.000", |
| | | "creator": "developer", |
| | | "csClass": "net=VCI.Plugin.631.Actions.dll", |
| | | "description": "删除工艺问题", |
| | | "id": "deleteprocessquestion", |
| | | "lastModifier": "developer", |
| | | "lastModifyTime": "2021-12-03 15:28:19.000", |
| | | "licensors": null, |
| | | "name": "删除工艺问题", |
| | | "oid": "FD73DF30-7269-8A85-1B62-B92435000280" |
| | | }, |
| | | "areaType": "tab", |
| | | "authorization": true, |
| | | "children": null, |
| | | "createTime": "2022-07-18 17:30:52.000", |
| | | "creator": "developer", |
| | | "csUrl": "net=VCI.Plugin.631.Actions.dll", |
| | | "description": "", |
| | | "displayMode": "textandimage", |
| | | "hidden": false, |
| | | "iconPath": "", |
| | | "id": "deleteprocessquestion", |
| | | "lastModifier": "developer", |
| | | "lastModifyTime": "2022-07-18 17:30:52.000", |
| | | "name": "删除", |
| | | "oid": "BE973D4A-CB99-10FC-3E31-F3010259F823", |
| | | "orderNum": 2, |
| | | "paramVOS": { |
| | | "owner": "true", |
| | | 'webUiButtonLocation': 'top', |
| | | 'webUiButtonMethods': 'delete' |
| | | }, |
| | | "pkComponent": "E00C3C31-D27F-E3AC-6C2B-1882EE8B6FEE", |
| | | "pkParentOid": "", |
| | | "url": "" |
| | | }, |
| | | ], |
| | | "checkInBy": null, |
| | | "checkInTime": null, |