diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 2e4ce999..f425c469 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -87,6 +87,7 @@ const user = { // 获取用户信息 GetInfo({ commit, state }) { return new Promise((resolve, reject) => { + console.log('GetInfo') getInfo().then(res => { // 没有 data 数据,赋予个默认值 if (!res) { @@ -96,7 +97,7 @@ const user = { user: { id: '', avatar: '', - userName: '', + username: '', nickname: '' } } @@ -113,7 +114,7 @@ const user = { commit('SET_ROLES', ['ROLE_DEFAULT']) } commit('SET_ID', user.id) - commit('SET_NAME', user.userName) + // commit('SET_NAME', user.username) //无效调用,接口未提供username值 commit('SET_NICKNAME', user.nickname) commit('SET_AVATAR', avatar) resolve(res) diff --git a/src/utils/equipment-module.js b/src/utils/equipment-module.js new file mode 100644 index 00000000..42de6eb7 --- /dev/null +++ b/src/utils/equipment-module.js @@ -0,0 +1,4 @@ +import { getDictData } from './dict'; + +export const groupConnectWorkshop = (groupName, workshopValue) => + `${groupName} - ${getDictData('workshop', workshopValue)?.label}`; diff --git a/src/views/specialEquipment/check/CheckOrderListTable.vue b/src/views/specialEquipment/check/CheckOrderListTable.vue index 042771ef..cea20347 100644 --- a/src/views/specialEquipment/check/CheckOrderListTable.vue +++ b/src/views/specialEquipment/check/CheckOrderListTable.vue @@ -51,10 +51,7 @@ {{ scope.row.planCheckTime | timeFilter }} - + @@ -129,7 +126,7 @@ import moment from 'moment'; export default { name: 'CheckOrderListTable', components: {}, - props: ['tableData', 'page', 'limit'], + props: ['tableData', 'page', 'limit', 'permissionGuard'], filters: { timeFilter: (val) => val ? moment(val).format('yyyy-MM-DD HH:mm:ss') : '---', @@ -170,12 +167,7 @@ export default { }, methods: { checkSelectable(row, index) { - return true; - // return ( - // row.relatePlan == 2 || - // (row.relatePlan == 1 && - // (!row.confirmDueTime || +row.confirmDueTime >= new Date().getTime())) - // ); + return this.permissionGuard(row); }, handleSelectionChange(val) { this.selectedOrder = val; diff --git a/src/views/specialEquipment/check/Content-add.vue b/src/views/specialEquipment/check/Content-add.vue index 21f1f702..fc231bf0 100644 --- a/src/views/specialEquipment/check/Content-add.vue +++ b/src/views/specialEquipment/check/Content-add.vue @@ -60,6 +60,8 @@