Commit 5c0f6e5d authored by 刘予佳's avatar 刘予佳

详情随访接口 表格样式

parent 1fb9382e
......@@ -30,10 +30,15 @@ export function getFollowUncheck(params = {}) {
});
}
//随访病例待审核(详情数据)
export function getFollowUnCheckDetail(params = {}) {
export function getFollowUnCheckDetail(id) {
return request({
url: "/disease-data/dataCheck/follow/unCheck/detail/",
url: `/disease-data/dataCheck/follow/unCheck/detail/${id}`,
method: "get",
params,
});
}
\ No newline at end of file
}
// export function getHproleDetail(id) {
// return request({
// url: `/cloud-upms//sys/role/${id}`,
// method: "get",
// })
// }
\ No newline at end of file
......@@ -34,16 +34,9 @@
</template>
<!-- 表内容插槽 -->
<template slot-scope="scope">
<!-- 转化文字 -->
<span
:style="{ fontSize: fontSize + 'px' }"
v-if="column.transList"
>{{column.transList[scope.row[String(column.value)]]|| "--"}}</span>
<!-- 一般情况 -->
<span
:style="{ fontSize: fontSize + 'px' }"
v-else
>{{ String(scope.row[column.value]|| "--") }}</span>
<span :style="{ fontSize: fontSize + 'px' }">
<span>{{scope.row[column.value]|| "--"}}</span>
</span>
</template>
</el-table-column>
</template>
......
This diff is collapsed.
<template>
<span v-if="themeBar">
<vab-icon
title="主题配置"
:icon="['fas', 'palette']"
@click="handleChangeTheme"
/>
<vab-icon title="主题配置" :icon="['fas', 'palette']" @click="handleChangeTheme" />
<div class="theme-bar-setting">
<div @click="handleChangeTheme">
<vab-icon :icon="['fas', 'palette']" />
......@@ -86,11 +82,7 @@
></el-color-picker>
</el-form-item>
<el-form-item label="菜单文字色">
<el-color-picker
v-model="theme.menuColor"
:predefine="['#000', '#fff']"
show-alpha
></el-color-picker>
<el-color-picker v-model="theme.menuColor" :predefine="['#000', '#fff']" show-alpha></el-color-picker>
</el-form-item>
<el-form-item label="标签主题色">
<el-color-picker
......@@ -115,13 +107,11 @@
</el-form-item>
<el-form-item>
<el-button @click="handleSetDfaultTheme">恢复默认</el-button>
<el-button type="primary" @click="handleSaveTheme"
>保存</el-button
>
<el-button type="primary" @click="handleSaveTheme">保存</el-button>
</el-form-item>
</el-form>
</div></el-scrollbar
>
</div>
</el-scrollbar>
</el-drawer>
</span>
</template>
......
......@@ -32,6 +32,7 @@ const actions = {
newDictSet.push(v.type)
}
})
console.log('执行getDictData', commit, state)
commit("setDictSet", latestDict)
newDictSet = Object.keys(dictMap).length === 0 ? latestDictSet : newDictSet
// 存在新增加的字典
......@@ -56,10 +57,12 @@ const actions = {
},
// 更新字典分类
async updateDictType({ commit, state }, data) {
console.log('执行updateDictType')
commit("setDictSet", data)
},
// 更新字典详情
async updateDictDetail({ commit, state }, { type, data }) {
console.log('执行updateDictDetail')
const dictMap = state.dictMap
if (type) {
const list = data.map((item) => {
......
......@@ -213,7 +213,19 @@ html {
text-align: center;
white-space: nowrap;
}
.is-background{
button,.el-pager li{
border-radius: 6px !important;
}
button,.el-pager li:not(.active){
border: 1px solid #D9D9D9;
background: transparent !important;
}
.el-input__inner{
border-radius: 6px !important;
}
}
/* 分页结束 */
/* 菜单开始 */
......
......@@ -153,7 +153,7 @@ export function getInfoByIdCard(idCard, type = "birthDate") {
d.getFullYear() -
birthdays.getFullYear() -
(d.getMonth() < birthdays.getMonth() ||
(d.getMonth() == birthdays.getMonth() && d.getDate() < birthdays.getDate())
(d.getMonth() == birthdays.getMonth() && d.getDate() < birthdays.getDate())
? 1
: 0)
......@@ -182,12 +182,12 @@ export function paramObj(url) {
}
return JSON.parse(
'{"' +
decodeURIComponent(search)
.replace(/"/g, '\\"')
.replace(/&/g, '","')
.replace(/=/g, '":"')
.replace(/\+/g, " ") +
'"}'
decodeURIComponent(search)
.replace(/"/g, '\\"')
.replace(/&/g, '","')
.replace(/=/g, '":"')
.replace(/\+/g, " ") +
'"}'
)
}
......@@ -471,7 +471,7 @@ export function formatDicList(list, value, connector = ",") {
if (!list) return ""
if (list.constructor !== Array) return ""
// if (!value && value != 0) return ""
let result = ""
let result = "--"
let multiple = Array.isArray(value) ? true : false
if (multiple) {
const resultList = []
......@@ -489,6 +489,7 @@ export function formatDicList(list, value, connector = ",") {
}
})
}
console.log('字典', list, value, result)
return result
}
/**
......@@ -522,7 +523,7 @@ export function changeTime(time) {
let seconds = Math.floor(time % 60) //秒
return `${day ? day + "" : ""} ${hours ? hours + "小时" : ""}${
minutes ? minutes + "" : ""
}${seconds}秒`
}${seconds}秒`
}
export default { formatDicList, excelExport }
......@@ -97,7 +97,7 @@
<script>
import publicDialog from "./components/publicDialog.vue"
import screenReview from "./components/screenReview.vue"
import { getFollowUnCheckDetail } from "@/api/followup"
export default {
components: { publicDialog, screenReview },
data() {
......@@ -128,13 +128,8 @@ export default {
}
},
watch: {},
computed:{
unionId(){
return this.$route.query.id
}
},
mounted() {
this.getDetail()
},
methods: {
showDialog(val) {
......@@ -200,20 +195,7 @@ export default {
nextExample() {
this.onCancel()
},
async getDetail(){
this.loading = true
let params={
unionId:this.unionId,
}
let res = await getFollowUnCheckDetail(params)
if(res.code==1){
//分页内容
// const d = res.data
// this.total= d.total
// this.tableData=d['records']
}
this.loading = false
},
},
}
</script>
......
......@@ -18,7 +18,7 @@
</div>
</div>
<div class="bot-table">
<customs-table
<el-table-self
ref="table"
:table-data="tableData"
:columns="columns"
......@@ -70,15 +70,17 @@ export default {
sessionStorage.setItem('audit-status',val)
switch (this.type) {
case "1":
this.getFollowupList()
this.handleSearch()
break
}
console.log('status',val)
},
type(val) {
console.log('type',val)
sessionStorage.setItem('audit-type',val)
switch (val) {
case "1":
this.getFollowupList()
this.handleSearch()
break
}
},
......@@ -180,9 +182,13 @@ export default {
}
},
mounted() {
if(sessionStorage.getItem('audit-status') || sessionStorage.getItem('audit-type') ){
this.auditStatus = sessionStorage.getItem('audit-status') || "0"
this.type = sessionStorage.getItem('audit-type') || "0"
this.getFollowupList()
}
else{
this.handleSearch()
}
},
methods: {
handleClick() {
......@@ -197,20 +203,25 @@ export default {
auditHandle(data, i) {
console.log(data, i)
if (this.type == "1") {
this.$router.push("/followaudit")
this.$router.push({
path: "/followaudit",
query: {
id: data['unionId'],
},
})
} else {
this.$router.push({
path: "/auditdetail",
query: {
id: data['unionId'],
id: i,
},
})
}
},
async getFollowupList() {
async handleSearch() {
let params = {
pageSize: 10,
pageNum: 1,
pageSize:this.pageSize,
pageNum:this.pageIndex
}
let res
switch (this.auditStatus) {
......@@ -221,8 +232,8 @@ export default {
res = await getFollowCheck(params) //已审核
break;
}
this.tableData = res.records
this.total= res.total
this.tableData = res.data.records
this.total= res.data.total
},
},
}
......
......@@ -95,6 +95,7 @@
<script>
import publicDialog from "./components/publicDialog.vue"
import followReview from "./components/followReview.vue"
import { getFollowUnCheckDetail } from "@/api/followup"
export default {
components: { publicDialog, followReview },
data() {
......@@ -127,7 +128,14 @@ export default {
}
},
watch: {},
mounted() {},
mounted() {
this.getDetail()
},
computed:{
unionId(){
return this.$route.query.id
}
},
methods: {
showDialog(val) {
this.curBtn = val
......@@ -192,6 +200,17 @@ export default {
nextExample() {
this.onCancel()
},
async getDetail(){
this.loading = true
let res = await getFollowUnCheckDetail(this.unionId)
if(res.code==1){
//分页内容
// const d = res.data
// this.total= d.total
// this.tableData=d['records']
}
this.loading = false
},
},
}
</script>
......
......@@ -5,7 +5,7 @@
<form-components :forms="formList" :formEdit="formEdit" @handleSearch="onSearch"></form-components>
</div>
<div class="bot">
<customs-table
<el-table-self
ref="table"
:table-data="tableData"
:columns="columns"
......@@ -41,65 +41,82 @@ export default {
columns: [
{
label: "医联体",
value: "unionName",
minWidth: 120,
value: "unionName",
formatter: (row) => {
return row.unionName ? row.unionName : "--"
},
},
{
label: "姓名",
value: "name",
minWidth: 120,
formatter: (row) => {
return row.name ? row.name : "--"
},
value: "name",
},
{
label: "性别",
minWidth: 80,
value: "sex",
minWidth: 120,
formatter: (row) => {
return this.$handle.formatDicList(
this.dictMap["d-sex"],
String(row.sex)
)
return this.$handle.formatDicList(this.dictMap["d-sex"], row.sex + "")
},
},
{
label: "身份证",
value: "idCard",
minWidth: 120,
value: "idCard",
formatter: (row) => {
return row.idCard ? row.idCard : "--"
},
},
{
label: "年龄",
value:"age",
minWidth: 120,
value: "age",
formatter: (row) => {
return row.age ? row.age : "--"
},
},
{
label: "筛查时间",
minWidth: 180,
value: "screeningTime",
minWidth: 120,
formatter: (row) => {
return row.createTime ? row.createTime : "--"
},
},
{
label: "风险评估结果",
minWidth: 120,
value: "riskRank",
trans:'risk_level',
transList:{
formatter: (row) => {
return this.$handle.formatDicList(this.dictMap["risk_level"],String(row.riskRank))
},
minWidth: 120,
},
{
label: "上次随访时间",
value: "followTime",
minWidth: 120,
formatter: (row) => {
return row.followTime ? row.followTime : "--"
},
},
{
label: "随访进度",
value: "followBatch",
trans:'follow_type',
transList:{
},
minWidth: 120,
formatter: (row) => {
return this.$handle.formatDicList(this.dictMap["follow_type"],String(row.followBatch))
},
},
{
label: "计划随访时间",
value: "nextFollowTime",
trans:'next_follow_time',
formatter: (row) => {
return this.$handle.formatDicList(this.dictMap["next_follow_time"],String(row.nextFollowTime))
},
minWidth: 120,
},
{
......@@ -143,7 +160,8 @@ export default {
"formRecordId": "", //表单记录id
"linkPhone": "0556-5556666", //联系方式
"isContinueFollow": 1, //是否继续随访
"checkStatus": "" //审核状态
"checkStatus": "", //审核状态
"riskRank":"medium"
},
{
name:'11',
......@@ -284,7 +302,7 @@ export default {
}
},
created(){
this.initColumn()
// this.initColumn()
},
mounted() {
this.formEdit = JSON.parse(sessionStorage.getItem('followResearch-form')) ||{}
......@@ -333,41 +351,41 @@ export default {
}
this.listLoading = false
},
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,
}
})
}
}
})
}
// 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>
......
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