-
-
-
-
-
-
-
-
-
-
-
- 创建
- 返回
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+ 创建
+ 返回
+
+
\ No newline at end of file
+
diff --git a/src/views/orderauthor/author/index.vue b/src/views/orderauthor/author/index.vue
index 8f79cbb1f..3092fc010 100644
--- a/src/views/orderauthor/author/index.vue
+++ b/src/views/orderauthor/author/index.vue
@@ -76,7 +76,7 @@
title: '权限类型',
prop: 'type',
type: 'tag',
- columnValue: (row) => { return this.convertField(row.type, this.PermissionTypeList, ['value', 'label']) },
+ columnValue: (row) => { return this.$convertField(row.type, this.PermissionTypeList, ['value', 'label']) },
tagType: (row) => { return '' }
},
{
@@ -128,7 +128,7 @@
title: '课程权限状态',
prop: 'status',
type: 'tag',
- columnValue: (row) => { return this.convertField(row.status, this.EffectiveTypeList, ['value', 'label']) },
+ columnValue: (row) => { return this.$convertField(row.status, this.EffectiveTypeList, ['value', 'label']) },
tagType: (row) => {
switch (row.status) {
case '1': return 'success';
@@ -183,30 +183,9 @@
this.loadInitData();
},
methods: {
- convertList(FromList, ToList, ChecktypeFunction) {
- if (FromList) {
- ToList.length = 0;
- FromList.forEach(elem => {
- if (ChecktypeFunction(elem)) {
- ToList.push({ value: elem.code, label: elem.name });
- }
- });
- }
- },
- convertField(fieldValue, enumList, converFormat) {
- if (converFormat && converFormat.length >= 2) {
- let value = converFormat[0];
- let label = converFormat[1];
- for (let i = 0; enumList && i < enumList.length; i++) {
- if ('' + fieldValue === '' + enumList[i][value]) {
- return enumList[i][label];
- }
- }
- }
- },
loadInitData() {
this.$Dictionary.effectiveType().then(list => {
- this.convertList(list, this.EffectiveTypeList, elem => {
+ this.$convertList(list, this.EffectiveTypeList, elem => {
return true;
});
});
@@ -214,7 +193,7 @@
list.forEach(elem => {
this.queryForm.queryObject.type.config.data.push({ value: elem.code, label: elem.name });
});
- this.convertList(list, this.PermissionTypeList, elem => {
+ this.$convertList(list, this.PermissionTypeList, elem => {
return true;
});
});
diff --git a/src/views/orderauthor/commodity/draft.vue b/src/views/orderauthor/commodity/draft.vue
index 672d1284f..1f830175a 100644
--- a/src/views/orderauthor/commodity/draft.vue
+++ b/src/views/orderauthor/commodity/draft.vue
@@ -190,16 +190,6 @@
resizeHandler: function () {
this.height = this._clientHeight - 170;
},
- convertList(FromList, ToList, ChecktypeFunction) {
- if (FromList) {
- ToList.length = 0;
- FromList.forEach(elem => {
- if (ChecktypeFunction(elem)) {
- ToList.push({ value: elem.code, label: elem.name });
- }
- });
- }
- },
async initLoadPage() {
// 加载字典数据
// 加载地图,产品,课程
@@ -218,7 +208,7 @@
}
// 产品类型
this.$Dictionary.productType().then(list => {
- this.convertList(list, this.productTypeList, elem => {
+ this.$convertList(list, this.productTypeList, elem => {
return true;
});
});
@@ -226,7 +216,7 @@
// 时间类型
this.TimeStyleDict = {};
this.$Dictionary.timeStyleType().then(list => {
- this.convertList(list, this.TimeStyleList, elem => {
+ this.$convertList(list, this.TimeStyleList, elem => {
return true;
});
list.forEach(elem => {
diff --git a/src/views/orderauthor/commodity/index.vue b/src/views/orderauthor/commodity/index.vue
index a3fd4f582..913c29417 100644
--- a/src/views/orderauthor/commodity/index.vue
+++ b/src/views/orderauthor/commodity/index.vue
@@ -64,7 +64,7 @@
title: '产品类型',
prop: 'productType',
type: 'tag',
- columnValue: (row) => { return this.convertField(row.productType, this.productTypeList, ['value', 'label']) },
+ columnValue: (row) => { return this.$convertField(row.productType, this.productTypeList, ['value', 'label']) },
tagType: (row) => { return 'success' }
},
{
@@ -87,7 +87,7 @@
title: '状态',
prop: 'status',
type: 'tag',
- columnValue: (row) => { return this.convertField(row.status, this.EffectiveTypeList, ['value', 'label']) },
+ columnValue: (row) => { return this.$convertField(row.status, this.EffectiveTypeList, ['value', 'label']) },
tagType: (row) => {
switch (row.status) {
case '1': return 'success';
@@ -149,19 +149,9 @@
this.loadInitData();
},
methods: {
- convertList(FromList, ToList, ChecktypeFunction) {
- if (FromList) {
- ToList.length = 0;
- FromList.forEach(elem => {
- if (ChecktypeFunction(elem)) {
- ToList.push({ value: elem.code, label: elem.name });
- }
- });
- }
- },
async loadInitData() {
this.$Dictionary.effectiveType().then(list => {
- this.convertList(list, this.EffectiveTypeList, elem => {
+ this.$convertList(list, this.EffectiveTypeList, elem => {
return true;
});
});
@@ -170,7 +160,7 @@
list.forEach(elem => {
this.queryForm.queryObject.productType.config.data.push({ value: elem.code, label: elem.name });
});
- this.convertList(list, this.productTypeList, elem => {
+ this.$convertList(list, this.productTypeList, elem => {
return true;
});
});
@@ -184,17 +174,6 @@
console.error(error, '获取发布地图');
}
},
- convertField(fieldValue, enumList, converFormat) {
- if (converFormat && converFormat.length >= 2) {
- let value = converFormat[0];
- let label = converFormat[1];
- for (let i = 0; enumList && i < enumList.length; i++) {
- if ('' + fieldValue === '' + enumList[i][value]) {
- return enumList[i][label];
- }
- }
- }
- },
handleEdit(index, row) {
this.$router.push({ path: `${UrlConfig.orderauthor.commodityDraft}/edit/${row.id}` });
},
diff --git a/src/views/orderauthor/order/addGoods.vue b/src/views/orderauthor/order/addGoods.vue
index e6aeb70f9..3b784f069 100644
--- a/src/views/orderauthor/order/addGoods.vue
+++ b/src/views/orderauthor/order/addGoods.vue
@@ -78,7 +78,7 @@
title: '产品类型',
prop: 'productType',
type: 'tag',
- columnValue: (row) => { return this.convertField(row.productType, this.productTypeList, ['value', 'label']) },
+ columnValue: (row) => { return this.$convertField(row.productType, this.productTypeList, ['value', 'label']) },
tagType: (row) => { return 'success' }
},
{
@@ -101,7 +101,7 @@
title: '状态',
prop: 'status',
type: 'tag',
- columnValue: (row) => { return this.convertField(row.status, this.EffectiveTypeList, ['value', 'label']) },
+ columnValue: (row) => { return this.$convertField(row.status, this.EffectiveTypeList, ['value', 'label']) },
tagType: (row) => {
switch (row.status) {
case '1': return 'success';
@@ -148,19 +148,9 @@
doClose() {
this.show = false;
},
- convertList(FromList, ToList, ChecktypeFunction) {
- if (FromList) {
- ToList.length = 0;
- FromList.forEach(elem => {
- if (ChecktypeFunction(elem)) {
- ToList.push({ value: elem.code, label: elem.name });
- }
- });
- }
- },
async loadInitData() {
this.$Dictionary.effectiveType().then(list => {
- this.convertList(list, this.EffectiveTypeList, elem => {
+ this.$convertList(list, this.EffectiveTypeList, elem => {
return true;
});
});
@@ -169,7 +159,7 @@
list.forEach(elem => {
this.queryForm.queryObject.productType.config.data.push({ value: elem.code, label: elem.name });
});
- this.convertList(list, this.productTypeList, elem => {
+ this.$convertList(list, this.productTypeList, elem => {
return true;
});
});
@@ -184,19 +174,6 @@
}
},
- convertField(fieldValue, enumList, converFormat) {
- if (converFormat && converFormat.length >= 2) {
- let value = converFormat[0];
- let label = converFormat[1];
- for (let i = 0; enumList && i < enumList.length; i++) {
- if ('' + fieldValue === '' + enumList[i][value]) {
- return enumList[i][label];
- }
- }
- }
- },
-
-
handleAdd(index, row) {
this.$emit('selectGoods', row);
this.doClose();
diff --git a/src/views/orderauthor/order/draft.vue b/src/views/orderauthor/order/draft.vue
index 84d81cd0e..5a6baddb4 100644
--- a/src/views/orderauthor/order/draft.vue
+++ b/src/views/orderauthor/order/draft.vue
@@ -280,16 +280,6 @@
resizeHandler: function () {
this.height = this._clientHeight - 170;
},
- convertList(FromList, ToList, ChecktypeFunction) {
- if (FromList) {
- ToList.length = 0;
- FromList.forEach(elem => {
- if (ChecktypeFunction(elem)) {
- ToList.push({ value: elem.code, label: elem.name });
- }
- });
- }
- },
buttonClick() {
this.$refs.addGoods.doShow();
},
@@ -328,31 +318,31 @@
})
this.$Dictionary.permissionType().then(list => {
- this.convertList(list, this.PermissionTypeList, elem => {
+ this.$convertList(list, this.PermissionTypeList, elem => {
return true;
});
});
this.$Dictionary.orderType().then(list => {
- this.convertList(list, this.OrderTypeList, elem => {
+ this.$convertList(list, this.OrderTypeList, elem => {
return elem.code !== '01' //过滤个人
});
});
this.$Dictionary.payStatus().then(list => {
- this.convertList(list, this.PayStatusTypeList, elem => {
+ this.$convertList(list, this.PayStatusTypeList, elem => {
return elem.code !== '03' //过滤取消状态
});
});
this.$Dictionary.payType().then(list => {
- this.convertList(list, this.PayTypeList, elem => {
+ this.$convertList(list, this.PayTypeList, elem => {
return true
});
});
this.$Dictionary.bizType().then(list => {
- this.convertList(list, this.BizTypeList, elem => {
+ this.$convertList(list, this.BizTypeList, elem => {
return true;
});
});
diff --git a/src/views/orderauthor/order/list.vue b/src/views/orderauthor/order/list.vue
index bffb1fefc..87e4e288e 100644
--- a/src/views/orderauthor/order/list.vue
+++ b/src/views/orderauthor/order/list.vue
@@ -86,7 +86,7 @@
title: '权限类型',
prop: 'permissionType',
type: 'tag',
- columnValue: (row) => { return this.convertField(row.permissionType, this.PermissionTypeList, ['value', 'label']) },
+ columnValue: (row) => { return this.$convertField(row.permissionType, this.PermissionTypeList, ['value', 'label']) },
tagType: (row) => { return '' }
},
{
@@ -120,7 +120,7 @@
title: '支付方式',
prop: 'payWays',
type: 'tag',
- columnValue: (row) => { return this.convertField(row.payWays, this.PayTypeList, ['value', 'label']) },
+ columnValue: (row) => { return this.$convertField(row.payWays, this.PayTypeList, ['value', 'label']) },
tagType: (row) => { return 'success' }
},
{
@@ -131,7 +131,7 @@
title: '订单类型',
prop: 'orderType',
type: 'tag',
- columnValue: (row) => { return this.convertField(row.orderType, this.OrderTypeList, ['value', 'label']) },
+ columnValue: (row) => { return this.$convertField(row.orderType, this.OrderTypeList, ['value', 'label']) },
tagType: (row) => { return 'success' }
},
{
@@ -142,14 +142,14 @@
title: '业务类型',
prop: 'bizType',
type: 'tag',
- columnValue: (row) => { return this.convertField(row.bizType, this.BizTypeList, ['value', 'label']) },
+ columnValue: (row) => { return this.$convertField(row.bizType, this.BizTypeList, ['value', 'label']) },
tagType: (row) => { return 'success' }
},
{
title: '支付状态',
prop: 'payStatus',
type: 'tag',
- columnValue: (row) => { return this.convertField(row.payStatus, this.PayStatusList, ['value', 'label']) },
+ columnValue: (row) => { return this.$convertField(row.payStatus, this.PayStatusList, ['value', 'label']) },
tagType: (row) => {
switch (row.payStatus) {
case '01': return 'danger';
@@ -199,27 +199,6 @@
this.loadInitData();
},
methods: {
- convertList(FromList, ToList, ChecktypeFunction) {
- if (FromList) {
- ToList.length = 0;
- FromList.forEach(elem => {
- if (ChecktypeFunction(elem)) {
- ToList.push({ value: elem.code, label: elem.name });
- }
- });
- }
- },
- convertField(fieldValue, enumList, converFormat) {
- if (converFormat && converFormat.length >= 2) {
- let value = converFormat[0];
- let label = converFormat[1];
- for (let i = 0; enumList && i < enumList.length; i++) {
- if ('' + fieldValue === '' + enumList[i][value]) {
- return enumList[i][label];
- }
- }
- }
- },
loadInitData() {
this.queryForm.queryObject.organizationId.config.data.length = 0;
getOrganizationList().then(response => {
@@ -234,32 +213,32 @@
})
this.$Dictionary.bizType().then(list => {
- this.convertList(list, this.BizTypeList, elem => {
+ this.$convertList(list, this.BizTypeList, elem => {
return true;
});
})
this.$Dictionary.orderType().then(list => {
- this.convertList(list, this.OrderTypeList, elem => {
+ this.$convertList(list, this.OrderTypeList, elem => {
return true;
});
})
this.$Dictionary.payType().then(list => {
- this.convertList(list, this.PayTypeList, elem => {
+ this.$convertList(list, this.PayTypeList, elem => {
return true;
});
})
this.$Dictionary.payStatus().then(list => {
- this.convertList(list, this.PayStatusList, elem => {
+ this.$convertList(list, this.PayStatusList, elem => {
return true;
});
})
this.$Dictionary.effectiveType().then(list => {
- this.convertList(list, this.EffectiveTypeList, elem => {
+ this.$convertList(list, this.EffectiveTypeList, elem => {
return true;
});
})
@@ -268,7 +247,7 @@
list.forEach(elem => {
this.queryForm.queryObject.permissionType.config.data.push({ value: elem.code, label: elem.name });
});
- this.convertList(list, this.PermissionTypeList, elem => {
+ this.$convertList(list, this.PermissionTypeList, elem => {
return true;
});
})
diff --git a/src/views/orderauthor/permission/detail.vue b/src/views/orderauthor/permission/detail.vue
index 4e700b695..eb82f1dc4 100644
--- a/src/views/orderauthor/permission/detail.vue
+++ b/src/views/orderauthor/permission/detail.vue
@@ -74,7 +74,7 @@
title: '权限类型',
prop: 'permissionType',
type: 'tag',
- columnValue: (row) => { return this.convertField(row.permissionType, this.PermissionTypeList, ['value', 'label']) },
+ columnValue: (row) => { return this.$convertField(row.permissionType, this.PermissionTypeList, ['value', 'label']) },
tagType: (row) => { return '' }
},
{
@@ -118,7 +118,7 @@
title: '课程权限状态',
prop: 'status',
type: 'tag',
- columnValue: (row) => { return this.convertField(row.status, this.EffectiveTypeList, ['value', 'label']) },
+ columnValue: (row) => { return this.$convertField(row.status, this.EffectiveTypeList, ['value', 'label']) },
tagType: (row) => {
switch (row.status) {
case '1': return 'success';
@@ -134,30 +134,9 @@
this.loadInitData();
},
methods: {
- convertList(FromList, ToList, ChecktypeFunction) {
- if (FromList) {
- ToList.length = 0;
- FromList.forEach(elem => {
- if (ChecktypeFunction(elem)) {
- ToList.push({ value: elem.code, label: elem.name });
- }
- });
- }
- },
- convertField(fieldValue, enumList, converFormat) {
- if (converFormat && converFormat.length >= 2) {
- let value = converFormat[0];
- let label = converFormat[1];
- for (let i = 0; enumList && i < enumList.length; i++) {
- if ('' + fieldValue === '' + enumList[i][value]) {
- return enumList[i][label];
- }
- }
- }
- },
loadInitData() {
this.$Dictionary.effectiveType().then(list => {
- this.convertList(list, this.EffectiveTypeList, elem => {
+ this.$convertList(list, this.EffectiveTypeList, elem => {
return true;
});
});
@@ -165,7 +144,7 @@
list.forEach(elem => {
this.queryForm.queryObject.permissionType.config.data.push({ value: elem.code, label: elem.name });
});
- this.convertList(list, this.PermissionTypeList, elem => {
+ this.$convertList(list, this.PermissionTypeList, elem => {
return true;
});
});
diff --git a/src/views/orderauthor/permission/draft/choosePermission.vue b/src/views/orderauthor/permission/draft/choosePermission.vue
index f21da73c8..442760807 100644
--- a/src/views/orderauthor/permission/draft/choosePermission.vue
+++ b/src/views/orderauthor/permission/draft/choosePermission.vue
@@ -84,7 +84,7 @@
title: '权限类型',
prop: 'permissionType',
type: 'tag',
- columnValue: (row) => { return this.convertField(row.permissionType, this.PermissionTypeList, ['value', 'label']) },
+ columnValue: (row) => { return this.$convertField(row.permissionType, this.PermissionTypeList, ['value', 'label']) },
tagType: (row) => { return '' }
},
{
@@ -171,17 +171,6 @@
this.queryForm.queryObject.canDistribute.config.data = this.$ConstSelect.PermissionUseList;
},
methods: {
- convertField(fieldValue, enumList, converFormat) {
- if (converFormat && converFormat.length >= 2) {
- let value = converFormat[0];
- let label = converFormat[1];
- for (let i = 0; enumList && i < enumList.length; i++) {
- if ('' + fieldValue === '' + enumList[i][value]) {
- return enumList[i][label];
- }
- }
- }
- },
formatterDate(row, porpInfo) {
return String(row[porpInfo.property] || '').split(' ')[0];
},
diff --git a/src/views/orderauthor/permission/index.vue b/src/views/orderauthor/permission/index.vue
index 5fddddc02..6747d1727 100644
--- a/src/views/orderauthor/permission/index.vue
+++ b/src/views/orderauthor/permission/index.vue
@@ -87,7 +87,7 @@
title: '权限类型',
prop: 'permissionType',
type: 'tag',
- columnValue: (row) => { return this.convertField(row.permissionType, this.PermissionTypeList, ['value', 'label']) },
+ columnValue: (row) => { return this.$convertField(row.permissionType, this.PermissionTypeList, ['value', 'label']) },
tagType: (row) => { return '' }
},
{
@@ -131,7 +131,7 @@
title: '权限状态',
prop: 'status',
type: 'tag',
- columnValue: (row) => { return this.convertField(row.status, this.EffectiveTypeList, ['value', 'label']) },
+ columnValue: (row) => { return this.$convertField(row.status, this.EffectiveTypeList, ['value', 'label']) },
tagType: (row) => {
switch (row.status) {
case '1': return 'success';
@@ -183,33 +183,12 @@
this.loadInitData();
},
methods: {
- convertList(FromList, ToList, ChecktypeFunction) {
- if (FromList) {
- ToList.length = 0;
- FromList.forEach(elem => {
- if (ChecktypeFunction(elem)) {
- ToList.push({ value: elem.code, label: elem.name });
- }
- });
- }
- },
- convertField(fieldValue, enumList, converFormat) {
- if (converFormat && converFormat.length >= 2) {
- let value = converFormat[0];
- let label = converFormat[1];
- for (let i = 0; enumList && i < enumList.length; i++) {
- if ('' + fieldValue === '' + enumList[i][value]) {
- return enumList[i][label];
- }
- }
- }
- },
loadInitData() {
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 => {
+ this.$convertList(list, this.EffectiveTypeList, elem => {
return true;
});
});
@@ -217,7 +196,7 @@
list.forEach(elem => {
this.queryForm.queryObject.permissionType.config.data.push({ value: elem.code, label: elem.name });
});
- this.convertList(list, this.PermissionTypeList, elem => {
+ this.$convertList(list, this.PermissionTypeList, elem => {
return true;
});
this.PermissionTypeList.push({ value: undefined, label: '权限包' });
diff --git a/src/views/package/index.vue b/src/views/package/index.vue
index 58aaaa229..cd233c674 100644
--- a/src/views/package/index.vue
+++ b/src/views/package/index.vue
@@ -1,232 +1,220 @@
-
-
-
-
-
+
+
+
+
\ No newline at end of file
+ this.$Dictionary.permissionType().then(list => {
+ list.forEach(elem => {
+ this.queryForm.queryObject.type.config.data.push({ value: elem.code, label: elem.name });
+ });
+ this.$convertList(list, this.PermissionTypeList, elem => {
+ return true;
+ });
+ });
+ },
+ formatterDate(row, porpInfo) {
+ if (row.hasOwnProperty(porpInfo.property)) {
+ }
+ return row[porpInfo.property];
+ },
+ queryFunction(params) {
+ return listUserPermision(params);
+ },
+ handlePermissionPack() {
+ this.$router.push({ path: `${UrlConfig.permission.permissionDraft}` });
+ },
+ reloadTable() {
+ if (this.queryList && this.queryList.reload) {
+ this.queryList.reload();
+ }
+ }
+ }
+};
+
diff --git a/src/views/package/selectRole/list.vue b/src/views/package/selectRole/list.vue
index 1f5dd4da3..22968e4ce 100644
--- a/src/views/package/selectRole/list.vue
+++ b/src/views/package/selectRole/list.vue
@@ -82,21 +82,6 @@
doClose() {
this.show = false;
},
- convertField(fieldValue, enumList, converFormat) {
- let arr = [];
- if (converFormat && converFormat.length >= 2) {
- let value = converFormat[0];
- let label = converFormat[1];
- enumList.forEach((element, i) => {
- fieldValue.forEach((v, j) => {
- if ('' + fieldValue[j] === '' + enumList[i][value]) {
- arr.push(enumList[i][label])
- }
- })
- });
- }
- return arr;
- },
selectRole(index, row) {
this.$confirm(`是否确定设置"${row.name}"为权限所属人`, '提示', {
diff --git a/src/views/publish/examRule/index.vue b/src/views/publish/examRule/index.vue
index 9003e642f..503f3346a 100644
--- a/src/views/publish/examRule/index.vue
+++ b/src/views/publish/examRule/index.vue
@@ -74,7 +74,7 @@ export default {
prop: 'lessonId',
type: 'tag',
show: !this.$route.query.lessonId,
- columnValue: (row) => { return this.convertField(row.lessonId, this.OrganizationList, ['id', 'name']); },
+ columnValue: (row) => { return this.$convertField(row.lessonId, this.OrganizationList, ['id', 'name']); },
tagType: (row) => { return ''; }
},
{
@@ -122,7 +122,7 @@ export default {
title: '状态',
prop: 'status',
type: 'tag',
- columnValue: (row) => { return this.convertField(row.status, this.EffectiveTypeList, ['value', 'label']); },
+ columnValue: (row) => { return this.$convertField(row.status, this.EffectiveTypeList, ['value', 'label']); },
tagType: (row) => {
switch (row.status) {
case '1': return 'success';
@@ -214,7 +214,7 @@ export default {
});
this.$Dictionary.effectiveType().then(list => {
- this.convertList(list, this.EffectiveTypeList, elem => {
+ this.$convertList(list, this.EffectiveTypeList, elem => {
return true;
});
});
diff --git a/src/views/publish/productStatus/index.vue b/src/views/publish/productStatus/index.vue
index ce957c932..b56d00796 100644
--- a/src/views/publish/productStatus/index.vue
+++ b/src/views/publish/productStatus/index.vue
@@ -46,7 +46,7 @@ export default {
title: '皮肤类型',
prop: 'skinStyle',
type: 'tag',
- columnValue: (row) => { return this.convertField(row.skinStyle, this.skinStyleList, ['code', 'name']); },
+ columnValue: (row) => { return this.$convertField(row.skinStyle, this.skinStyleList, ['code', 'name']); },
tagType: (row) => { return ''; }
},
{
@@ -57,7 +57,7 @@ export default {
title: '产品类型',
prop: 'prdType',
type: 'tag',
- columnValue: (row) => { return this.convertField(row.prdType, this.prdTypeList, ['code', 'name']); },
+ columnValue: (row) => { return this.$convertField(row.prdType, this.prdTypeList, ['code', 'name']); },
tagType: (row) => { return 'success'; }
},
// {
diff --git a/src/views/publish/publishLesson/index.vue b/src/views/publish/publishLesson/index.vue
index 68b5a081e..4e74613e8 100644
--- a/src/views/publish/publishLesson/index.vue
+++ b/src/views/publish/publishLesson/index.vue
@@ -50,7 +50,7 @@ export default {
title: '所属城市',
prop: 'cityCode',
type: 'tag',
- columnValue: (row) => { return this.convertField(row.cityCode, this.cityList, ['code', 'name']); },
+ columnValue: (row) => { return this.$convertField(row.cityCode, this.cityList, ['code', 'name']); },
tagType: (row) => { return 'success'; }
},
{
diff --git a/src/views/publish/publishMap/index.vue b/src/views/publish/publishMap/index.vue
index 404d6f49f..962d25a1b 100644
--- a/src/views/publish/publishMap/index.vue
+++ b/src/views/publish/publishMap/index.vue
@@ -51,14 +51,14 @@ export default {
title: '所属城市',
prop: 'cityCode',
type: 'tag',
- columnValue: (row) => { return this.convertField(row.cityCode, this.cityList, ['code', 'name']); },
+ columnValue: (row) => { return this.$convertField(row.cityCode, this.cityList, ['code', 'name']); },
tagType: (row) => { return 'success'; }
},
{
title: '皮肤类型',
prop: 'skinStyle',
type: 'tag',
- columnValue: (row) => { return this.convertField(row.skinStyle, this.skinStyleList, ['code', 'name']); },
+ columnValue: (row) => { return this.$convertField(row.skinStyle, this.skinStyleList, ['code', 'name']); },
tagType: (row) => { return ''; }
},
{
diff --git a/src/views/publish/runPlanCommon/chooseTemplatePlan.vue b/src/views/publish/runPlanCommon/chooseTemplatePlan.vue
index a3ddefb8d..3ca3e6381 100644
--- a/src/views/publish/runPlanCommon/chooseTemplatePlan.vue
+++ b/src/views/publish/runPlanCommon/chooseTemplatePlan.vue
@@ -56,7 +56,7 @@ export default {
prop: 'skinStyle',
type: 'tag',
columnValue: (row) => {
- return this.convertField(row.skinStyle, this.skinStyleList, ['code', 'name']);
+ return this.$convertField(row.skinStyle, this.skinStyleList, ['code', 'name']);
},
tagType: (row) => { return 'success'; }
}
diff --git a/src/views/publish/runPlanEveryDay/index.vue b/src/views/publish/runPlanEveryDay/index.vue
index 4b745dfbe..d19cfee76 100644
--- a/src/views/publish/runPlanEveryDay/index.vue
+++ b/src/views/publish/runPlanEveryDay/index.vue
@@ -50,7 +50,7 @@ export default {
prop: 'skinStyle',
type: 'tag',
columnValue: (row) => {
- return this.convertField(row.skinStyle, this.skinStyleList, ['code', 'name']);
+ return this.$convertField(row.skinStyle, this.skinStyleList, ['code', 'name']);
},
tagType: (row) => { return ''; }
},
diff --git a/src/views/publish/runPlanTemplate/index.vue b/src/views/publish/runPlanTemplate/index.vue
index ad12f7303..0d0a0f7c7 100644
--- a/src/views/publish/runPlanTemplate/index.vue
+++ b/src/views/publish/runPlanTemplate/index.vue
@@ -50,7 +50,7 @@ export default {
prop: 'skinStyle',
type: 'tag',
columnValue: (row) => {
- return this.convertField(row.skinStyle, this.skinStyleList, ['code', 'name']);
+ return this.$convertField(row.skinStyle, this.skinStyleList, ['code', 'name']);
},
tagType: (row) => { return ''; }
},
diff --git a/src/views/publish/simulationScript/index.vue b/src/views/publish/simulationScript/index.vue
index c4edae593..4a8742ba4 100644
--- a/src/views/publish/simulationScript/index.vue
+++ b/src/views/publish/simulationScript/index.vue
@@ -45,7 +45,7 @@ export default {
prop: 'skinCode',
type: 'tag',
columnValue: (row) => {
- return this.convertField(row.skinCode, this.skinCodeList, ['code', 'name']);
+ return this.$convertField(row.skinCode, this.skinCodeList, ['code', 'name']);
},
tagType: (row) => { return ''; }
},
diff --git a/src/views/replay/index.vue b/src/views/replay/index.vue
index a3c198692..4544ea318 100644
--- a/src/views/replay/index.vue
+++ b/src/views/replay/index.vue
@@ -54,7 +54,7 @@
title: '状态',
prop: 'status',
type: 'tag',
- columnValue: (row) => { return this.convertField(row.status, this.EffectiveTypeList, ['value', 'label']) },
+ columnValue: (row) => { return this.$convertField(row.status, this.EffectiveTypeList, ['value', 'label']) },
tagType: (row) => {
switch (row.status) {
case '1': return 'success';
@@ -97,17 +97,6 @@
}
},
methods: {
- convertField(fieldValue, enumList, converFormat) {
- if (converFormat && converFormat.length >= 2) {
- let value = converFormat[0];
- let label = converFormat[1];
- for (let i = 0; enumList && i < enumList.length; i++) {
- if ('' + fieldValue === '' + enumList[i][value]) {
- return enumList[i][label];
- }
- }
- }
- },
loadInitData() {
this.EffectiveTypeList = [];
this.$Dictionary.effectiveType().then(list => {