Commit ca18ced2 authored by 高宇's avatar 高宇

修复 bug;

parent 7e6a265a
......@@ -68,7 +68,7 @@
<img v-for="(source, index) in images" :key="index" :src="source" class="image">
</div>
<side-popup ref="sidePopup" :title="operationTitle">
<component :is="operationPage" :ref="operationPage" @close="close"></component>
<component :is="operationPage" :ref="operationPage" @close="getList => {close(getList)}"></component>
</side-popup>
</section>
</template>
......@@ -200,8 +200,11 @@
this.$refs.sidePopup.show(this.$refs[this.operationPage].init(row.id))
})
},
close () {
close (getList) {
this.$refs.sidePopup.close()
if (getList) {
this.getList()
}
},
delLog (id) {
this.$confirm('确认删除吗?', '提示').then(() => {
......
......@@ -58,7 +58,7 @@
</div>
</div>
<side-popup ref="sidePopup" :title="operationTitle">
<component :is="operationPage" :ref="operationPage" @close="close"></component>
<component :is="operationPage" :ref="operationPage" @close="getList => {close(getList)}"></component>
</side-popup>
</section>
</template>
......@@ -74,6 +74,7 @@
import clickOutside from '@/lib/bind'
import addLog from '../work/addLog'
import editLog from '../work/editLog'
export default {
name: '',
data () {
......@@ -171,8 +172,11 @@
this.$refs.sidePopup.show(this.$refs[this.operationPage].init(row.id))
})
},
close () {
close (getList) {
this.$refs.sidePopup.close()
if (getList) {
this.getList()
}
},
delLog (id) {
this.$confirm('确认删除吗?', '提示').then(() => {
......
......@@ -53,7 +53,7 @@
}).then(() => {
this.saveFun(Object.assign({}, subData, {'WorkLogs[is_draft]': 1}))
}).catch(_ => {
this.saveFun(subData)
this.saveFun(Object.assign({}, subData, {'WorkLogs[is_draft]': 0}))
})
} else {
this.saveFun(subData)
......
......@@ -52,7 +52,7 @@
}).then(() => {
this.saveFun(Object.assign({}, subData, {'WorkLogs[is_draft]': 1}))
}).catch(_ => {
this.saveFun(subData)
this.saveFun(Object.assign({}, subData, {'WorkLogs[is_draft]': 0}))
})
} else {
this.saveFun(subData)
......
......@@ -62,12 +62,13 @@
// this.$refs['elCasc' + key][0].menuVisible = false
},
setCascader (item, key) {
console.log(item.cascader)
if (item.cascader.length === 1) {
this.clientForm[item.key] = item.cascader[0]
this.clientForm[item.itemKey] = ''
} else if (item.cascader.length === 2) {
this.clientForm[item.itemKey] = item.cascader[0]
this.clientForm[item.key] = item.cascader[1]
this.clientForm[item.itemKey] = item.cascader[1]
this.clientForm[item.key] = item.cascader[0]
} else {
this.clientForm[item.itemKey] = ''
this.clientForm[item.key] = ''
......@@ -99,7 +100,9 @@
$(document).ready(() => {
$(document).on('mouseleave', '.el-cascader-menus', () => {
Object.keys(_this.$refs).forEach(item => {
_this.$refs[item][0].menuVisible = false
if (_this.$refs[item]) {
_this.$refs[item][0].menuVisible = false
}
})
})
})
......
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