| | |
| | | <FormTemplateDialog |
| | | :visible.sync="addvisible" |
| | | :type="add" |
| | | :templateOid="this.templateOids" |
| | | :codeClassifyOid="this.codeClassifyOids" |
| | | :templateOid="this.templateOid" |
| | | :codeClassifyOid="this.codeClassifyOid" |
| | | :codeRuleOid="this.codeRuleOid" |
| | | :disabledProp="disabledProp" |
| | | :rowOid="rowOid" |
| | | > |
| | | </FormTemplateDialog></el-button> |
| | | <el-button size="small" type="primary" plain @click="editvisible=true">编辑 |
| | |
| | | :visible.sync="editvisible" |
| | | :type="edit" |
| | | :templateOid="this.templateOids" |
| | | :codeClassifyOid="this.codeClassifyOids" |
| | | :codeClassifyOid="this.codeClassifyOid" |
| | | :codeRuleOid="this.codeRuleOid" |
| | | :disabledProp="disabledProp" |
| | | :rowOid="rowOid" |
| | |
| | | <el-button size="small" type="primary" plain>发布</el-button> |
| | | <el-button size="small" type="primary" plain>数据更改</el-button> |
| | | <el-button size="small" type="primary" plain>回收</el-button> |
| | | <el-button size="small" type="primary" plain>导出 |
| | | <transfer filter-placeholder="请输入拼音全拼或者拼音缩写" ></transfer> |
| | | <el-button size="small" type="primary" plain @click="openD">导出 |
| | | <integration-transfer :visible.sync="dialogPush" :data="transferData" |
| | | :props="transferProps" @save="handelTransferSave"></integration-transfer> |
| | | </el-button> |
| | | <el-button size="small" type="primary" plain @click="findvisible=true">查询 |
| | | <advancedQuery :visible.sync="findvisible" :options="this.options"></advancedQuery> |
| | |
| | | </template> |
| | | <script> |
| | | import {MasterTable, TableData} from "@/api/GetItem"; |
| | | import {listCodeAttributeByClassId} from '@/api/integration/integration.js' |
| | | import integrationTransfer from '@/views/integration/integrationTransfer' |
| | | import pinyin from "js-pinyin"; |
| | | export default { |
| | | components: { |
| | | integrationTransfer |
| | | }, |
| | | name: "Crud.vue", |
| | | props:{ |
| | | page:{ |
| | |
| | | tableDataArray:{ |
| | | type:Array, |
| | | default:[] |
| | | }, |
| | | total:{ |
| | | type:String, |
| | | default:"" |
| | | }, |
| | | tableHeadDataFateher:{ |
| | | type:Array, |
| | | default:[] |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | transferData:[], |
| | | transferProps: { |
| | | key: 'oid', |
| | | label: 'name' |
| | | }, |
| | | templateOid:"", |
| | | addvisible:false, |
| | | editvisible:false, |
| | | findvisible:false, |
| | | templateOids: "78B8C7C5-A042-0B96-FE6D-65421451782A", |
| | | codeClassifyOids: "4524E801-6CC6-92E8-1AC3-2AB9604E8F96", |
| | | codeRuleOid: "B95872A6-9CEA-D490-8F1B-9D26548CAF96", |
| | | dialogPush:false, |
| | | rowOid: '6EF696C3-CD87-0E7C-1EA1-8DE3913A95C9', |
| | | disabledProp: ["id"], |
| | | editingRow:null, |
| | |
| | | }, |
| | | tableData:[], |
| | | tableHeadData:[], |
| | | tableHeadDataFateher:[], |
| | | items:{}, |
| | | aaa:"" |
| | | seniorQueryColumns:[] |
| | | } |
| | | }, |
| | | computed:{ |
| | | }, |
| | | created() { |
| | | this.CrudHeaderRend(); |
| | | this.$emit('tableData',this.tableData) |
| | | // this.CrudHeaderRend(); |
| | | // this.tableHeadHandle() |
| | | }, |
| | | mounted() { |
| | | |
| | |
| | | tableDataArray:{ |
| | | handler(newval,oldval){ |
| | | this.tableData=newval; |
| | | this.CrudRend() |
| | | // |
| | | } |
| | | }, |
| | | total:{ |
| | | handler(newval,oldval){ |
| | | this.page.total=newval; |
| | | } |
| | | }, |
| | | tableHeadData:{ |
| | | handler(newval,oldval){ |
| | | this.tableHeadDataFateher=newval |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | openD(){ |
| | | this.dialogPush=true; |
| | | this.getListCodeByClassId() |
| | | }, |
| | | async getListCodeByClassId() { |
| | | this.transferData = [] |
| | | const response = await listCodeAttributeByClassId({ codeClassifyId: this.codeClassifyOid }) |
| | | if (response.status === 200) { |
| | | const data = response.data.data |
| | | this.transferData = data |
| | | } |
| | | }, |
| | | rend(){ |
| | | this.tableData=this.tableHeadData |
| | | }, |
| | |
| | | this.page.pageSize=val |
| | | this.$emit('pageSize',val) |
| | | this.CrudRend() |
| | | console.log(this.tableData) |
| | | }, |
| | | handleCurrentChange(val){ |
| | | this.page.currentPage=val |
| | | this.$emit('currentPage',val) |
| | | this.CrudRend() |
| | | console.log(val) |
| | | console.log(this.tableData) |
| | | }, |
| | | // 监听单元格点击事件并存储正在编辑的行 |
| | | handleCellClick(row, column) { |
| | | this.editingRow = row; |
| | | this.editShow = column.property; |
| | | console.log(row) |
| | | this.rowOid=row.oid |
| | | }, |
| | | //删除 |
| | | enumDeleteRow(row) { |
| | |
| | | this.$nextTick(() => { |
| | | this.$refs.crud.doLayout(); |
| | | }); |
| | | }, |
| | | tableHeadHandle(){ |
| | | this.options=this.tableHeadDataFateher.tableDefineVO.seniorQueryColumns |
| | | this.List = this.tableHeadDataFateher.tableDefineVO.cols[0]; |
| | | this.List.forEach(item => { |
| | | let columnItem = { |
| | | label: item.title, |
| | | prop: item.field, |
| | | type: this.columnType[item.type], |
| | | sortable: item.sort, |
| | | width: item.minWidth |
| | | }; |
| | | this.option.column.push(columnItem); |
| | | this.option.column=this.tableHeadData; |
| | | }) |
| | | }, |
| | | //表格头渲染 |
| | | CrudHeaderRend() { |
| | |
| | | this.option.column=this.tableHeadData; |
| | | this.templateOid=res.data.tableDefineVO.oid |
| | | this.$emit('templateOid',this.templateOid) |
| | | console.log(this.templateOid) |
| | | }) |
| | | }) |
| | | } |