|
@@ -105,7 +105,7 @@ import config from '@api/config';
|
|
|
import { container, ImageExtend, QuillWatch } from 'quill-image-extend-module';
|
|
|
Quill.register('modules/ImageExtend', ImageExtend);
|
|
|
export default {
|
|
|
- props: ['data', 'index', 'isEdit', 'isCopy', 'total', 'showType'],
|
|
|
+ props: ['data', 'index', 'isEdit', 'isCopy', 'total', 'showType','positions'],
|
|
|
name: 'DevInfo',
|
|
|
components: {
|
|
|
quillEditor
|
|
@@ -165,7 +165,6 @@ export default {
|
|
|
position: [],
|
|
|
orderNo: 0
|
|
|
},
|
|
|
- positions: [], //位置列表
|
|
|
rules: {}
|
|
|
};
|
|
|
},
|
|
@@ -186,7 +185,6 @@ export default {
|
|
|
this.editorOption.modules.toolbar.container = this.toolbars[
|
|
|
this.toolbarMode
|
|
|
];
|
|
|
- this.zskgetDict();
|
|
|
|
|
|
if (this.isEdit || this.isCopy) {
|
|
|
setTimeout(() => {
|
|
@@ -287,20 +285,6 @@ export default {
|
|
|
);
|
|
|
},
|
|
|
methods: {
|
|
|
- zskgetDict() {
|
|
|
- api
|
|
|
- .zskgetDict()
|
|
|
- .then(res => {
|
|
|
- if (res.data.code == '0') {
|
|
|
- const data = res.data.data;
|
|
|
- this.positions = data['50'];
|
|
|
- this.renderPositions(data['50'], data['51']);
|
|
|
- }
|
|
|
- })
|
|
|
- .catch(error => {
|
|
|
- console.log(error);
|
|
|
- });
|
|
|
- },
|
|
|
reOrder(i) {
|
|
|
this.$emit('reOrder', i, this.index);
|
|
|
},
|
|
@@ -321,18 +305,6 @@ export default {
|
|
|
});
|
|
|
this.data.position = arr;
|
|
|
},
|
|
|
- // 渲染内容类型
|
|
|
- renderPositions(data1, data2) {
|
|
|
- //显示位置枚举列表
|
|
|
- if (this.showType>0) {
|
|
|
- data2 = data2.filter(item => item.name == this.showType);
|
|
|
- let val = data2[0].val.split(',');
|
|
|
- this.positions = data1.filter(it => {
|
|
|
- let arr = val.map(v => v);
|
|
|
- return arr.includes(it.val);
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
}
|
|
|
};
|
|
|
</script>
|