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

添加返回

上级 6f138bc8
......@@ -30,7 +30,9 @@
:filter-method="getServiceOpen"
>
<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>
</el-table-column>
<el-table-column
......@@ -67,7 +69,9 @@
:filter-method="getWorkStatus"
>
<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>
</el-table-column>
<el-table-column
......@@ -84,15 +88,15 @@
align="center"
/>
<el-table-column
property="delivery"
prop="switchStatus"
align="center"
label="接单开关"
>
<template slot-scope="scope">
<el-switch
v-model="scope.row.delivery"
v-model="scope.row.switchStatus"
active-color="#0D9078"
@change="changeSwitch(scope.$index,scope.row)"
@change="changeSwitch(scope.$index, scope.row)"
/>
</template>
</el-table-column>
......@@ -105,25 +109,25 @@
<template slot-scope="scope">
<div
class="scope-work"
style="display:flex"
style="display: flex"
>
<div
v-if=" scope.row.workStatus === '2'"
v-if="scope.row.workStatus === '2'"
class="download-btn"
@click="addSchedule(scope.row,1)"
@click="addSchedule(scope.row, 1)"
>
新增排班
</div>
<div
v-else
class="download-btn"
@click="addSchedule(scope.row,2)"
@click="addSchedule(scope.row, 2)"
>
编辑排班
</div>
<div
class="download-btn"
@click="addSchedule(scope.row,2)"
@click="addSchedule(scope.row, 2)"
>
查看
</div>
......@@ -184,32 +188,32 @@
},
data() {
return {
workStatusList:[
workStatusList: [
{
text: '已排班',
value: '已排班'
value: '已排班',
},
{
text: '未排班',
value: '未排班'
}
value: '未排班',
},
],
serviceOpenList:[
serviceOpenList: [
{
value: 1,
text: '开通'
text: '开通',
},
{
value: 2,
text: '未开通'
text: '未开通',
},
],
};
},
computed: {},
mounted() {},
methods:{
methods: {
changeSwitch(value, val) {
console.log(value, val, '123');
this.$emit('changeSwitch', value, val);
},
// handleFilterChange(value) {
......@@ -222,22 +226,18 @@
return row.level === String(value);
},
getWorkStatus(value, row) {
console.log(value, row);
let newValue = '';
if (value === '未排班') {
newValue = '2';
}else{
} else {
newValue = '1';
}
return row.workStatus === String(newValue);
},
showworkStatus() {
console.log(11111);
this.isworkStatus = !this.isworkStatus;
console.log(this.isworkStatus);
},
addSchedule(value, val) {
console.log(value, val, '123212321');
this.$emit('addSchedule', value, val);
},
// 分页
......@@ -250,23 +250,23 @@
sortfunc(data) {
this.$emit('sortfunc', data);
},
}
},
};
</script>
<style lang="scss" scoped>
.table-serviceSchedule{
.table-serviceSchedule {
.el-table {
border-radius: 8px;
// 深度选择器
/deep/ .highlight{
color: #0D9078 !important;
/deep/ .highlight {
color: #0d9078 !important;
}
.scope-work{
.scope-work {
display: flex;
justify-content: center;
.download-btn{
color: #0D9078;
.download-btn {
color: #0d9078;
cursor: pointer;
margin-right: 10px;
}
......
<template>
<div>新增排班</div>
<div>
<span>{{ schedulingTypeValue }}</span>
<span>{{ schedulingType }}</span>
</div>
</template>
<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>
<style></style>
......@@ -7,7 +7,7 @@
<div class="header">
<el-breadcrumb separator="/">
<el-breadcrumb-item>首页</el-breadcrumb-item>
<el-breadcrumb-item>服务排班表</el-breadcrumb-item>
<el-breadcrumb-item> 服务排班表 </el-breadcrumb-item>
</el-breadcrumb>
</div>
<div class="serviceSchedule-container">
......@@ -31,7 +31,7 @@
clearable
>
<el-option
v-for="(item,index) of createList"
v-for="(item, index) of createList"
:key="index"
:label="item"
:value="item"
......@@ -95,11 +95,18 @@
>
同步信息
</el-button>
<el-tooltip
class="serviceSchedule-tooltip"
effect="light"
content="点击按钮可同步最新的专家入驻信息"
placement="top-start"
>
<img
class="el-icon-s-question"
src="../../../assets/image/question.png"
alt
>
</el-tooltip>
</div>
</div>
<div class="serviceSchedule-table">
......@@ -128,13 +135,21 @@
<div class="header">
<el-breadcrumb separator="/">
<el-breadcrumb-item>首页</el-breadcrumb-item>
<el-breadcrumb-item>服务排班表</el-breadcrumb-item>
<el-breadcrumb-item class="breadcrumb-serviceSchedule">
<span
class="breadcrumb-back"
@click="goBack"
>服务排班表</span>
</el-breadcrumb-item>
<el-breadcrumb-item>新增排班</el-breadcrumb-item>
</el-breadcrumb>
</div>
<div class="serviceSchedule-container">
<div class="serviceSchedule-containerInfo">
<NewScheduling />
<NewScheduling
:scheduling-type-value="schedulingTypeValue"
:scheduling-type="schedulingType"
/>
</div>
</div>
</div>
......@@ -142,7 +157,14 @@
</template>
<script>
import { getFirstLevelLable, childLabelList, workQuery, switchOpen, workInStep, getLevel} from '@/api/serviceSchedule';
import {
getFirstLevelLable,
childLabelList,
workQuery,
switchOpen,
workInStep,
getLevel,
} from '@/api/serviceSchedule';
import { SERVICESCHEDUle_TABLE } from '@/utils/GeneralData/serviceSchedule-table';
import TableServiceSchedule from '@/components/list/table-serviceSchedule';
import NewScheduling from '../diagnosis-admin/modal/newScheduling.vue';
......@@ -164,36 +186,36 @@
departmentId: '',
createType: '',
idNamePhone: '',
ScheduleStatus:'',
startRangeTime:'',
endRangeTime:'',
serviceOpen:'',
ScheduleStatus: '',
startRangeTime: '',
endRangeTime: '',
serviceOpen: '',
pageSize: 15,
pageNo: 1,
sort:'',
createRangeTime:[]
pageNo: 0,
sort: '',
createRangeTime: [],
},
ScheduleStatusList:[
ScheduleStatusList: [
{
value:'已排班',
id:1
value: '已排班',
id: 1,
},
{
value:'未排班',
id:2
value: '未排班',
id: 2,
},
],
serviceOpenList:[
serviceOpenList: [
{
value:'开通',
id:1
value: '开通',
id: 1,
},
{
value:'未开通',
id:2
value: '未开通',
id: 2,
},
],
createList:[],
createList: [],
interfaceOptions: [],
createRangeTime: [],
pickerOptions: {
......@@ -202,11 +224,12 @@
},
},
ScheduleListShow: true,
showTableData:SERVICESCHEDUle_TABLE,
tableData:[],
showTableData: SERVICESCHEDUle_TABLE,
tableData: [],
loading: false,
newCreateList:[],
// newCreateObj:{}
newCreateList: [],
schedulingTypeValue: {},
schedulingType: '',
};
},
watch: {},
......@@ -220,7 +243,6 @@
handleItemChange(val) {
const value = val[0];
childLabelList({ parentId: value, publish: 1 }).then((res) => {
console.log(res);
if (res.code === '000000') {
const interfaceArr = res.data || [];
this.interfaceOptions.filter((item) => {
......@@ -235,12 +257,10 @@
getFirstLevelLable() {
getFirstLevelLable().then((res) => {
if (res.code === '000000') {
console.log(res);
this.interfaceOptions = res.data || [];
this.interfaceOptions.forEach((item, index) => {
// 添加属性
this.$set(this.interfaceOptions[index], 'interface', []);
console.log(this.interface);
});
} else {
this.$message({
......@@ -252,57 +272,66 @@
},
// 获取选择的值
selectApi(e, value) {
console.log(value, 'value');
this.searchParam.departmentId = value[1];
console.log(this.searchParam);
},
search() {
this.loading = true;
const params = {
departmentId: this.searchParam.departmentId || null,
workStatus: String(this.searchParam.ScheduleStatus) || null,
startTime: this.searchParam.createRangeTime.length > 0 ? this.searchParam.createRangeTime[0] : null,
endTime: this.searchParam.createRangeTime.length > 0 ? this.searchParam.createRangeTime[1] : null,
startTime:
this.searchParam.createRangeTime.length > 0
? this.searchParam.createRangeTime[0]
: null,
endTime:
this.searchParam.createRangeTime.length > 0
? this.searchParam.createRangeTime[1]
: null,
condition: this.searchParam.idNamePhone || null,
level: this.searchParam.createType || null,
sort:this.searchParam.sort || null,
sort: this.searchParam.sort || null,
serviceOpen: String(this.searchParam.serviceOpen) || null,
pageNo: this.searchParam.pageNo,
pageSize: this.searchParam.pageSize,
};
workQuery(params).then(res => {
workQuery(params).then((res) => {
this.loading = false;
if (res.code === '000000') {
this.tableData = res.data.list || [];
this.tableData = (res.data.list || []).map((item) => {
if (item.switchStatus === '1') {
return {
...item,
switchStatus: true,
};
} else {
return {
...item,
switchStatus: false,
};
}
});
this.searchParam.totalRows = res.data.count;
}
});
},
getServiceOpen(value) {
console.log(value, '22222');
this.searchParam.serviceOpen = value;
console.log(this.searchParam);
},
getWorkStatus(value) {
console.log(value, '22223333');
this.searchParam.ScheduleStatus = value;
console.log(this.searchParam);
},
changeSwitch(value, val) {
console.log(value, val, '12321');
switchOpen({
id:val.id,
switchOpen:val.delivery ? '1' : '2'
}).then(res => {
id: val.id,
switchOpen: val.switchStatus ? '1' : '2',
}).then((res) => {
if (res.code === '000000') {
console.log(res);
this.search();
}
});
},
searchInStep() {
workInStep().then(res => {
workInStep().then((res) => {
if (res.code === '000000') {
this.search();
}
......@@ -317,36 +346,37 @@
this.search();
},
getLevel() {
getLevel().then(res => {
getLevel().then((res) => {
if (res.code === '000000') {
console.log(res, 'getLevel');
this.createList = res.data || [];
this.createList.forEach(item => {
this.createList.forEach((item) => {
const newCreateObj = {
value:'',
text:''
value: '',
text: '',
};
newCreateObj.value = item;
newCreateObj.text = item;
this.newCreateList.push(newCreateObj);
});
console.log(this.newCreateList, 'this.newCreateList');
}
});
},
sortfunc(data) {
console.log(data, 'data');
if (data.prop === '"modifiedTime"' && data.order === 'descending') {
this.searchParam.sort = '1';
} else{
} else {
this.searchParam.sort = '2';
}
this.search();
},
addSchedule(value, val) {
console.log(value, val, 'value,val');
this.ScheduleListShow = false;
}
this.schedulingTypeValue = value;
this.schedulingType = val;
},
goBack() {
this.ScheduleListShow = true;
},
},
};
</script>
......@@ -400,35 +430,34 @@
display: flex;
align-items: center;
}
.synchro-btn-icon{
.synchro-btn-icon {
display: flex;
align-items: center;
justify-content: center;
position: absolute;
right: 20px;
.synchro-btn{
.synchro-btn {
width: 110px;
height: 32px;
border-radius: 18px;
border: 1px solid #0D9078;
border: 1px solid #0d9078;
display: flex;
align-items: center;
justify-content: center;
background: #FFFFFF;
background: #ffffff;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #0D9078;
color: #0d9078;
}
.el-icon-s-question{
margin-left:10px;
.el-icon-s-question {
margin-left: 10px;
width: 16px;
height: 16px;
}
}
}
.serviceSchedule-table{
.serviceSchedule-table {
min-width: 1200px;
padding-top: 15px;
}
......@@ -439,6 +468,16 @@
.header {
padding: 30px;
width: 100%;
.el-breadcrumb {
.breadcrumb-serviceSchedule {
/deep/ .breadcrumb-back {
font-weight: 400 !important;
color: #606266;
cursor: text;
cursor: pointer;
}
}
}
}
.serviceSchedule-container {
height: 100%;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册