提交 36ce3d37 编写于 作者: qian.jie's avatar qian.jie

添加返回

上级 6f138bc8
...@@ -30,7 +30,9 @@ ...@@ -30,7 +30,9 @@
:filter-method="getServiceOpen" :filter-method="getServiceOpen"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.serviceOpen ==='1' ? '开通': '未开通' }}</span> <span style="margin-left: 10px">{{
scope.row.serviceOpen === '1' ? '开通' : '未开通'
}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -67,7 +69,9 @@ ...@@ -67,7 +69,9 @@
:filter-method="getWorkStatus" :filter-method="getWorkStatus"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.workStatus ==='2' ? '未排班': '已排班' }}</span> <span style="margin-left: 10px">{{
scope.row.workStatus === '2' ? '未排班' : '已排班'
}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -84,15 +88,15 @@ ...@@ -84,15 +88,15 @@
align="center" align="center"
/> />
<el-table-column <el-table-column
property="delivery" prop="switchStatus"
align="center" align="center"
label="接单开关" label="接单开关"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-switch <el-switch
v-model="scope.row.delivery" v-model="scope.row.switchStatus"
active-color="#0D9078" active-color="#0D9078"
@change="changeSwitch(scope.$index,scope.row)" @change="changeSwitch(scope.$index, scope.row)"
/> />
</template> </template>
</el-table-column> </el-table-column>
...@@ -105,25 +109,25 @@ ...@@ -105,25 +109,25 @@
<template slot-scope="scope"> <template slot-scope="scope">
<div <div
class="scope-work" class="scope-work"
style="display:flex" style="display: flex"
> >
<div <div
v-if=" scope.row.workStatus === '2'" v-if="scope.row.workStatus === '2'"
class="download-btn" class="download-btn"
@click="addSchedule(scope.row,1)" @click="addSchedule(scope.row, 1)"
> >
新增排班 新增排班
</div> </div>
<div <div
v-else v-else
class="download-btn" class="download-btn"
@click="addSchedule(scope.row,2)" @click="addSchedule(scope.row, 2)"
> >
编辑排班 编辑排班
</div> </div>
<div <div
class="download-btn" class="download-btn"
@click="addSchedule(scope.row,2)" @click="addSchedule(scope.row, 2)"
> >
查看 查看
</div> </div>
...@@ -184,32 +188,32 @@ ...@@ -184,32 +188,32 @@
}, },
data() { data() {
return { return {
workStatusList:[ workStatusList: [
{ {
text: '已排班', text: '已排班',
value: '已排班' value: '已排班',
}, },
{ {
text: '未排班', text: '未排班',
value: '未排班' value: '未排班',
} },
], ],
serviceOpenList:[ serviceOpenList: [
{ {
value: 1, value: 1,
text: '开通' text: '开通',
}, },
{ {
value: 2, value: 2,
text: '未开通' text: '未开通',
}, },
], ],
}; };
}, },
computed: {},
mounted() {}, mounted() {},
methods:{ methods: {
changeSwitch(value, val) { changeSwitch(value, val) {
console.log(value, val, '123');
this.$emit('changeSwitch', value, val); this.$emit('changeSwitch', value, val);
}, },
// handleFilterChange(value) { // handleFilterChange(value) {
...@@ -222,22 +226,18 @@ ...@@ -222,22 +226,18 @@
return row.level === String(value); return row.level === String(value);
}, },
getWorkStatus(value, row) { getWorkStatus(value, row) {
console.log(value, row);
let newValue = ''; let newValue = '';
if (value === '未排班') { if (value === '未排班') {
newValue = '2'; newValue = '2';
}else{ } else {
newValue = '1'; newValue = '1';
} }
return row.workStatus === String(newValue); return row.workStatus === String(newValue);
}, },
showworkStatus() { showworkStatus() {
console.log(11111);
this.isworkStatus = !this.isworkStatus; this.isworkStatus = !this.isworkStatus;
console.log(this.isworkStatus);
}, },
addSchedule(value, val) { addSchedule(value, val) {
console.log(value, val, '123212321');
this.$emit('addSchedule', value, val); this.$emit('addSchedule', value, val);
}, },
// 分页 // 分页
...@@ -250,23 +250,23 @@ ...@@ -250,23 +250,23 @@
sortfunc(data) { sortfunc(data) {
this.$emit('sortfunc', data); this.$emit('sortfunc', data);
}, },
} },
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.table-serviceSchedule{ .table-serviceSchedule {
.el-table { .el-table {
border-radius: 8px; border-radius: 8px;
// 深度选择器 // 深度选择器
/deep/ .highlight{ /deep/ .highlight {
color: #0D9078 !important; color: #0d9078 !important;
} }
.scope-work{ .scope-work {
display: flex; display: flex;
justify-content: center; justify-content: center;
.download-btn{ .download-btn {
color: #0D9078; color: #0d9078;
cursor: pointer; cursor: pointer;
margin-right: 10px; margin-right: 10px;
} }
......
<template> <template>
<div>新增排班</div> <div>
<span>{{ schedulingTypeValue }}</span>
<span>{{ schedulingType }}</span>
</div>
</template> </template>
<script> <script>
export default {}; export default {
props: {
schedulingTypeValue: {
type: Object,
default: () => {
return {};
},
},
schedulingType: {
type: String,
default: '',
},
},
data() {
return {};
},
watch: {},
created() {
console.log(this.schedulingTypeValue, this.schedulingType);
},
methods: {},
};
</script> </script>
<style></style> <style></style>
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册