This commit is contained in:
2025-08-07 16:38:11 +08:00
parent bb2ffd967d
commit 348f6969c1
8 changed files with 1030 additions and 195 deletions

View File

@@ -1,143 +1,166 @@
<template>
<div class="mod-home" v-loading='loadAll'>
<div class="mod-home" v-loading="loadAll">
<!-- <h3>项目介绍</h3> -->
<el-row :gutter="12">
<el-col :span="12">
<el-card shadow="hover">
待处理订单
<span class="number">{{orderNum}}</span>
<router-link :to="{ path: '/order-buyorder', query: {} }">
<el-button type="primary" size="mini">去处理</el-button>
</router-link>
</el-card>
<el-row :gutter="12">
<el-col :span="12">
<el-card shadow="hover">
待处理订单
<span class="number">{{ orderNum }}</span>
<router-link :to="{ path: '/order-buyorder', query: {} }">
<el-button type="primary" size="mini">去处理</el-button>
</router-link>
</el-card>
</el-col>
<el-col :span="12">
<el-card shadow="hover">
待处理工单/ 反馈
<span class="number">{{ workOrderNum }}</span>
<router-link :to="{ path: '/workOrder', query: {} }">
<el-button type="primary" size="mini">去处理</el-button>
</router-link>
</el-card>
</el-col>
</el-row>
<el-row :gutter="12" style="margin-top: 30px;" v-if="medicalNum > 0||medicalNum2>0">
<el-col :span="12">
<el-card shadow="hover">
待处理医案
<div style="display: flex;align-items: center;"> <p v-if="medicalNum > 0"><span style="color: #c97902;"> 待审核:</span><span class="number">{{ medicalNum }}</span></p>
<p v-if="medicalNum2 > 0"><span style="color: #2568d9;"> 待审批</span>
<span class="number">{{ medicalNum2 }}</span></p><router-link :to="{ path: '/medicalrecords-medicalList', query: {} }">
<el-button type="primary" size="mini" v-if="medicalNum > 0||medicalNum2>0"
>去处理</el-button
>
</router-link></div>
</el-card>
</el-col>
</el-col>
<el-col :span="12">
<el-card shadow="hover">
待处理工单/ 反馈
<span class="number">{{workOrderNum}}</span>
<router-link :to="{ path: '/workOrder', query: {} }">
<el-button type="primary" size="mini" >去处理</el-button>
</router-link>
</el-card>
</el-col>
</el-row>
<el-row :gutter="12" style="margin-top: 30px;">
<el-col :span="12">
<el-card shadow="hover">
待审核医案
<span class="number">{{medicalNum}}</span>
<router-link :to="{ path: '/medicalrecords-medicalList', query: {} }">
<el-button type="primary" size="mini" v-if="medicalNum>0">去处理</el-button>
</router-link>
</el-card>
</el-col>
</el-row>
</el-row>
</div>
</template>
<script>
export default {
data(){
return{
medicalNum:0,
orderNum:0,
workOrderNum:0,
// loadAll:true,
loaded:0,
}
},
created(){
this.getMedicalList()
this.getDataList()
this.getWorkDataList()
},
methods:{
// 待发货列表
getDataList() {
this.dataListLoading = true
this.$http({
url: this.$http.adornUrl('/book/buyOrder/orderList'),
method: 'post',
data: this.$http.adornData({
"searchKeyWord": '',
"productName": '',
"startTime": null,
"endTime": null,
"orderStatus": 1,
"pageIndex": 1,
"pageSize": 5,
})
}).then(({
data
}) => {
console.log(data,'列表数据')
export default {
data() {
return {
medicalNum: 0,
medicalNum2: 0,
orderNum: 0,
workOrderNum: 0,
// loadAll:true,
loaded: 0
};
},
created() {
this.getMedicalList();
this.getDataList();
this.getWorkDataList();
},
methods: {
// 待发货列表
getDataList() {
this.dataListLoading = true;
this.$http({
url: this.$http.adornUrl("/book/buyOrder/orderList"),
method: "post",
data: this.$http.adornData({
searchKeyWord: "",
productName: "",
startTime: null,
endTime: null,
orderStatus: 1,
pageIndex: 1,
pageSize: 5
})
})
.then(({ data }) => {
console.log(data, "列表数据");
if (data && data.code === 0) {
// this.dataList = data.result.records
this.orderNum = data.result.total
this.loaded += 1
this.orderNum = data.result.total;
this.loaded += 1;
}
}).catch(e => {
this.$message.error('获取待处理订单错误')
})
},
// 获取工单列表
getWorkDataList() {
.catch(e => {
this.$message.error("获取待处理订单错误");
});
},
// 获取工单列表
getWorkDataList() {
this.$http({
url: this.$http.adornUrl("/common/sysFeedback/getList"),
method: "post",
data: this.$http.adornData({
data: this.$http.adornData({
account: "",
type: "",
status: "0"
})
})
.then(({ data }) => {
if (data.code == 0) {
this.workOrderNum = data.res.length
this.loaded += 1
// console.log('_list',_list)
}
if (data.code == 0) {
this.workOrderNum = data.res.length;
this.loaded += 1;
// console.log('_list',_list)
}
})
.catch(e => {
.catch(e => {
this.$message.error("获取待处理工数量失败");
// console.log("表单提交报错");
});
},
// 获取工单列表
getMedicalList() {
this.$http({
url: this.$http.adornUrl(
"/master/medicalRecords/getMedicalRecordsListCheck"
),
method: "post",
data: this.$http.adornData({
current: 1,
limit: 999999,
state: 1
})
}).then(({ data }) => {
this.medicalNum = data.page.total
});
// 获取工单列表
getMedicalList() {
this.$http({
url: this.$http.adornUrl(
"/master/medicalRecords/getMedicalRecordsListCheck"
),
method: "post",
data: this.$http.adornData({
current: 1,
limit: 999999,
state: 1
})
}).then(({ data }) => {
this.medicalNum = data.page.total;
});
this.$http({
url: this.$http.adornUrl(
"/master/medicalRecords/getMedicalRecordsListCheck"
),
method: "post",
data: this.$http.adornData({
current: 1,
limit: 999999,
state: 3
})
}).then(({ data }) => {
this.medicalNum2 = data.page.total;
});
}
},
computed:{
loadAll(){
console.log('this.loaded',this.loaded)
if (this.loaded == 2){
return false
}else{
return true
}
},
computed: {
loadAll() {
console.log("this.loaded", this.loaded);
if (this.loaded == 2) {
return false;
} else {
return true;
}
}
}
};
</script>
<style>
.number{font-size: 30px; color: #ec6452; font-weight: bold; display: inline-block; margin-right: 20px; margin-left: 20px;}
.number {
font-size: 30px;
color: #ec6452;
font-weight: bold;
display: inline-block;
margin-right: 20px;
margin-left: 20px;
}
</style>

View File

@@ -7,7 +7,7 @@
>
当前{{
currentNode &&
["wait", "false", "all", "success"].includes(currentNode.data.id)
["wait", "false", "all", "success",'caogao','shengpi'].includes(currentNode.data.id)
? "状态"
: "标签"
}}<span
@@ -24,7 +24,7 @@
</p>
<el-button
v-if="
currentNode && !['wait', 'false', 'all'].includes(currentNode.data.id)
currentNode && !['wait', 'false', 'all','caogao','shengpi'].includes(currentNode.data.id)
"
type="primary"
@click="addOrUpdateHandle()"
@@ -94,7 +94,8 @@
:style="
`${data.color ? `color:${data.color};font-weight:bold` : ''}`
"
>{{ node.label }}</span
>{{ node.label }}{{ data.number?`&nbsp;&nbsp;(${data.number})`:'' }}</span
></span
>
<span v-if="source == 'tags'">
@@ -422,13 +423,25 @@ export default {
this.addForm = {};
// console.log(this.$refs.tree.handleClickNodes(), "当前选中节点");
console.log(node, data, "当前选中节点-----------");
this.currentNode = node;
if(data.id=='success'){
this.$set(this.currentNode, 'data', node.data.children[0])
console.log('this.currentNode at line 427:', this.currentNode)
data={...node.data.children[0]}
node={data:{...node.data.children[0]}}
this.$forceUpdate()
}else{
this.currentNode = node;
}
this.isFresh = false;
this.isFresh = true;
this.$forceUpdate();
var form = {};
if (this.source == "shop") {
await this.selectShop(data);
} else if (this.source == "tags") {
switch (type) {

View File

@@ -168,31 +168,60 @@ export default {
}
},
created() {
this.$http({
url: this.$http.adornUrl(
"/master/medicalRecords/getMedicalRecordsListCheck"
),
method: "post",
data: this.$http.adornData({
current: 1,
limit: 999999,
state: 1
})
}).then(({ data }) => {
if (data.page.total > 0) {
console.log("data at line 181:", data);
const h = this.$createElement;
this.$notify({
title: "待审核医案处理通知",
message: h(
"i",
{ style: "color: teal" },
`待审核的共有 【${data.page.total}】 条,请及时处理!!!`
)
});
}
Promise.all([
this.$http({
url: this.$http.adornUrl("/master/medicalRecords/getMedicalRecordsListCheck"),
method: "post",
data: this.$http.adornData({
current: 1,
limit: 999999,
state: 1
})
}),
this.$http({
url: this.$http.adornUrl("/master/medicalRecords/getMedicalRecordsListCheck"),
method: "post",
data: this.$http.adornData({
current: 1,
limit: 999999,
state: 3
})
})
]).then(([res1, res3]) => {
const totalCheck = res1.data.page.total || 0; // 待审核
const totalApprove = res3.data.page.total || 0; // 待审批
if (totalCheck > 0 || totalApprove > 0) {
const h = this.$createElement;
const messageNodes = [];
if (totalCheck > 0) {
messageNodes.push(
h("i", {
style: "color: #c97902; display: block; margin-bottom: 4px;"
}, `待审核的共有 【${totalCheck}】 条,请及时处理!`)
);
}
if (totalApprove > 0) {
messageNodes.push(
h("i", {
style: "color: #2568d9; display: block;"
}, `待审批的共有 【${totalApprove}】 条,请及时处理!`)
);
}
this.$notify({
title: "医案处理提醒",
message: h("div", messageNodes)
});
}
});
}
};
</script>

View File

@@ -8,7 +8,7 @@
: type == 'add'
? '新增医案'
: `医案详情${
addCertificateForm.state == 1 ? ' ( 待审核 ) ' : ' ( 已拒绝 ) '
addCertificateForm.state == 1 ? ' ( 待审核 ) ' : addCertificateForm.state == 3?' ( 审批 ) ':' ( 已拒绝 ) '
}`
}`
"
@@ -609,14 +609,14 @@
:clearable="true"
></el-input>
<el-checkbox
<!-- <el-checkbox
:true-label="1"
:false-label="0"
v-model="addCertificateForm.train"
style="margin-top: 20px;"
v-if="reviewType == 'approved'"
>是否加入 Ai 训练库</el-checkbox
>
> -->
<span slot="footer" class="dialog-footer">
<el-button @click="dialogMarkVisible = false" size="mini"

View File

@@ -0,0 +1,544 @@
<template>
<el-dialog
:title="!disableEdit?'审批':'审批记录'"
:close-on-click-modal="false"
:visible.sync="visible"
@close="handlereset"
lock-scroll
width="750px"
>
<el-form
:model="dataForm"
:rules="dataRule"
ref="dataForm"
label-width="120px"
>
<el-table :data="shengpiData" stripe style="width: 100%" size="mini">
<el-table-column prop="userid" label="ID" width="180"></el-table-column>
<el-table-column
prop="userInfo.name"
label="姓名"
width="180"
></el-table-column>
<el-table-column prop="address" label="联系方式">
<template slot-scope="scope">
<span v-if="scope.row.userInfo.tel">{{
scope.row.userInfo.tel
}}</span>
<span v-else-if="scope.row.userInfo.email">{{
scope.row.userInfo.email
}}</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column prop="result" label="审批结果">
<template slot-scope="scope">
<span
v-if="scope.row.result == 'A'"
style="color: #2bc669;font-weight: 700;font-size: 24px;"
>A</span
>
<span
v-if="scope.row.result == 'B'"
style="color: #66a3ff;font-weight: 700;font-size: 24px;"
>B</span
>
<span
v-if="scope.row.result == 'C'"
style="color: #333333cf;font-weight: 700;font-size: 24px;"
>C</span
>
<span v-if="scope.row.userid == 10172" style="margin-left: 20px;">(其他审批意见)</span>
</template>
</el-table-column>
</el-table>
<!-- <el-form-item
:label="`审批人 ( ID:${index} ) `"
prop="stateInfo"
v-for="(item, index) in shengpiList"
>
<span v-if="item == 'A'" style="color: #2bc669;font-weight: 700;">{{
item
}}</span>
<span v-if="item == 'B'" style="color: #66a3ff;font-weight: 700;">{{
item
}}</span>
<span v-if="item == 'C'" style="color: #333333cf;font-weight: 700;">{{
item
}}</span>
</el-form-item> -->
<el-form-item
label="其他审批意见:"
prop="radio"
style="margin-top: 20px;"
v-if="!disableEdit"
>
<el-radio-group v-model="dataForm.radio">
<el-radio label="A">A</el-radio>
<el-radio label="B">B</el-radio>
<el-radio label="C">C</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label="最终审批结果:"
prop="finalRadio"
style="margin-top: -10px;"
v-if="!disableEdit"
>
<el-radio-group v-model="dataForm.finalRadio">
<el-radio label="A">A</el-radio>
<el-radio label="B">B</el-radio>
<el-radio label="C">C</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label="最终审批结果:"
style="margin-top: 20px;"
v-if="disableEdit"
>
<el-radio-group :value="dataForm.state">
<el-radio :label="6">A</el-radio>
<el-radio :label="5">B</el-radio>
<el-radio :label="4">C</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="handlereset" size="mini">取消</el-button>
<el-button
type="primary"
@click="dataFormSubmit()"
size="mini"
v-if="!disableEdit"
>确定</el-button
>
</span>
</el-dialog>
</template>
<script>
import { quillEditor } from "vue-quill-editor";
import global from "@/views/common/common.vue"; //引入共用组间
import "quill/dist/quill.core.css";
import "quill/dist/quill.snow.css";
import "quill/dist/quill.bubble.css";
const toolbarOptions = [
["bold", "italic", "underline", "strike"], // 加粗,斜体,下划线,删除线
["blockquote", "code-block"], //引用,代码块
[{ header: 1 }, { header: 2 }], // 几级标题
[{ list: "ordered" }, { list: "bullet" }], // 有序列表,无序列表
[{ script: "sub" }, { script: "super" }], // 下角标,上角标
[{ indent: "-1" }, { indent: "+1" }], // 缩进
[{ direction: "rtl" }], // 文字输入方向
[{ size: ["small", false, "large", "huge"] }], // 字体大小
[{ header: [1, 2, 3, 4, 5, 6, false] }], // 标题
[{ color: [] }, { background: [] }], // 颜色选择
[
{
font: [
"SimSun",
"SimHei",
"Microsoft-YaHei",
"KaiTi",
"FangSong",
"Arial"
]
}
], // 字体
[{ align: [] }], // 居中
["clean"], // 清除样式,
["link", "image"] // 上传图片、上传视频
];
export default {
data() {
return {
disableEdit: false,
shengpiData: [],
shengpiList: [],
pointMemery: [], // 花生币操作记录
baseUrl: global.baseUrl,
goodsTypeList: [],
visible: false,
categorys: [],
fileList: [], // 封面图
swiperfileList: [],
dialogVisible: false,
props: {
value: "catId",
label: "name",
children: "children",
checkStrictly: true
},
dataForm: {},
bookidsd: [],
dataRule: {
radio: [
{ required: true, message: "其他审批意见不能为空", trigger: "blur" }
],
finalRadio: [
{ required: true, message: "最终审批结果不能为空", trigger: "blur" }
]
},
// 富文本编辑器配置
editorOption: {
modules: {
history: {
delay: 1000,
maxStack: 50,
userOnly: false
},
toolbar: {
container: toolbarOptions,
handlers: {
image: function(value) {
if (value) {
// 调用element的图片上传组件
document.querySelector(".avatar-uploader input").click();
} else {
this.quill.format("image", false);
}
}
}
}
},
placeholder: "请输入正文"
},
tagList: []
};
},
created() {
this.getTreeList();
this.getTags();
},
methods: {
contentUploadSuccess(res, file) {
// console.log(res)
let quill = this.$refs.myQuillEditor.quill;
// 如果上传成功
if (res) {
// 获取光标所在位置
let length = quill.getSelection().index;
// 插入图片res为服务器返回的图片链接地址
quill.insertEmbed(length, "image", res.url);
// 调整光标到最后
quill.setSelection(length + 1);
} else {
// 提示信息需引入Message
this.$message.error("图片插入失败!");
}
},
handleCheckedCitiesChange(value) {
// console.log(value, 'value')
},
// 获取商品标签
getTags() {
this.$http({
url: this.$http.adornUrl("/book/label/getLabels"),
method: "post"
}).then(({ data }) => {
if (data && data.code === 0) {
this.tagList = data.result.labels;
// this.totalPage = data.page.totalCount
} else {
this.tagList = [];
// this.totalPage = 0
}
});
},
showChooseBook() {
// 显示图书列表
this.$emit("showchooseBookf", { bookIds: this.dataForm.Books });
// console.log('发送指令')
this.$bus.$emit("showchooseBook", { bookIds: this.dataForm.Books });
},
async initDetail(data) {
await this.init(data);
this.disableEdit = true;
},
init(data) {
this.disableEdit = false;
console.log("data at line 213:", data);
this.shengpiList = [];
this.shengpiData = [];
this.visible = true;
this.$nextTick(() => {
this.$refs["dataForm"].resetFields();
this.dataForm = { ...data };
if (data.stateInfo) {
this.shengpiList = JSON.parse(data.stateInfo);
const userRequests = Object.keys(this.shengpiList).map(userid => {
return this.$http({
url: this.$http.adornUrl(`/book/user/info/${userid}`),
method: "get",
params: this.$http.adornParams()
})
.then(response => {
console.log("response at line 214:", response);
// 请求成功,返回用户数据
return {
userid: userid,
result: this.shengpiList[userid],
userInfo: response.data.user // 假设接口返回的是用户信息
};
})
.catch(error => {
// 请求失败,返回一个失败标识
return {
userid: userid,
result: this.shengpiList[userid],
userInfo: null // 失败时,用户信息为 null
};
});
});
Promise.all(userRequests).then(userInfoArray => {
this.shengpiData = userInfoArray; // 更新数据
console.log("Updated shengpiData:", this.shengpiData);
});
}
});
},
// 获取商品类型
getGoodsTypeList() {},
// 删除图书
deliteBook(index) {
this.dataForm.Books.splice(index, 1);
sessionStorage.setItem("Books", JSON.stringify(this.dataForm.Books));
},
dealImgChange(file, fileList) {
this.dataForm.noneBtnImg = fileList.length >= this.dataForm.limitCountImg;
},
stringifyWithoutSorting(obj) {
return (
"{" +
Object.entries(obj)
.map(([key, value]) => {
// 判断值是否是对象,递归调用
return `"${key}":${
typeof value === "object"
? stringifyWithoutSorting(value)
: JSON.stringify(value)
}`;
})
.join(",") +
"}"
);
},
// 表单提交
dataFormSubmit() {
// console.log(this.bookidsd,'this.bookidsd')
// return false
this.$refs["dataForm"].validate(valid => {
if (valid) {
this.$http({
url: this.$http.adornUrl(
`/master/medicalRecords/editMedicalRecords`
),
method: "post",
data: this.$http.adornData({
...this.dataForm,
stateInfo: this.stringifyWithoutSorting({
...this.shengpiList,
10172: this.dataForm.radio
}),
state:
this.dataForm.finalRadio == "C"
? 4
: this.dataForm.finalRadio == "B"
? 5
: this.dataForm.finalRadio == "A"
? 6
: this.dataForm.state,
train: this.dataForm.finalRadio == "A" ? 1 : 0
})
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: "操作成功",
type: "success",
duration: 1500,
onClose: () => {
this.visible = false;
this.$refs["dataForm"].resetFields();
// this.$refs['dataForm'].reset()
this.$emit("refreshDataList");
}
});
} else {
this.$message.error(data.msg);
}
});
}
});
},
changeTime(e) {
console.log(e);
},
getBookIds() {
// 图书ids
// console.log(this.dataForm.Books,'Books')
this.bookidsd = this.dataForm.Books.map(item => {
return item.id;
});
},
getTreeList() {
this.$http({
url: this.$http.adornUrl(`/book/shopcategory/listTree`),
method: "get",
params: this.$http.adornParams()
}).then(({ data }) => {
this.categorys = data.data;
});
},
handlePictureCardPreview(file) {
this.dataForm.productImages = file.url;
this.dialogVisible = true;
},
bannerHandlePicSuccess(res, file) {
// 轮播图上传成功
if (res.msg == "success") {
this.swiperfileList.push({
name: file.name,
url: res.url
});
// console.log(this.swiperfileList)
this.$message.success("上传成功");
} else {
this.$message.error("上传失败");
}
},
// 字符串图片地址
getStringImgUrl() {
let arr = this.swiperfileList.map(item => item.url);
if (arr.length <= 0) {
return null;
} else {
return arr.toString();
}
},
handlePicSuccess(res, file) {
// console.log(res,'res')
if (res.msg == "success") {
this.dataForm.productImages = res.url;
this.fileList.push({
name: file.name,
url: res.url
});
// console.log(this.dataForm.productImages,'productImages')
this.$message.success("上传成功");
} else {
this.$message.error("上传失败");
}
},
bannerHandleRemove(file, fileList) {
// 轮播图删除操作
this.swiperfileList = fileList;
},
handleRemove(file, fileList) {
this.dataForm.productImages = "";
this.fileList = [];
this.dataForm.noneBtnImg = fileList.length >= this.dataForm.limitCountImg;
},
handlereset() {
(this.fileList = []), (this.visible = false);
this.dataForm.tagList = [];
this.dataForm.Books = [];
this.swiperfileList = [];
this.$refs["dataForm"].resetFields();
sessionStorage.setItem("Books", JSON.stringify([]));
// this.$refs['dataForm'].reset()
},
// 失去焦点事件
onEditorBlur(quill) {
// console.log('editor blur!', quill)
},
// 获得焦点事件
onEditorFocus(quill) {
//console.log('editor focus!', quill)
},
// 准备富文本编辑器
onEditorReady(quill) {
// console.log('editor ready!', quill)
}
},
components: {
quillEditor
},
mounted() {
this.$bus.$on("haveBookIds", data => {
sessionStorage.setItem("Books", JSON.stringify(data.bookIds));
// console.log('haveBookIds',data)
//console.log(data.bookIds, '收到的数据')
var newarr = [];
var ids = []; //哨兵数组
if (data.bookIds && data.bookIds.length > 0) {
ids[0] = data.bookIds[0].id;
newarr[0] = data.bookIds[0];
// console.log(ids,'ids')
// newarr.push(data.bookIds[0])
for (let index = 0; index < data.bookIds.length; index++) {
if (!ids.includes(data.bookIds[index].id)) {
// console.log(data.bookIds[index].id, 'data.bookIds[index].id')
newarr.push(data.bookIds[index]);
ids.push(data.bookIds[index].id);
}
}
}
// console.log(newarr,'newarr',ids)
data.bookIds.length > 0
? (this.dataForm.Books = newarr)
: (this.dataForm.Books = []);
});
},
watch: {
visible: {
handler(val, oldVal) {
this.getGoodsTypeList();
},
deep: true
}
}
};
</script>
<style lang="less">
// .disUoloadSty {
// .el-upload--picture-card {
// display: none;
// /* 上传按钮隐藏 */
// }
// }
// .el-form-item {
// /deep/ .el-form-item__label {
// font-size: 12px;
// }
// }
.el-uploadfeng {
.el-upload-list__item {
width: 95px;
height: 95px;
}
.el-upload--picture-card {
width: 95px;
height: 95px;
line-height: 95px;
}
}
.shangpin_editor .ql-editor {
height: 150px;
}
</style>

View File

@@ -19,7 +19,9 @@
<div
class="border_box info_box"
v-if="
!['wait', 'false', 'success', 'caogao'].includes(currentNode.data.id)
!['wait', 'false', 'success', 'caogao', 'shengpi'].includes(
currentNode.data.id
)
"
>
<div class="title_box">
@@ -88,7 +90,8 @@
>
( {{ currentNode.data ? currentNode.data.title : "" }} )
</span>
<el-button v-if="currentNode&&currentNode.data.id=='caogao'"
<el-button
v-if="currentNode && currentNode.data.id == 'caogao'"
plain
type="primary"
style="margin-left: 20px"
@@ -107,7 +110,7 @@
<commonShop
v-if="isFresh"
:CustomEdit="true"
operationWidth="100"
:operationWidth="currentNode.data.id == 'shengpi' ? 100 : 100"
:otherInfo="{
httpType: 'raw',
resultValueName: 'page'
@@ -124,7 +127,12 @@
:isNoPaging="true"
:isShowPagination="true"
:isShowNewOperation="
addForm.id == 'wait' || addForm.id == 'false' || addForm.id == 'caogao'? true : false
addForm.id == 'wait' ||
addForm.id == 'false' ||
addForm.id == 'caogao' ||
addForm.id == 'shengpi'
? true
: false
"
getAssociatedGoodsListValue="result"
:tableColumnList="tableColumnList"
@@ -143,7 +151,7 @@
:style="{
height:
currentNode.data &&
['wait', 'false', 'success', 'caogao'].includes(
['wait', 'false', 'success', 'caogao', 'shengpi'].includes(
currentNode.data.id
)
? 'calc(100vh - 200px) !important'
@@ -151,6 +159,7 @@
}"
>
<template slot="searchFormItem" slot-scope="slotProps">
<div style="width:460px;height: 30px;float: left;"></div>
<!-- <el-form-item
label="手机号:"
prop="title"
@@ -253,6 +262,21 @@
label="医案标题"
>
</el-table-column>
<el-table-column
v-if="currentNode && currentNode.data.id == 'shengpi'"
prop="title"
header-align="center"
align="center"
label="审批结果【二审】"
>
<template slot-scope="scope" v-if="scope.row.stateInfo">
<span
v-for="i in JSON.parse(scope.row.stateInfo)"
style="margin-left: 8px;"
>{{ i }}</span
>
</template>
</el-table-column>
<el-table-column
v-if="currentNode && currentNode.data.id == 'caogao'"
prop="title"
@@ -278,7 +302,8 @@
</div>
</template>
</el-table-column>
<el-table-column width="90"
<el-table-column
width="90"
v-if="currentNode && currentNode.data.id == 'caogao'"
prop="title"
header-align="center"
@@ -286,17 +311,22 @@
label="解析状态"
>
<template slot-scope="scope">
<div
>
<span style="color:rgb(23, 179, 163);" v-if="scope.row.data">已完成</span>
<span style="color:rgb(187, 187, 187);" v-else>正在解析</span>
<div>
<span style="color:rgb(23, 179, 163);" v-if="scope.row.data"
>已完成</span
>
<span style="color:rgb(187, 187, 187);" v-else>正在解析</span>
</div>
</template>
</el-table-column>
<el-table-column
v-if="currentNode && currentNode.data.id != 'caogao'"
v-if="
currentNode &&
currentNode.data.id != 'caogao' &&
currentNode.data.id != 'shengpi' &&
currentNode.data.id != 'false' &&
currentNode.data.id != 'wait'
"
prop="title"
header-align="center"
align="center"
@@ -315,6 +345,7 @@
</el-switch>
</template>
</el-table-column>
<el-table-column
prop="createTime"
header-align="center"
@@ -327,23 +358,72 @@
<template
slot="operation"
slot-scope="slotProps"
v-if="addForm.id == 'wait' || addForm.id == 'false' || addForm.id == 'caogao'"
v-if="
addForm.id == 'wait' ||
addForm.id == 'false' ||
addForm.id == 'caogao' ||
addForm.id == 'shengpi'
"
>
<el-button type="text" @click="detailCourse(slotProps.row)" v-if="addForm.id == 'wait' || addForm.id == 'false'"
<el-button
style="color: #dd8f1b;"
type="text"
@click="detailCourse(slotProps.row)"
v-if="addForm.id == 'wait'"
>审核</el-button
>
<el-button
type="text"
style="color: #bbb;"
@click="detailCourse(slotProps.row)"
v-else-if="addForm.id == 'false'"
>详情</el-button
>
<div v-else-if="currentNode.data.id == 'caogao'">
<el-button type="text" @click="handleDataFormEdit({...slotProps.row,userId:slotProps.row.userId==12301?'':slotProps.row.userId})" v-if="slotProps.row.data!=''"
>编辑</el-button
>
<el-button type="text"
style="color: red;" @click="dataFormDelete([slotProps.row])"
>删除</el-button
>
<div v-else-if="currentNode.data.id == 'caogao'">
<el-button
type="text"
@click="
handleDataFormEdit({
...slotProps.row,
userId:
slotProps.row.userId == 12301 ? '' : slotProps.row.userId
})
"
v-if="slotProps.row.data != ''"
>编辑</el-button
>
<el-button
type="text"
style="color: red;"
@click="dataFormDelete([slotProps.row])"
>删除</el-button
>
</div>
<div v-else-if="currentNode.data.id == 'shengpi'">
<el-button
type="text"
style="color: #5188e5;"
@click="
addOrUpdateHandle({
...slotProps.row,
})
"
v-if="slotProps.row.data != ''"
>审批</el-button
>
<el-button
type="text"
style="color: #606266;"
@click="detailCourse(slotProps.row)"
>详情</el-button
>
<!-- <el-button type="text"
style="color: #006699;padding: 0;" @click="generateWord(slotProps.row)">
下载
</el-button> -->
</div>
</template>
</commonShop>
<!-- <div
@@ -495,6 +575,42 @@
label="医案标题"
>
</el-table-column>
<el-table-column
prop="title"
header-align="center"
align="center"
width="140"
label="医案等级"
>
<template slot-scope="scope">
<div style="position: relative;width: 100%;height: 100%;cursor: pointer;" @click="
detailOrUpdateHandle({
...scope.row,
})
">
<span
v-if="scope.row.state == 6"
style="color: #2bc669;font-weight: 700;font-size: 24px;"
>A</span
>
<span
v-if="scope.row.state == 5"
style="color: #66a3ff;font-weight: 700;font-size: 24px;"
>B</span
>
<span
v-if="scope.row.state == 4"
style="color: #333333cf;font-weight: 700;font-size: 24px;"
>C</span
>
</div>
<!-- <el-tooltip class="item" effect="dark" :content="scope.row.stateInfo" placement="top"> -->
<!-- </el-tooltip> -->
</template>
</el-table-column>
<el-table-column
prop="title"
header-align="center"
@@ -514,6 +630,7 @@
</el-switch>
</template>
</el-table-column>
<!-- <el-table-column
header-align="center"
@@ -673,17 +790,19 @@
<add-or-update
v-if="addOrUpdateVisible"
ref="addOrUpdate"
@refreshDataList="getDataList"
@refreshDataList="refreshDataList"
></add-or-update>
</div>
</template>
<script>
import HtmlDocx from "html-docx-js/dist/html-docx.js"; // 引入html-docx-js库
import { saveAs } from "file-saver";
import previewimage from "@/views/components/preview-image.vue";
import { quillEditor } from "vue-quill-editor";
import global from "../../common/common.vue"; //引入共用组间
import debounce from "lodash/debounce"; //导入lodash中的debounce
import AddOrUpdate from "@/views/components/commonBookTags/bookTagsForm.vue";
import AddOrUpdate from "./examine.vue";
import addCertificate from "@/views/modules/medicalrecords/addCertificate.vue";
import commonShop from "@/views/components/commonBookTags/shopproduct.vue";
import commonShopTable from "@/views/components/commonBookTags/shopproductTable.vue";
@@ -868,6 +987,47 @@ export default {
this.getDataList();
},
methods: {
refreshDataList() {
this.$nextTick(() => {
this.getDataList()
if (this.$refs.commonShop) {
this.$refs.commonShop.getAssociatedGoodsList();
}
});
},
generateWord(data) {
// 定义HTML内容
const htmlContent = `<h1>[医案]${data.title}</h1>
${data.information}
${data.chiefComplaint}
${data.historyOfPresentIllness}
${data.pastHistory}
${data.personalAndFamilyHistory}
${data.physicaExamination}
${data.diagnosis}
${data.treatmentPlan}
${data.other ? `<h1>其他</h1><p>${data.other}</p>` : ""}
`;
// 使用 html-docx-js 将 HTML 转换为 Word 文档
const converted = HtmlDocx.asBlob(htmlContent);
// 使用 file-saver 库保存文件
saveAs(converted, `[医案]${data.title}_${data.createTime}.docx`);
},
changeTrainValue(status, data) {
this.$http({
url: this.$http.adornUrl("/master/medicalRecords/editMedicalRecords"),
@@ -886,6 +1046,8 @@ export default {
});
},
refresh() {
this.getDataList();
this.$nextTick(() => {
this.$refs.commonShop.getAssociatedGoodsList();
});
@@ -932,6 +1094,11 @@ export default {
// this.selectChange(data.id)
},
handleDataFormExamine(data) {
console.log("data at line 472:", data);
// this.selectChange(data.id)
},
detailCourse(data) {
console.log("data at line 472:", data);
@@ -1113,7 +1280,7 @@ export default {
// name: "audio--"
// });
// }
if (!["wait", "false", "caogao"].includes(form.id)) {
if (!["wait", "false", "caogao", "shengpi"].includes(form.id)) {
await this.getDataList();
this.$nextTick(() => {
// this.$refs.commonShop.clear();
@@ -1285,6 +1452,7 @@ export default {
this.$refs.tree.setCheckedKeys([0]);
},
changeCurrentNode(val) {
console.log("val at line 1418:", val);
this.changeCurrentNode = val;
this.$forceUpdate();
},
@@ -1332,22 +1500,6 @@ export default {
this.$refs.commonShop.getDataList(type == "edit" ? form.id : "");
});
},
addOrUpdateHandle() {
var addform = {
children: [],
delFlag: 0,
isLast: 0,
pid: 0,
sort: 0,
title: "",
icon: ""
};
this.handleClickNodes({ data: addform }, addform, "add");
// if (!this.currentNode) {
// this.$message.error("请先选择分类");
// return;
// }
},
filterNode(value, data) {
if (!value) return true;
@@ -1643,16 +1795,77 @@ export default {
children: [],
state: 2
},
{
title: "审批列表",
id: "shengpi",
disabled: true,
isDisableAddChild: true,
color: "#5188e5",
bgcolor: "#edf3ff",
children: [],
state: 3
},
{
title: "已完成",
id: "success",
isDisableAddChild: true,
disabled: true,
state: 3,
state: 4,
color: "rgb(23, 179, 163)",
children: [...data.Medicals]
}
];
if (!this.currentNode.data) {
this.$refs.commonTree.handleClickNodes(
{ data: this.treeDataList[1] },
this.treeDataList[1],
"edit"
);
}
Promise.all([
this.$http({
url: this.$http.adornUrl("/master/medicalRecords/getMedicalRecordsListCheck"),
method: "post",
data: this.$http.adornData({
current: 1,
limit: 999999,
state: 1
})
}),
this.$http({
url: this.$http.adornUrl("/master/medicalRecords/getMedicalRecordsListCheck"),
method: "post",
data: this.$http.adornData({
current: 1,
limit: 999999,
state: 3
})
})
]).then(([res1, res3]) => {
const totalCheck = res1.data.page.total || 0; // 待审核
const totalApprove = res3.data.page.total || 0; // 待审批
if (totalCheck > 0 ) {
this.$set(this.treeDataList[1],'number',totalCheck);
}
if (totalApprove > 0) {
this.$set(this.treeDataList[3],'number',totalApprove);
}
});
// this.treeDataList = data.labelList;
// this.totalPage = data.page.totalCount
} else {
@@ -1676,14 +1889,20 @@ export default {
// 多选
selectionChangeHandle(val) {
this.dataListSelections = val;
},
// 新增 / 修改
addOrUpdateHandle(row) {
this.addOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.addOrUpdate.init(row);
});
},
detailOrUpdateHandle(row) {
this.addOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.addOrUpdate.initDetail(row);
});
}
// // 新增 / 修改
// addOrUpdateHandle(row) {
// this.addOrUpdateVisible = true;
// this.$nextTick(() => {
// this.$refs.addOrUpdate.init(row);
// });
// },
}
};
</script>

View File

@@ -26,6 +26,7 @@
<div class="title_box" style="margin-bottom: 10px; height: 40px">
<div class="title">
<span class="line"></span>审核人员列表
<el-button
plain
type="primary"
@@ -103,7 +104,7 @@
</template>
</el-table-column>
<el-table-column
width="180"
prop="toSociologySort"
header-align="center"
align="center"
@@ -119,14 +120,14 @@
</div>
</template>
</el-table-column>
<el-table-column
<!-- <el-table-column
prop="title"
header-align="center"
align="center"
label="审核医案"
>
</el-table-column>
-->
<!-- <el-table-column
prop="createTime"
header-align="center"
@@ -1198,7 +1199,10 @@ export default {
console.log("🚀 ~ getDataList ~ data:", data);
if (data && data.code === 0) {
this.treeDataList = [...data.Medicals];
if(!this.currentNode.data){
this.$refs.commonTree.handleClickNodes({ data: this.treeDataList[0] }, this.treeDataList[0], "edit");
}
// this.treeDataList = data.labelList;
// this.totalPage = data.page.totalCount
} else {