Browse Source

随访工单添加子状态查询条件

newMaster
1747191978@qq.com 4 months ago
parent
commit
9d10e8a311
  1. 6
      acupuncture-前台/src/views/followFile/work.vue
  2. 319
      acupuncture-后台/src/views/indexCom/query.vue

6
acupuncture-前台/src/views/followFile/work.vue

@ -64,7 +64,7 @@
<el-table-column fixed="right" label="操作" align="center" width="180"> <el-table-column fixed="right" label="操作" align="center" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- 待随访 --> <!-- 待随访 -->
<div v-if="scope.row.status == 0 || scope.row.status == 3 || scope.row.status == 4"> <div v-if="queryParams.param.status == 0">
<el-button size="mini" type="text" icon="el-icon-s-check" <el-button size="mini" type="text" icon="el-icon-s-check"
@click="handleFollow(scope.row)"> @click="handleFollow(scope.row)">
去随访 去随访
@ -75,12 +75,12 @@
</el-button> </el-button>
</div> </div>
<!-- 随访 --> <!-- 随访 -->
<el-button v-if="scope.row.status == 1" size="mini" type="text" icon="el-icon-s-check" <el-button v-if="queryParams.param.status == 1" size="mini" type="text" icon="el-icon-s-check"
@click="handleDetails(scope.row)"> @click="handleDetails(scope.row)">
查看详情 查看详情
</el-button> </el-button>
<!-- 失访 --> <!-- 失访 -->
<el-button v-if="scope.row.status == 2" size="mini" type="text" icon="el-icon-s-check" <el-button v-if="queryParams.param.status == 2" size="mini" type="text" icon="el-icon-s-check"
@click="handleBeFollow(scope.row)"> @click="handleBeFollow(scope.row)">
标记待随访 标记待随访
</el-button> </el-button>

319
acupuncture-后台/src/views/indexCom/query.vue

@ -1,12 +1,12 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<div class="title1"> <div class="title1">
<span class="title-bor"></span> <span class="title-bor"></span>
{{ title }} {{ title }}
</div> </div>
<div> <div>
<div> <div>
<!-- <el-radio-group <!-- <el-radio-group
v-model="radioValue" v-model="radioValue"
size="small" size="small"
style="height: 36px" style="height: 36px"
@ -17,163 +17,158 @@
<el-radio label="2" border style="margin: 0 20px 0 0"></el-radio> <el-radio label="2" border style="margin: 0 20px 0 0"></el-radio>
<el-radio label="3" border style="margin: 0 20px 0 0"></el-radio> <el-radio label="3" border style="margin: 0 20px 0 0"></el-radio>
</el-radio-group> --> </el-radio-group> -->
<el-date-picker <el-date-picker v-model="pickerValue" type="daterange" align="right" unlink-panels range-separator=""
v-model="pickerValue" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" @change="pickerChage">
type="daterange" </el-date-picker>
align="right" </div>
unlink-panels </div>
range-separator="至" </div>
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
@change="pickerChage"
>
</el-date-picker>
</div>
</div>
</div>
</template> </template>
<script> <script>
// import { deviceType } from "./index.js"; // import { deviceType } from "./index.js";
// this.$store.commit('headerFun', data) // this.$store.commit('headerFun', data)
export default { export default {
name: "Post", name: "Post",
props: ["title", "type"], props: ["title", "type"],
data() { data() {
return { return {
radioValue: "1", radioValue: "1",
radioTime: [], radioTime: [],
pickerValue: null, pickerValue: null,
pickerOptions: { pickerOptions: {
shortcuts: [ shortcuts: [{
{ text: "最近一周",
text: "最近一周", onClick(picker) {
onClick(picker) { const end = new Date();
const end = new Date(); const start = new Date();
const start = new Date(); start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); picker.$emit("pick", [start, end]);
picker.$emit("pick", [start, end]); },
}, },
}, {
{ text: "最近一个月",
text: "最近一个月", onClick(picker) {
onClick(picker) { const end = new Date();
const end = new Date(); const start = new Date();
const start = new Date(); start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30); picker.$emit("pick", [start, end]);
picker.$emit("pick", [start, end]); },
}, },
}, {
{ text: "最近三个月",
text: "最近三个月", onClick(picker) {
onClick(picker) { const end = new Date();
const end = new Date(); const start = new Date();
const start = new Date(); start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90); picker.$emit("pick", [start, end]);
picker.$emit("pick", [start, end]); },
}, },
}, ],
], },
}, };
}; },
}, created() {
created() { console.log(this.pickerValue, 222);
console.log(this.pickerValue, 222); },
}, methods: {
methods: { radioChange() {
radioChange() { const start = new Date();
const start = new Date(); const end = new Date();
const end = new Date(); this.timeType = 4;
this.timeType = 4; if (this.radioValue == 0) {
if (this.radioValue == 0) { this.timeType = 4;
this.timeType = 4; start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); this.radioTime = [start, end];
this.radioTime = [start, end]; }
} if (this.radioValue == 1) {
if (this.radioValue == 1) { this.timeType = 4;
this.timeType = 4; start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30); this.radioTime = [start, end];
this.radioTime = [start, end]; }
} if (this.radioValue == 2) {
if (this.radioValue == 2) { this.timeType = 1;
this.timeType = 1; const now = new Date(); //
const now = new Date(); // const nowYear = now.getFullYear(); //
const nowYear = now.getFullYear(); // const nowMonth = now.getMonth(); //
const nowMonth = now.getMonth(); // const nowDay = now.getDate(); //
const nowDay = now.getDate(); // const nowDayOfWeek = now.getDay(); //
const nowDayOfWeek = now.getDay(); // const jd = Math.ceil((nowMonth + 1) / 3); //
const jd = Math.ceil((nowMonth + 1) / 3); // const startDate = new Date(nowYear, (jd - 1) * 3, 1);
const startDate = new Date(nowYear, (jd - 1) * 3, 1); const endDate = new Date(nowYear, jd * 3, 0);
const endDate = new Date(nowYear, jd * 3, 0); this.radioTime = [startDate, endDate];
this.radioTime = [startDate, endDate]; }
} if (this.radioValue == 3) {
if (this.radioValue == 3) { this.timeType = 1;
this.timeType = 1; end.setTime(start.getTime());
end.setTime(start.getTime()); start.setTime(start.getTime() - 3600 * 1000 * 24 * 365);
start.setTime(start.getTime() - 3600 * 1000 * 24 * 365); this.radioTime = [start, end];
this.radioTime = [start, end]; }
} this.$emit(
this.$emit( "radio-change",
"radio-change", this.pickerValue || this.radioTime,
this.pickerValue || this.radioTime, this.type,
this.type, this.timeType
this.timeType );
); },
}, pickerChage() {
pickerChage() { if (!this.pickerValue) {
if (!this.pickerValue) { this.radioChange();
this.radioChange(); }
} console.log(this.pickerValue, 111);
console.log(this.pickerValue, 111); this.radioTime = [];
this.radioTime = []; this.timeType = 4;
this.timeType = 4; if (this.radioValue == 0) {
if (this.radioValue == 0) { this.timeType = 4;
this.timeType = 4; }
} if (this.radioValue == 1) {
if (this.radioValue == 1) { this.timeType = 4;
this.timeType = 4; }
} if (this.radioValue == 2) {
if (this.radioValue == 2) { this.timeType = 1;
this.timeType = 1; }
} if (this.radioValue == 3) {
if (this.radioValue == 3) { this.timeType = 1;
this.timeType = 1; }
} this.$emit("picker-change", this.pickerValue, this.type, this.timeType);
this.$emit("picker-change", this.pickerValue, this.type, this.timeType); },
}, },
}, };
};
</script> </script>
<style scoped src="@/assets/styles/common.css"></style> <style scoped src="@/assets/styles/common.css"></style>
<style scoped> <style scoped>
. >>> .el-radio--small.is-bordered { .>>>.el-radio--small.is-bordered {
margin-right: 20px !important; margin-right: 20px !important;
margin-left: 0 !important; margin-left: 0 !important;
} }
>>> .el-radio__input {
display: none; >>>.el-radio__input {
} display: none;
>>> .el-radio__label { }
padding-left: 5px;
} >>>.el-radio__label {
.app-container { padding-left: 5px;
padding: 0; }
display: flex;
justify-content: space-between; .app-container {
} padding: 0;
.title1 { display: flex;
display: flex; justify-content: space-between;
align-items: center; }
font-size: 20px;
font-weight: 600; .title1 {
} display: flex;
.title-bor { align-items: center;
display: inline-block; font-size: 20px;
height: 20px; font-weight: 600;
width: 6px; }
background: #4f8bff;
margin-right: 10px; .title-bor {
border-radius: 8px; display: inline-block;
} height: 20px;
</style> width: 6px;
background: #4f8bff;
margin-right: 10px;
border-radius: 8px;
}
</style>
Loading…
Cancel
Save