Commit ca18ced2 authored by 高宇's avatar 高宇

修复 bug;

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