Commit f26f51b2 authored by mzx's avatar mzx

Merge branch 'develop' of http://gitlab.91isoft.com:90/car-test/web into mengzixuan

parents ae3cf41e 2711cef7
...@@ -6,6 +6,18 @@ ...@@ -6,6 +6,18 @@
:wrapper-closable="false" :wrapper-closable="false"
@close="closeMaterial" @close="closeMaterial"
> >
<div
style="
color: rgb(26, 111, 215);
position: absolute;
top: 22px;
left: 90px;
cursor: pointer;
"
@click="refresh"
>
<i class="el-icon-refresh"></i>刷新
</div>
<div <div
v-for="(item, index) in materialList" v-for="(item, index) in materialList"
:key="index" :key="index"
...@@ -15,7 +27,7 @@ ...@@ -15,7 +27,7 @@
<div class="tips"></div> <div class="tips"></div>
<div> <div>
<span style="color: #1a6fd7"> <span style="color: #1a6fd7">
{{ item.createTime }} {{ isTodayOrYesterday(item.createTime) }}
</span> </span>
</div> </div>
</div> </div>
...@@ -67,6 +79,30 @@ export default { ...@@ -67,6 +79,30 @@ export default {
this.getMaterialList() this.getMaterialList()
}, },
methods: { methods: {
refresh() {
this.selectList = []
this.getMaterialList()
},
// 根据日期判断是今天还是昨天啊
isTodayOrYesterday(dateString) {
const inputDate = new Date(dateString)
const today = new Date()
const yesterday = new Date(today)
yesterday.setDate(today.getDate() - 1)
const inputDateStr = inputDate.toDateString()
const todayStr = today.toDateString()
const yesterdayStr = yesterday.toDateString()
if (inputDateStr === todayStr) {
return '今天'
} else if (inputDateStr === yesterdayStr) {
return '昨天'
} else {
return dateString
}
},
selectImage(a, b, path, id) { selectImage(a, b, path, id) {
if (this.selectList.length >= this.limit) { if (this.selectList.length >= this.limit) {
this.$message({ this.$message({
......
...@@ -444,10 +444,9 @@ export default { ...@@ -444,10 +444,9 @@ export default {
data.forEach(item => { data.forEach(item => {
item.path = item.path.replace('http://49.232.167.247:22038', '') item.path = item.path.replace('http://49.232.167.247:22038', '')
}) })
}
if (this.materialFlag === 'trademark') { if (this.materialFlag === 'trademark') {
this.editParamsForm.trademark = data[0].path this.editParamsForm.trademark = data[0].path
} else { } else if (this.materialFlag === 'sample') {
var arr = [] var arr = []
if (this.editParamsForm.samplePhotos) { if (this.editParamsForm.samplePhotos) {
arr = this.editParamsForm.samplePhotos.split(',') arr = this.editParamsForm.samplePhotos.split(',')
...@@ -457,6 +456,7 @@ export default { ...@@ -457,6 +456,7 @@ export default {
}) })
this.editParamsForm.samplePhotos = arr.join(',') this.editParamsForm.samplePhotos = arr.join(',')
} }
}
this.materialShow = false this.materialShow = false
}, },
selectTrademarkMaterial() { selectTrademarkMaterial() {
...@@ -508,7 +508,6 @@ export default { ...@@ -508,7 +508,6 @@ export default {
console.log(this.editParamsForm) console.log(this.editParamsForm)
this.$refs['editForm'].validate(valid => { this.$refs['editForm'].validate(valid => {
if (valid) { if (valid) {
this.addLoading = true
if ( if (
this.editParamsForm.id === null || this.editParamsForm.id === null ||
this.editParamsForm.id === '' this.editParamsForm.id === ''
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment