| | |
| | | <template> |
| | | <div> |
| | | <basic-container> |
| | | <avue-crud |
| | | ref="crud" |
| | | v-model="form" |
| | |
| | | append-to-body="true" |
| | | class="avue-dialog" |
| | | title="配置按钮" |
| | | width="70%" |
| | | width="75%" |
| | | @close="dialogClose"> |
| | | <el-container> |
| | | <el-container v-loading="dialogLoading"> |
| | | <el-header style="height: 40px !important;"> |
| | | <div style="display: flex"> |
| | | <el-button :disabled="!disabledBtn" plain size="mini" type="primary" @click="addClickBtnHandler">添加 |
| | |
| | | |
| | | <el-form-item label="Action:" prop="Action"> |
| | | <el-col :span="14"> |
| | | <el-input v-model="basicForm.actionOId" :readonly="disabledBtn"></el-input> |
| | | <el-input v-model="basicForm.actionName" :readonly="disabledBtn" @focus="actionFoucus"></el-input> |
| | | </el-col> |
| | | </el-form-item> |
| | | |
| | |
| | | </el-container> |
| | | </el-container> |
| | | </el-dialog> |
| | | </div> |
| | | <el-dialog |
| | | v-dialogDrag |
| | | :visible.sync="btnActionVisible" |
| | | append-to-body="true" |
| | | class="avue-dialog" |
| | | title="选择Action" |
| | | width="70%"> |
| | | <action-dialog></action-dialog> |
| | | </el-dialog> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | addTapButton, |
| | | updateTapButton, getTabByContextIdAndType |
| | | } from "@/api/UI/uiDefine"; |
| | | import actionDialog from '@/views/modelingMenu/ui/uiDefine/rightRegion/bottomTable/components/action'; |
| | | |
| | | export default { |
| | | props: { |
| | |
| | | default: () => "auto" |
| | | } |
| | | }, |
| | | components: { |
| | | actionDialog |
| | | }, |
| | | name: "index", |
| | | data() { |
| | | return { |
| | | btnActionVisible: false, |
| | | dialogLoading: false, |
| | | saveType: '', |
| | | disabledBtn: true, |
| | | paramsData: [], |
| | |
| | | handler(val) { |
| | | if(val && val.plOId) { |
| | | this.getTableList() |
| | | }else{ |
| | | this.data=[]; |
| | | } |
| | | }, |
| | | immediate: true, |
| | |
| | | moveUp() { |
| | | const index = this.findIndexByEventValue(this.FormData, this.formDataRow.eventValue); |
| | | if (index > 0) { |
| | | // 使用 splice 方法来模拟交换 |
| | | const temp = this.FormData.splice(index - 1, 1, this.FormData[index])[0]; // 移除 index-1 的元素,并在相同位置插入 index 的元素,返回被移除的元素 |
| | | // 使用 splice 来模拟交换 |
| | | const temp = this.FormData.splice(index - 1, 1, this.FormData[index])[0]; // 移除 index-1 的元素 并在相同位置插入 index 的元素 返回被移除的元素 |
| | | this.FormData.splice(index, 1, temp); // 在 index 位置插入之前被移除的元素 |
| | | } |
| | | }, |
| | |
| | | // 按钮设计修改 |
| | | editClickBtnHandler() { |
| | | if (func.isEmptyObject(this.nodeTreeRow)) { |
| | | this.$message.error('请选择节点进行添加'); |
| | | this.$message.error('请选择节点进行修改'); |
| | | return; |
| | | } |
| | | |
| | |
| | | |
| | | // 按钮设计保存 |
| | | saveClickBtnHandler() { |
| | | this.dialogLoading = true; |
| | | const saveFunction = this.saveType === 'add' ? addTapButton : updateTapButton; |
| | | const bottomParams = {}; |
| | | if (this.paramsData.length > 0) { |
| | |
| | | this.getTabBtnTree(); |
| | | this.basicForm = {}; |
| | | this.paramsData = []; |
| | | this.dialogLoading = false; |
| | | } |
| | | }).catch(err => { |
| | | this.dialogLoading = false; |
| | | }) |
| | | }, |
| | | |
| | |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | // 选择action |
| | | actionFoucus() { |
| | | this.btnActionVisible = true; |
| | | } |
| | | } |
| | | } |
| | | </script> |