| | |
| | | > |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button |
| | | <el-button @click="onSubmit('ruleForm')" |
| | | ><i class="el-icon-search"></i> {{ |
| | | $t('userManage.RM.query') |
| | | }}</el-button |
| | |
| | | |
| | | <el-table-column |
| | | align="center" |
| | | prop="depid" |
| | | prop="depName" |
| | | :label="$t('userManage.RM.ownedSystem')" |
| | | /> |
| | | <el-table-column |
| | |
| | | align="center" |
| | | prop="createTime" |
| | | :label="$t('userManage.RM.creationtime')" |
| | | :formatter="formatTime" |
| | | /> |
| | | <el-table-column |
| | | align="center" |
| | |
| | | align="center" |
| | | prop="updateTime" |
| | | :label="$t('userManage.RM.updateontime')" |
| | | :formatter="formatTime" |
| | | /> |
| | | <el-table-column |
| | | align="center" |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import moment from 'moment'; |
| | | import MyBread from '../../components/MyBread.vue'; |
| | | import roleDepTree from './roleDepTree.vue'; |
| | | import { |
| | |
| | | count: 0, |
| | | selData: [], |
| | | listData: { |
| | | name: null, |
| | | depName: null, |
| | | pageIndex: 1, |
| | | pageSize: 10, |
| | | }, |
| | | }; |
| | | }, |
| | | methods: { |
| | | formatTime(row, column) { |
| | | let date = row[column.property]; // 我这里的crtime=1657528899所以这里*1000 |
| | | if (date === undefined || date === null) { |
| | | return ''; |
| | | } |
| | | return moment(parseInt(date)).format('YYYY-MM-DD HH:mm:ss'); |
| | | }, |
| | | showDepTree(res) { |
| | | this.showCata = true; |
| | | this.elTreeFlag = res; |
| | |
| | | switch (this.elTreeFlag) { |
| | | case 1: |
| | | this.roleForm.value = value; |
| | | |
| | | this.roleForm.depid = this.path_id; |
| | | break; |
| | | case 2: |
| | | this.insertform.depid = this.path_id; |
| | |
| | | if (this.listData.tab == '') { |
| | | delete this.listData.tab; |
| | | } |
| | | this.listData.name = this.roleForm.username; |
| | | this.listData.depName = this.roleForm.value; |
| | | const data = await select_Role_ByPageAndCount(this.listData); |
| | | console.log(data.result); |
| | | if (data.code != 200) { |
| | | this.$message.error('列表调用失败'); |
| | | } |
| | |
| | | this.UpdateFormdialog = true; |
| | | }, |
| | | onSubmit() { |
| | | console.log('submit!'); |
| | | console.log(this.roleForm); |
| | | this.getRoleTabelData(); |
| | | }, |
| | | resetForm(formName) { |
| | | this.$refs[formName].resetFields(); |
| | | this.roleForm = {}; |
| | | this.getRoleTabelData(); |
| | | }, |
| | | }, |
| | | created() { |