12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- <template>
- <div class="unit container normal-panel">
- <el-row style="display:flex;justify-content:space-between" :gutter="20">
- <el-col :span="12">
- <p class="normal-title normal-margin">计量单位</p>
- <slot name="unitAdd" :data="unitList"/>
- <table-new-layout v-if="unitList" :layout="tablecols1" :data="unitList" :custom="false" height="calc(100vh - 250px)">
- <template v-slot:opreation="scope">
- <div style="display:flex">
- <slot name="unitEdit" :data="scope.data" />
- <slot name="unitDel" :data="scope" />
- </div>
- </template>
- </table-new-layout>
- </el-col>
- <el-col :span="12">
- <p class="normal-title normal-margin">计量单位组</p>
- <slot name="unitGroupAdd" :data="unitList"/>
- <table-new-layout v-if="unitGroupList" :layout="tablecols2" :data="unitGroupList" :custom="false" height="calc(100vh - 250px)">
- <template v-slot:opreation="scope">
- <div style="display:flex">
- <slot name="unitGroupEdit" :data="{row:scope.data,unitList:unitList}" />
- <slot name="unitGroupDel" :data="scope.data" />
- </div>
- </template>
- </table-new-layout>
- </el-col>
- </el-row>
- </div>
- </template>
- <script>
- export default {
- name: '',
- data() {
- return {
- unitList:'',
- unitGroupList:'',
- tablecols1:'',
- tabelCol2:''
- };
- },
- computed:{
- },
- watch:{
- },
- created() {
- this.getUnit()
- this.getUnitGroup()
- this.tablecols1 = this.tool.tabelCol(this.$route.name).unitTable.tablecols
- this.tablecols2 = this.tool.tabelCol(this.$route.name).unitGroupTable.tablecols
- },
- methods: {
- /* 获取单位列表 */
- async getUnit() {
- let res = await this.$api.requested({
- "id": "20220922084803",
- "version":1,
- "content": {
- "nocache":true,
- "pageSize":999999999,
- "pageNumber":1,
- "where":{
- "condition":""
- }
- }
- })
- this.unitList = res.data
- console.log(res)
- },
- /* 计量单位组数据 */
- async getUnitGroup() {
- let res = await this.$api.requested({
- "id": "20220922084503",
- "version":1,
- "content": {
- "nocache":true,
- "pageSize":999999999,
- "pageNumber":1,
- "where":{
- "condition":""
- }
- }
- })
- this.unitGroupList = res.data
- console.log(res);
- }
- },
- };
- </script>
- <style scoped>
- a{
- justify-content: sp;
- }
- </style>
|