desc: 修改显示字段,增加loading

This commit is contained in:
zyy 2019-09-02 11:04:23 +08:00
parent 6e60afb4e6
commit 6fa64dd26b
7 changed files with 45 additions and 44 deletions

View File

@ -30,9 +30,9 @@
</el-scrollbar>
</el-tab-pane>
<div v-if="hasProduct" class="btn-buy">
<el-button :loading="buttonLoading" type="success" @click="buy">{{ $t('global.buy') }}</el-button>
<el-button v-if="hasPermssion" :loading="buttonLoading" type="primary" @click="distribute">{{ $t('global.distributePermission') }}</el-button>
<el-button v-if="hasPermssion" :loading="buttonLoading" type="primary" @click="transfer">{{ $t('global.transferQRCode') }}</el-button>
<el-button type="success" @click="buy">{{ $t('global.buy') }}</el-button>
<el-button v-if="hasPermssion" type="primary" @click="distribute">{{ $t('global.distributePermission') }}</el-button>
<el-button v-if="hasPermssion" type="primary" @click="transfer">{{ $t('global.transferQRCode') }}</el-button>
<el-button v-show="isStartDemon" :loading="buttonLoading" type="primary" @click="start">{{ $t('demonstration.startSimulation') }}</el-button>
<el-button v-show="isCreateRoom" :loading="buttonLoading" type="primary" @click="start">{{ $t('demonstration.createRoom') }}</el-button>
<el-button v-show="isInRoom" :loading="buttonLoading" type="primary" @click="joinRoom">{{ $t('demonstration.enterRoom') }}</el-button>

View File

@ -16,7 +16,7 @@
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="show = false"> </el-button>
<el-button type="primary" @click="handleSure"> </el-button>
<el-button type="primary" :loading="status" @click="handleSure"> </el-button>
</span>
</el-dialog>
</template>
@ -34,7 +34,8 @@ export default {
loadNum: 1
},
maxNumber: 1,
pickerOptions: { selectableRange: '00:00:00 - 23:59:59' }
pickerOptions: { selectableRange: '00:00:00 - 23:59:59' },
status: false
};
},
computed: {
@ -77,6 +78,7 @@ export default {
this.show = true;
},
doClose() {
this.status = false;
this.show = false;
},
handleChange(initTime) {
@ -96,6 +98,7 @@ export default {
handleSure() {
this.$refs.form.validate((valid) => {
if (valid) {
this.status = true;
const model = {
initTime: this.formatTime(this.formModel.initTime)
};

View File

@ -35,9 +35,9 @@
</div>
<div class="btn-buy">
<el-button type="success" @click="buy">购买</el-button>
<el-button v-if="hasPermssion" :loading="loading" type="primary" @click="distribute">权限分发(考试)</el-button>
<el-button v-if="hasPermssion" :loading="loading" type="primary" @click="transfer">权限转赠</el-button>
<el-button v-if="isAddRule" :loading="loading" type="primary" @click="checkCourse">查看课程试卷</el-button>
<el-button v-if="hasPermssion" type="primary" @click="distribute">权限分发(考试)</el-button>
<el-button v-if="hasPermssion" type="primary" @click="transfer">权限转赠</el-button>
<el-button v-if="isAddRule" type="primary" @click="checkCourse">查看课程试卷</el-button>
</div>
</el-card>
</template>

View File

@ -210,7 +210,7 @@ export default {
// });
},
formatterDate(row, porpInfo) {
return row[porpInfo.property];
return row[porpInfo.property] ? row[porpInfo.property] : '---';
},
queryFunction(params) {
return listPackagePermission(params);

View File

@ -166,7 +166,7 @@ export default {
});
},
formatterDate(row, porpInfo) {
return row[porpInfo.property];
return row[porpInfo.property] ? row[porpInfo.property] : '---';
},
queryFunction(params) {
return listPermision(params);

View File

@ -20,7 +20,7 @@ export default {
return {
param: '',
WhetherTypeList: [],
EffectiveTypeList: [],
// EffectiveTypeList: [],
PermissionTypeList: [],
pagerConfig: {
pageSize: 'pageSize',
@ -37,14 +37,14 @@ export default {
data: []
}
},
'status': {
type: 'select',
label: this.$t('permission.permissionStatus'),
value: '1',
config: {
data: []
}
},
// 'status': {
// type: 'select',
// label: this.$t('permission.permissionStatus'),
// value: '1',
// config: {
// data: []
// }
// },
'canDistribute': {
type: 'select',
label: this.$t('permission.permissionUseType'),
@ -121,18 +121,18 @@ export default {
prop: 'ownerName',
isShow: () => { return this.$store.state.user.roles.indexOf(superAdmin) != -1; }
},
{
title: this.$t('permission.permissionStatus'),
prop: 'status',
type: 'tag',
columnValue: (row) => { return this.$convertField(row.status, this.EffectiveTypeList, ['value', 'label']); },
tagType: (row) => {
switch (row.status) {
case '1': return 'success';
default: return 'danger';
}
}
},
// {
// title: this.$t('permission.permissionStatus'),
// prop: 'status',
// type: 'tag',
// columnValue: (row) => { return this.$convertField(row.status, this.EffectiveTypeList, ['value', 'label']); },
// tagType: (row) => {
// switch (row.status) {
// case '1': return 'success';
// default: return 'danger';
// }
// }
// },
{
type: 'button',
title: this.$t('global.operate'),
@ -164,28 +164,26 @@ export default {
loadInitData() {
this.queryForm.queryObject.canDistribute.config.data = this.$ConstSelect.PermissionUseList;
this.$Dictionary.effectiveType().then(list => {
list.forEach(elem => {
this.queryForm.queryObject.status.config.data.push({ value: elem.code, label: elem.name });
});
this.$convertList(list, this.EffectiveTypeList, elem => {
return true;
});
});
// this.$Dictionary.effectiveType().then(list => {
// list.forEach(elem => {
// this.queryForm.queryObject.status.config.data.push({ value: elem.code, label: elem.name });
// });
// this.$convertList(list, this.EffectiveTypeList, elem => {
// return true;
// });
// });
this.$Dictionary.permissionType().then(list => {
list.forEach(elem => {
this.queryForm.queryObject.type.config.data.push({ value: elem.code, label: elem.name });
});
console.log(list);
this.$convertList(list, this.PermissionTypeList, elem => {
return true;
});
console.log(this.PermissionTypeList);
});
},
formatterDate(row, porpInfo) {
return row[porpInfo.property];
return row[porpInfo.property] ? row[porpInfo.property] : '---';
},
queryFunction(params) {
return listUserPermision(params);

View File

@ -42,8 +42,8 @@
</div>
<div class="btn-buy">
<el-button type="success" @click="buy">{{ $t('teach.buy') }}</el-button>
<el-button v-if="hasPermssion" :loading="loading" type="primary" @click="distribute">{{ $t('teach.permissionDistribute') }}</el-button>
<el-button v-if="hasPermssion" :loading="loading" type="primary" @click="transfer">{{ $t('teach.authorityTransferred') }}</el-button>
<el-button v-if="hasPermssion" type="primary" @click="distribute">{{ $t('teach.permissionDistribute') }}</el-button>
<el-button v-if="hasPermssion" type="primary" @click="transfer">{{ $t('teach.authorityTransferred') }}</el-button>
</div>
</el-card>
</template>