update
This commit is contained in:
@ -18,6 +18,9 @@ export default class Dict {
|
||||
ps.push(getDictDetail(n).then(data => {
|
||||
this.dict[n].splice(0, 0, ...data.content)
|
||||
data.content.forEach(d => {
|
||||
if (parseInt(d.value).toString() != 'NaN') {
|
||||
d.value = parseInt(d.value)
|
||||
}
|
||||
Vue.set(this.dict.dict[n], d.value, d)
|
||||
Vue.set(this.dict.label[n], d.value, d.label)
|
||||
})
|
||||
|
||||
@ -145,7 +145,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getPage as materialgroupPage, addObj as materialgroupAdd, delObj as materialgroupDel, putObj as materialgroupEdit } from '@/api/tools/materialgroup'
|
||||
import { getList as materialgroupPage, addObj as materialgroupAdd, delObj as materialgroupDel, putObj as materialgroupEdit } from '@/api/tools/materialgroup'
|
||||
import { getPage, addObj, delObj, putObj } from '@/api/tools/material'
|
||||
import { getToken } from '@/utils/auth'
|
||||
import { mapGetters } from 'vuex'
|
||||
@ -260,13 +260,13 @@ export default {
|
||||
this.materialgroupLoading = true
|
||||
materialgroupPage({
|
||||
total: 0, // 总页数
|
||||
currentPage: 1, // 当前页数
|
||||
pageSize: 100, // 每页显示多少条
|
||||
page: 1, // 当前页数
|
||||
size: 100, // 每页显示多少条
|
||||
ascs: [], // 升序字段
|
||||
descs: 'create_time'// 降序字段
|
||||
sort: 'create_time,desc'// 降序字段
|
||||
}).then(response => {
|
||||
this.materialgroupLoading = false
|
||||
const materialgroupList = response.content
|
||||
const materialgroupList = response
|
||||
materialgroupList.unshift({
|
||||
id: '-1',
|
||||
name: '全部分组'
|
||||
@ -466,7 +466,6 @@ export default {
|
||||
this.urls.forEach(item => {
|
||||
str += '<img src="' + item + '">'
|
||||
// this.$set(this.value, this.value.length, item)
|
||||
|
||||
})
|
||||
nowEditor.dialog.close(true)
|
||||
nowEditor.editor.setContent(str, true)
|
||||
|
||||
@ -146,7 +146,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getPage as materialgroupPage, addObj as materialgroupAdd, delObj as materialgroupDel, putObj as materialgroupEdit } from '@/api/tools/materialgroup'
|
||||
import { getList as materialgroupPage, addObj as materialgroupAdd, delObj as materialgroupDel, putObj as materialgroupEdit } from '@/api/tools/materialgroup'
|
||||
import { getPage, addObj, delObj, putObj } from '@/api/tools/material'
|
||||
import { getToken } from '@/utils/auth'
|
||||
import { mapGetters } from 'vuex'
|
||||
@ -256,13 +256,13 @@ export default {
|
||||
this.materialgroupLoading = true
|
||||
materialgroupPage({
|
||||
total: 0, // 总页数
|
||||
currentPage: 1, // 当前页数
|
||||
pageSize: 100, // 每页显示多少条
|
||||
page: 1, // 当前页数
|
||||
size: 100, // 每页显示多少条
|
||||
ascs: [], // 升序字段
|
||||
descs: 'create_time'// 降序字段
|
||||
sort: 'create_time,desc'// 降序字段
|
||||
}).then(response => {
|
||||
this.materialgroupLoading = false
|
||||
const materialgroupList = response.content
|
||||
const materialgroupList = response
|
||||
materialgroupList.unshift({
|
||||
id: '-1',
|
||||
name: '全部分组'
|
||||
|
||||
@ -1,20 +1,20 @@
|
||||
<template>
|
||||
<div v-if="type == 'image'">
|
||||
<div v-if="myValue != ''">
|
||||
<ul class="el-upload-list el-upload-list--picture-card">
|
||||
<ul class="el-upload-list el-upload-list--picture-card">
|
||||
<li tabindex="0" class="el-upload-list__item is-ready" :style="'width: '+width+'px;height: '+height+'px'">
|
||||
<div>
|
||||
<img :src="myValue" alt="" class="el-upload-list__item-thumbnail">
|
||||
<span class="el-upload-list__item-actions">
|
||||
<span class="el-upload-list__item-delete" @click="deleteMaterial">
|
||||
<i class="el-icon-delete" />
|
||||
</span>
|
||||
<span class="el-upload-list__item-delete" @click="deleteMaterial">
|
||||
<i class="el-icon-delete" />
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div v-else tabindex="0" class="el-upload el-upload--picture-card" :style="'width: '+width+'px;height: '+height+'px;'+'line-height:'+height+'px;'" @click="toSeleteMaterial">
|
||||
<div v-else tabindex="0" class="el-upload el-upload--picture-card" :style="'width: '+width+'px;height: '+height+'px;'+'line-height:'+height+'px;'" @click="toSeleteMaterial">
|
||||
<i class="el-icon-plus" />
|
||||
</div>
|
||||
|
||||
@ -139,7 +139,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getPage as materialgroupPage, addObj as materialgroupAdd, delObj as materialgroupDel, putObj as materialgroupEdit } from '@/api/tools/materialgroup'
|
||||
import { getList as materialgroupPage, addObj as materialgroupAdd, delObj as materialgroupDel, putObj as materialgroupEdit } from '@/api/tools/materialgroup'
|
||||
import { getPage, addObj, delObj, putObj } from '@/api/tools/material'
|
||||
import { getToken } from '@/utils/auth'
|
||||
import { mapGetters } from 'vuex'
|
||||
@ -210,7 +210,7 @@ export default {
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
value: function (val) {
|
||||
value: function(val) {
|
||||
this.myValue = val
|
||||
}
|
||||
},
|
||||
@ -252,13 +252,13 @@ export default {
|
||||
this.materialgroupLoading = true
|
||||
materialgroupPage({
|
||||
total: 0, // 总页数
|
||||
currentPage: 1, // 当前页数
|
||||
pageSize: 100, // 每页显示多少条
|
||||
page: 1, // 当前页数
|
||||
size: 100, // 每页显示多少条
|
||||
ascs: [], // 升序字段
|
||||
descs: 'create_time'// 降序字段
|
||||
sort: 'create_time,desc'// 降序字段
|
||||
}).then(response => {
|
||||
this.materialgroupLoading = false
|
||||
const materialgroupList = response.content
|
||||
const materialgroupList = response
|
||||
materialgroupList.unshift({
|
||||
id: '-1',
|
||||
name: '全部分组'
|
||||
@ -454,7 +454,7 @@ export default {
|
||||
return isPic && isLt2M
|
||||
},
|
||||
sureUrls() {
|
||||
console.log('this.urls:'+this.urls)
|
||||
console.log('this.urls:' + this.urls)
|
||||
this.myValue = this.urls[0]
|
||||
this.$emit('input', this.urls[0])
|
||||
this.listDialogVisible = false
|
||||
|
||||
Reference in New Issue
Block a user