Commit a7b52ef8 authored by 刘予佳's avatar 刘予佳

随访调查列表查询框

parent 004d5a59
...@@ -4,7 +4,14 @@ import request from "@/utils/request"; ...@@ -4,7 +4,14 @@ import request from "@/utils/request";
* 随访 * 随访
* *
* */ * */
//随访调查 列表
export function getFollowSurvey(params = {}) {
return request({
url: "/disease-data/follow/survey",
method: "get",
params,
});
}
//审核质控 随访 //审核质控 随访
export function getFollowCheck(params = {}) { export function getFollowCheck(params = {}) {
return request({ return request({
......
...@@ -11,8 +11,7 @@ ...@@ -11,8 +11,7 @@
:header-row-class-name="headerClass" :header-row-class-name="headerClass"
style="width: 100%" style="width: 100%"
> >
<el-table-column v-if="showIndex" type="index" width="120" label="序号"> <el-table-column v-if="showIndex" type="index" width="120" label="序号"></el-table-column>
</el-table-column>
<template v-for="(column, index) in columns"> <template v-for="(column, index) in columns">
<template v-if="!column.type && !column.operType"> <template v-if="!column.type && !column.operType">
<el-table-column <el-table-column
...@@ -31,15 +30,20 @@ ...@@ -31,15 +30,20 @@
> >
<!-- 表头插槽 --> <!-- 表头插槽 -->
<template slot="header" slot-scope="scope"> <template slot="header" slot-scope="scope">
<span :style="{ fontSize: fontSize[fontIndex] }">{{ <span :style="{ fontSize: fontSize[fontIndex] }">{{column.label}}</span>
column.label
}}</span>
</template> </template>
<!-- 表内容插槽 --> <!-- 表内容插槽 -->
<template slot-scope="scope"> <template slot-scope="scope">
<span :style="{ fontSize: fontSize[fontIndex] }"> <!-- 转化文字 -->
{{ scope.row[column.value] || "--" }}</span <span
> :style="{ fontSize: fontSize[fontIndex] }"
v-if="column.transList"
>{{column.transList[scope.row[String(column.value)]]|| "--"}}</span>
<!-- 一般情况 -->
<span
:style="{ fontSize: fontSize[fontIndex] }"
v-else
>{{ scope.row[column.value] || "--" }}</span>
</template> </template>
</el-table-column> </el-table-column>
</template> </template>
...@@ -57,16 +61,16 @@ ...@@ -57,16 +61,16 @@
> >
<!-- 表头插槽 --> <!-- 表头插槽 -->
<template slot="header" slot-scope="scope"> <template slot="header" slot-scope="scope">
<span :style="{ fontSize: fontSize[fontIndex] }">{{ <span :style="{ fontSize: fontSize[fontIndex] }">
{{
column.label column.label
}}</span> }}
</span>
</template> </template>
<!-- 表内容插槽 --> <!-- 表内容插槽 -->
<template slot-scope="scope"> <template slot-scope="scope">
<!-- 按钮 --> <!-- 按钮 -->
<template <template v-if="column.type === 'button' || column.operType === 'button'">
v-if="column.type === 'button' || column.operType === 'button'"
>
<!-- 按钮数组 --> <!-- 按钮数组 -->
<template v-for="(op, opIndex) in column.operations"> <template v-for="(op, opIndex) in column.operations">
<el-button <el-button
...@@ -84,11 +88,11 @@ ...@@ -84,11 +88,11 @@
@click="op.func(scope.row, scope.$index)" @click="op.func(scope.row, scope.$index)"
> >
{{ {{
op.formatter op.formatter
? op.formatter(scope.row).label ? op.formatter(scope.row).label
: op.label : op.label
? op.label ? op.label
: scope.row[column.value] : scope.row[column.value]
}} }}
</el-button> </el-button>
</template> </template>
...@@ -115,16 +119,17 @@ ...@@ -115,16 +119,17 @@
scope.row[column.value][0].uuidName scope.row[column.value][0].uuidName
: '', : '',
]" ]"
> ></el-image>
</el-image>
</template> </template>
<!-- 文件 --> <!-- 文件 -->
<template v-if="column.type === 'file'"> <template v-if="column.type === 'file'">
<span>{{ <span>
{{
scope.row[column.value] scope.row[column.value]
? scope.row[column.value][0].fileName ? scope.row[column.value][0].fileName
: "" : ""
}}</span> }}
</span>
</template> </template>
<!-- html --> <!-- html -->
<template v-if="column.type === 'html'"> <template v-if="column.type === 'html'">
...@@ -137,8 +142,7 @@ ...@@ -137,8 +142,7 @@
:active-value="1" :active-value="1"
:inactive-value="0" :inactive-value="0"
@change="column.func(scope.row, scope.$index)" @change="column.func(scope.row, scope.$index)"
> ></el-switch>
</el-switch>
</template> </template>
</template> </template>
</el-table-column> </el-table-column>
......
...@@ -38,9 +38,11 @@ ...@@ -38,9 +38,11 @@
@focus="item.focusFunc ? item.focusFunc($event) : {}" @focus="item.focusFunc ? item.focusFunc($event) : {}"
@change="item.func ? item.func($event) : {}" @change="item.func ? item.func($event) : {}"
> >
<span v-if="item.unit" :slot="item.slot ? item.slot : 'append'">{{ <span v-if="item.unit" :slot="item.slot ? item.slot : 'append'">
{{
item.unit item.unit
}}</span> }}
</span>
</el-input> </el-input>
<template v-if="item.type === 'textarea'"> <template v-if="item.type === 'textarea'">
...@@ -88,8 +90,7 @@ ...@@ -88,8 +90,7 @@
:key="optIndex" :key="optIndex"
:label="opt.label" :label="opt.label"
:value="item.isSelect ? opt.selectValue : opt.value" :value="item.isSelect ? opt.selectValue : opt.value"
> ></el-option>
</el-option>
</el-select> </el-select>
<!-- 日期区间 --> <!-- 日期区间 -->
...@@ -105,8 +106,7 @@ ...@@ -105,8 +106,7 @@
:picker-options="item.options" :picker-options="item.options"
:format="item.format" :format="item.format"
:value-format="item.valueFormat" :value-format="item.valueFormat"
> ></el-date-picker>
</el-date-picker>
<!-- 日期 --> <!-- 日期 -->
<el-date-picker <el-date-picker
...@@ -117,8 +117,7 @@ ...@@ -117,8 +117,7 @@
:picker-options="item.options" :picker-options="item.options"
:format="item.format" :format="item.format"
:value-format="item.valueFormat" :value-format="item.valueFormat"
> ></el-date-picker>
</el-date-picker>
<!-- 下拉框 --> <!-- 下拉框 -->
<el-select <el-select
...@@ -135,8 +134,7 @@ ...@@ -135,8 +134,7 @@
:key="optIndex" :key="optIndex"
:label="opt.label" :label="opt.label"
:value="item.isSelect ? opt.selectValue : opt.value" :value="item.isSelect ? opt.selectValue : opt.value"
> ></el-option>
</el-option>
</el-select> </el-select>
<!-- 单选框 --> <!-- 单选框 -->
...@@ -148,8 +146,7 @@ ...@@ -148,8 +146,7 @@
:class="item.class" :class="item.class"
:label="opt.value" :label="opt.value"
@change="item.func ? item.func($event) : {}" @change="item.func ? item.func($event) : {}"
>{{ opt.label }} >{{ opt.label }}</el-radio>
</el-radio>
<!-- 级联 --> <!-- 级联 -->
<el-cascader <el-cascader
...@@ -162,9 +159,7 @@ ...@@ -162,9 +159,7 @@
></el-cascader> ></el-cascader>
<!-- 文字 --> <!-- 文字 -->
<span v-else-if="item.type === 'text'"> <span v-else-if="item.type === 'text'">{{ item.text ? item.text : form[item.prop] }}</span>
{{ item.text ? item.text : form[item.prop] }}
</span>
<!-- 数字输入框 --> <!-- 数字输入框 -->
<el-input-number <el-input-number
...@@ -195,10 +190,8 @@ ...@@ -195,10 +190,8 @@
:size="size" :size="size"
:icon="btn.icon" :icon="btn.icon"
:style="btn.style" :style="btn.style"
@click="btn.func" @click="btn.func(form)"
> >{{ btn.btnText }}</el-button>
{{ btn.btnText }}
</el-button>
<div <div
v-if="btn.btnType == 'tobeModified'" v-if="btn.btnType == 'tobeModified'"
:key="index" :key="index"
...@@ -206,13 +199,8 @@ ...@@ -206,13 +199,8 @@
:style="{ backgroundColor: modifiedFlag ? '#4E68FF' : '#fff' }" :style="{ backgroundColor: modifiedFlag ? '#4E68FF' : '#fff' }"
@click="changeModified" @click="changeModified"
> >
<i <i :style="{ color: modifiedFlag ? '#fff' : '#d9d9d9' }" class="el-icon-check"></i>
:style="{ color: modifiedFlag ? '#fff' : '#d9d9d9' }" <span :style="{ color: modifiedFlag ? '#fff' : '#000' }">待修改({{ btn.tobeModified }}</span>
class="el-icon-check"
></i>
<span :style="{ color: modifiedFlag ? '#fff' : '#000' }"
>待修改({{ btn.tobeModified }}</span
>
</div> </div>
</template> </template>
</div> </div>
...@@ -227,9 +215,7 @@ ...@@ -227,9 +215,7 @@
:icon="btn.icon" :icon="btn.icon"
:style="btn.style" :style="btn.style"
@click="btn.func" @click="btn.func"
> >{{ btn.btnText }}</el-button>
{{ btn.btnText }}
</el-button>
</el-col> </el-col>
</el-form> </el-form>
</template> </template>
...@@ -270,6 +256,7 @@ export default { ...@@ -270,6 +256,7 @@ export default {
methods: { methods: {
// 查询 // 查询
handleSearch() { handleSearch() {
console.log("this.form",this.form)
this.$emit("handleSearch", this.form) this.$emit("handleSearch", this.form)
}, },
......
...@@ -174,7 +174,7 @@ export default { ...@@ -174,7 +174,7 @@ export default {
prop: "screeningTime", prop: "screeningTime",
placeholder: "请选择时间", placeholder: "请选择时间",
rules: [], rules: [],
opts: [{ label: "123", value: "1" }], opts: [],
}, },
{ {
type: "select", type: "select",
...@@ -182,7 +182,7 @@ export default { ...@@ -182,7 +182,7 @@ export default {
prop: "screeningStatus", prop: "screeningStatus",
placeholder: "请选择随访状态", placeholder: "请选择随访状态",
rules: [], rules: [],
opts: [{ label: "123", value: "1" }], opts: [],
}, },
{ {
type: "select", type: "select",
...@@ -190,7 +190,7 @@ export default { ...@@ -190,7 +190,7 @@ export default {
prop: "screeningProgress", prop: "screeningProgress",
placeholder: "请选择随访进度", placeholder: "请选择随访进度",
rules: [], rules: [],
opts: [{ label: "123", value: "1" }], opts: [],
}, },
{ {
type: "select", type: "select",
...@@ -198,7 +198,7 @@ export default { ...@@ -198,7 +198,7 @@ export default {
prop: "planScreeningTime", prop: "planScreeningTime",
placeholder: "请选择计划随访时间", placeholder: "请选择计划随访时间",
rules: [], rules: [],
opts: [{ label: "123", value: "1" }], opts: [],
}, },
{ {
type: "input", type: "input",
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<!-- 随访调查 --> <!-- 随访调查 -->
<div class="screeningSearch"> <div class="screeningSearch">
<div class="top"> <div class="top">
<form-components :forms="formList"></form-components> <form-components :forms="formList" @handleSearch="onSearch"></form-components>
</div> </div>
<div class="bot"> <div class="bot">
<customs-table <customs-table
...@@ -25,6 +25,8 @@ ...@@ -25,6 +25,8 @@
import FormComponents from "@/components/FormComponents" import FormComponents from "@/components/FormComponents"
import CustomsTable from "@/components/CustomsTable" import CustomsTable from "@/components/CustomsTable"
import paginationMixin from "@/components/TabComponents/mixin" import paginationMixin from "@/components/TabComponents/mixin"
import { getFollowSurvey } from "@/api/followup"
import { getDictDetail } from "@/api/dict.js"
export default { export default {
components: { components: {
CustomsTable, CustomsTable,
...@@ -39,51 +41,64 @@ export default { ...@@ -39,51 +41,64 @@ export default {
columns: [ columns: [
{ {
label: "医联体", label: "医联体",
value: "name", value: "unionName",
minWidth: 120, minWidth: 120,
}, },
{ {
label: "姓名", label: "姓名",
value: "1", value: "name",
minWidth: 120, minWidth: 120,
}, },
{ {
label: "性别", label: "性别",
value: "2", value: "sex",
minWidth: 120, minWidth: 120,
// trans:'d-sex',
transList:{
1:'',
2:''
}
}, },
{ {
label: "身份证", label: "身份证",
value: "3", value: "idCard",
minWidth: 120, minWidth: 120,
}, },
{ {
label: "年龄", label: "年龄",
value:"age",
minWidth: 120, minWidth: 120,
}, },
{ {
label: "筛查时间", label: "筛查时间",
value: "5", value: "screeningTime",
minWidth: 120, minWidth: 120,
}, },
{ {
label: "风险评估结果", label: "风险评估结果",
value: "6", value: "riskRank",
trans:'risk_level',
transList:{
},
minWidth: 120, minWidth: 120,
}, },
{ {
label: "上次随访时间", label: "上次随访时间",
value: "7", value: "followTime",
minWidth: 120, minWidth: 120,
}, },
{ {
label: "随访进度", label: "随访进度",
value: "8", value: "followBatch",
trans:'follow_type',
transList:{
},
minWidth: 120, minWidth: 120,
}, },
{ {
label: "计划随访时间", label: "计划随访时间",
value: "9", value: "nextFollowTime",
trans:'next_follow_time',
minWidth: 120, minWidth: 120,
}, },
{ {
...@@ -104,12 +119,7 @@ export default { ...@@ -104,12 +119,7 @@ export default {
], ],
}, },
], ],
tableData: [ tableData: [],
{
name: "1",
1: 2,
},
],
formList: [ formList: [
{ {
xs: 24, xs: 24,
...@@ -119,7 +129,8 @@ export default { ...@@ -119,7 +129,8 @@ export default {
xl: 7, xl: 7,
type: "select", type: "select",
label: "计划随访时间", label: "计划随访时间",
prop: "planScreeningTime", prop: "nextFollowTime",
trans:'next_follow_time',
placeholder: "请选择计划随访时间", placeholder: "请选择计划随访时间",
rules: [], rules: [],
opts: [{ label: "123", value: "1" }], opts: [{ label: "123", value: "1" }],
...@@ -131,9 +142,33 @@ export default { ...@@ -131,9 +142,33 @@ export default {
lg: 7, lg: 7,
xl: 7, xl: 7,
type: "input", type: "input",
label: "关键词", label: "姓名",
prop: "keyWord", prop: "name",
placeholder: "请输入医联体/姓名/身份证", placeholder: "请输入姓名",
rules: [],
},
{
xs: 24,
sm: 12,
md: 12,
lg: 7,
xl: 7,
type: "input",
label: "身份证",
prop: "idCard",
placeholder: "请输入身份证",
rules: [],
},
{
xs: 24,
sm: 12,
md: 12,
lg: 7,
xl: 7,
type: "input",
label: "医联体",
prop: "unionName",
placeholder: "请输入医联体",
rules: [], rules: [],
}, },
{ {
...@@ -144,7 +179,8 @@ export default { ...@@ -144,7 +179,8 @@ export default {
xl: 7, xl: 7,
type: "select", type: "select",
label: "随访进度", label: "随访进度",
prop: "screeningProgress", prop: "followBatch",
trans:'follow_type',
placeholder: "请选择随访进度", placeholder: "请选择随访进度",
rules: [], rules: [],
opts: [{ label: "123", value: "1" }], opts: [{ label: "123", value: "1" }],
...@@ -168,9 +204,7 @@ export default { ...@@ -168,9 +204,7 @@ export default {
marginLeft: "40px", marginLeft: "40px",
}, },
btnText: "查询", btnText: "查询",
func: () => { func: this.onSearch
this.onSearch()
},
}, },
// { // {
// btnType: "tobeModified", // btnType: "tobeModified",
...@@ -179,10 +213,18 @@ export default { ...@@ -179,10 +213,18 @@ export default {
], ],
}, },
], ],
// pageSize:1,
// pageNum:10,
// totalCount:20
} }
}, },
watch: {}, watch: {},
mounted() {}, created(){
this.initColumn()
},
mounted() {
this.handleSearch()
},
methods: { methods: {
changeModified() { changeModified() {
this.modifiedFlag = !this.modifiedFlag this.modifiedFlag = !this.modifiedFlag
...@@ -197,13 +239,61 @@ export default { ...@@ -197,13 +239,61 @@ export default {
console.log(this.page) console.log(this.page)
this.$refs.customTable.loading = false this.$refs.customTable.loading = false
}, },
onSearch() { onSearch(form) {
console.log(123456) console.log(form)
}, },
rowOpration(data, i) { rowOpration(data, i) {
console.log(data, i) console.log(data, i)
this.$router.push("/followupentry") this.$router.push("/followupentry")
}, },
async handleSearch(){
let params={
pageSize:this.pageSize,
pageNum:this.pageIndex
}
let res = await getFollowSurvey(params)
if(res.code==1){
//分页内容
const d = res.data
this.total= d.total
this.tableData=d['records']
}
},
initColumn(){
this.columns.forEach((item,index) => {
if(item.trans){
this.initDict(item.trans,index)
}
})
},
async initDict(type,index){
let params={
type:type
}
const res = await getDictDetail(params)
let item = this.formList.find(_ => _.trans == type)
res.data.forEach((itemD,inx) => {
if(!this.columns[index]['transList']){
this.columns[index]['transList']={}
}
else{
this.columns[index]['transList'][itemD.code]=itemD.name
}
if(item){
if(!item['opts']){
item['opts']=[]
}
else {
item['opts']=res.data.map((_) => {
return {
label: _.name,
value: _.code,
}
})
}
}
})
}
}, },
} }
</script> </script>
......
...@@ -114,6 +114,7 @@ export default { ...@@ -114,6 +114,7 @@ export default {
this.loading = false this.loading = false
} else { } else {
// 返回 // 返回
this.$router.back()
} }
}, },
dialogSubmit() {}, dialogSubmit() {},
......
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