画像编辑提交

This commit is contained in:
shidongli 2024-06-26 18:08:42 +08:00
parent c3be4b49ad
commit 904b7e7f6f
2 changed files with 43 additions and 159 deletions

View File

@ -26,9 +26,9 @@ export function groupingValue(query) {
})
}
// 提交
export function inserList(data) {
export function insertLabelField(data) {
return request({
url: '/manage/nodeParamsCurrent/inserList',
url: '/manage/labelfieldcontent/insertLabelField',
method: 'post',
data: data
})

View File

@ -27,73 +27,16 @@
:key="index"
@click="bottomclickevent(ulitem)"
>
<div :class="taskid == ulitem.taskPartitionDictId ? 'allactive' : 'all'">
<div
:class="
taskid == ulitem.taskPartitionDictId ? 'allactive' : 'all'
"
>
{{ ulitem.taskPartitionDictName }}
</div>
<!-- <span class="count">{{ ulitem.countNum }}</span> -->
</div>
</div>
<!-- <el-timeline>
<el-timeline-item
v-for="(uitem, uindex) in getAllNodeByPatientlist"
:key="uindex"
:color="listindex == uindex ? '#409EFF' : ''"
>
<div class="top">
<div class="toptop">
<el-select
v-model="uitem.routeNodeName"
style="width: 87px"
disabled
>
<el-option label="出院后" value="AFTER_DISCHARGE" />
<el-option label="入院后" value="AFTER_ADMISSION" />
<el-option label="就诊后" value="AFTER_CONSULTATION" />
<el-option
label="就诊/出院后"
value="AFTER_VISIT_DISCHARGE"
/>
<el-option label="术前" value="PREOPERATIVE" />
<el-option label="术后" value="POSTOPERATIVE" />
</el-select>
<el-input
disabled
v-model="uitem.routeNodeDay"
style="width: 70px"
type="number"
></el-input>
<span></span>
</div>
<div></div>
</div>
<el-card
v-for="(ulitem, ulindex) in uitem.list"
:key="ulindex"
@click.native="bottomclickevent(ulitem, uindex, ulindex)"
:class="
listindex == uindex && itemindex == ulindex ? 'cards' : ''
"
>
<h3 style="height: 20px">{{ ulitem.taskTypeName }}</h3>
<el-tag
v-if="ulitem.routeCheckStatus == 'AGREE'"
class="routeCheckStatus"
>已审核</el-tag
>
<el-tag
v-else-if="ulitem.routeCheckStatus == 'DISAGREE'"
type="danger"
class="routeCheckStatus"
>不同意</el-tag
>
<el-tag v-else type="warning" class="routeCheckStatus"
>未审核</el-tag
>
<p style="height: 16px">{{ ulitem.taskPartitionDictName }}</p>
</el-card>
</el-timeline-item>
</el-timeline> -->
</div>
<div class="texts">
<div class="topform">
@ -112,7 +55,7 @@
label-width="100px"
:rules="rules"
>
<!-- {{item}} -->
<!-- {{item}} -->
<el-form-item
v-for="(ite, ind) in item"
:label="ite.fieldName"
@ -161,21 +104,19 @@
</template>
<script>
import { getAllNodeByPatient, groupingValue, inserList, groupingContent } from '@/api/manage/Portraitedit'
import { groupingValue, insertLabelField, groupingContent } from '@/api/manage/Portraitedit'
export default {
name: "Portraitedit1",
data() {
return {
name: null,
taskid: 0,
count: '',
DepartmentoList: [],
//
querydepartmen: {
// patientId: this.$route.query.patientId,
taskPartitionDictName: "",
},
itemid: null,
itemdata: {},
taskPartitionCode: "",
//
@ -187,16 +128,9 @@ export default {
},
querytParams: {
taskPartitionDictId: '',
// signPatientManageRouteNodeId: '',
patientId: this.$route.query.patientId,
},
rules: {
routeCheckStatus: [
{ required: true, message: '请选择节点审核状态', trigger: 'change' }
],
},
totalNumber: 0,
agreeNumber: 0,
rules: {},
updata: {
specialDiseaseRouteId: '',
suitRange: '',
@ -204,17 +138,27 @@ export default {
specialDiseaseNodeList: [],
},
form: {},
itemindex: 0,
listindex: null,
input: '',
moban: [],
};
},
created() {
// this.Departmentlist()
console.log(this.$route.query, 'this.$route.query')
this.qurelist.patientId = this.$route.query.patientId
this.getAllNodeBy()
// console.log(this.DepartmentoList)
// var querytParams={
// taskPartitionDictId: this.DepartmentoList[0].taskPartitionDictId,
// patientId: this.$route.query.patientId,
// }
// groupingValue(querytParams).then(res => {
// console.log(res, 'res')
// this.moban = JSON.parse(JSON.stringify(res))
// this.getParamslistData = res
// // console.log(this.getParamslistData, '009090')
// })
},
beforeDestroy() { },
watch: {
@ -227,15 +171,6 @@ export default {
mounted() {
},
methods: {
//
// Departmentlist() {
// this.loading = true;
// groupingContent(this.querydepartmen).then(response => {
// this.DepartmentoList = response.data;
// this.loading = false;
// });
// },
//
getAllNodeBy() {
const loading = this.$loading({
@ -247,69 +182,18 @@ export default {
this.getAllNodeByPatientlist = []
if (this.$route.query) {
groupingContent(this.querydepartmen).then(response => {
this.DepartmentoList = response.data;
this.DepartmentoList = response.data;
this.querytParams.taskPartitionDictId = this.DepartmentoList[0].taskPartitionDictId
this.getParams()
loading.close();
this.loading = false;
}).catch(() => {
loading.close();
this.loading = false;
}).catch(() => {
loading.close();
});
} else {
loading.close();
this.getAllNodeByPatientlist.push({
routeNodeName: "",
routeNodeDay: "",
list: [
{
routeCheckStatus: "AGREE",
routeId: '',
routeName: "",
routeNodeDay: "",
routeNodeId: "",
routeNodeName: "",
taskPartitionCode: "",
taskPartitionDictId: "",
taskPartitionDictName: "",
taskTypeCode: "",
taskTypeId: "",
taskTypeName: "",
},
],
});
}
},
handleData(list, key, keytwo) {
//
let keysArr = list.map((item) => {
return {
routeNodeDay: item[key],
routeNodeName: item[keytwo],
};
});
let array = keysArr.filter(
(item, index, arr) =>
index ===
arr.findIndex(
(ite) =>
ite.routeNodeDay == item.routeNodeDay &&
ite.routeNodeName == item.routeNodeName
)
);
let keys = [...new Set(array)];
let newList = keys.map((item) => {
return {
//
routeNodeDay: item[key], //1tian
routeNodeName: item[keytwo],
list: list.filter(
(i) => i[key] == item[key] && i[keytwo] == item[keytwo]
),
};
});
return newList;
},
bottomclickevent(ulitem) {
console.log(ulitem, '9999')
this.taskid = ulitem.taskPartitionDictId
@ -322,13 +206,6 @@ export default {
getParams() {
groupingValue(this.querytParams).then(res => {
console.log(res, 'res')
// res.data.forEach(e => {
// e.forEach(el => {
// el.patientId = this.$route.query.patientId
// el.patientName = this.$route.query.patientName
// el.sn = Number(el.sn)
// })
// })
this.moban = JSON.parse(JSON.stringify(res))
this.getParamslistData = res
console.log(this.getParamslistData, '009090')
@ -339,8 +216,13 @@ export default {
//
TemporaryStorage() {
var emptyItems = []
emptyItems = this.getParamslistData.flat().filter(f => f.fieldValue == "")
console.log(this.getParamslistData,'this.getParamslistData')
var form={
groupingValues:[]
}
form.groupingValues=this.getParamslistData
emptyItems = form.groupingValues.flat().filter(f => f.fieldValue == "" || !f.fieldValue)
console.log(form, 'this.form')
// this.getParamslistData.forEach(e => {
// e.forEach(el => {
// el.routeId = this.itemdata.routeId
@ -355,7 +237,9 @@ export default {
// el.taskTypeName = this.itemdata.taskTypeName
// })
// })
return
console.log(emptyItems, 'emptyItems')
// return
if (emptyItems && emptyItems.length > 0) {
this.$modal.msgError("请填写完整,再进行提交");
} else {
@ -369,7 +253,8 @@ export default {
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
inserList(this.getParamslistData).then(res => {
insertLabelField(form).then(res => {
if (res.code == 200) {
this.$modal.msgSuccess("提交成功!");
this.indexdata = null
@ -389,7 +274,7 @@ export default {
this.moban[0].forEach(e => {
e.fieldValue = ""
e.portraitSn=''
e.portraitSn = ''
// e.id = ""
})
const newVal = JSON.parse(JSON.stringify(this.moban[0]))
@ -402,7 +287,6 @@ export default {
},
delitem(index, item) {
this.getParamslistData.splice(index, 1)
},
}
};