From 4971b8fecd0c82f9a5e0a9301644653e99dfe66f Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期三, 27 十一月 2024 16:27:18 +0800
Subject: [PATCH] 修改首页及跳转
---
src/components/do/b1-ins-order/add.vue | 21 ++++++++--
src/main.js | 4 +-
src/components/view/b1-inspection-order.vue | 23 +++++++++++
src/view/index.vue | 11 ++++-
src/components/view/index-index.vue | 54 ++++++++++++++++++++-------
5 files changed, 91 insertions(+), 22 deletions(-)
diff --git a/src/components/do/b1-ins-order/add.vue b/src/components/do/b1-ins-order/add.vue
index 60c0167..54397cd 100644
--- a/src/components/do/b1-ins-order/add.vue
+++ b/src/components/do/b1-ins-order/add.vue
@@ -2784,7 +2784,23 @@
// 淇濆瓨妯℃澘
addTemplateDia() {
if (this.templateName) {
- this.templateLoading = true;
+ if(this.templates.find(m=>m.name==this.templateName)){
+ this.$confirm('宸插瓨鍦ㄥ悓鍚嶆ā鏉匡紝鏄惁杩涜鏇挎崲?', "鎻愮ず", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning"
+ }).then(() => {
+ this.saveTemplateDia()
+ }).catch(() => {})
+ }else{
+ this.saveTemplateDia()
+ }
+ } else {
+ this.$message.error('璇峰~鍐欐ā鏉垮悕绉�')
+ }
+ },
+ saveTemplateDia(){
+ this.templateLoading = true;
this.$axios.post(this.$api.insOrder.addInsOrderTemplate, {
name: this.templateName,
thing: JSON.stringify({
@@ -2804,9 +2820,6 @@
this.selectInsOrderTemplate()
this.templateName = ''
})
- } else {
- this.$message.error('璇峰~鍐欐ā鏉垮悕绉�')
- }
},
// 鏌ヨ妯℃澘
selectInsOrderTemplateById(e) {
diff --git a/src/components/view/b1-inspection-order.vue b/src/components/view/b1-inspection-order.vue
index d320c71..79b0741 100644
--- a/src/components/view/b1-inspection-order.vue
+++ b/src/components/view/b1-inspection-order.vue
@@ -506,6 +506,12 @@
Add,
vueQr
},
+ props:{
+ param: {
+ type: Object,
+ default: () => {}
+ }
+ },
data() {
return {
deleteTilte:'鎾ら攢',
@@ -556,6 +562,7 @@
// order: ''
// }
},
+ init:false,
isIndex: true,
showSelect: true,
select: true,
@@ -825,6 +832,14 @@
this.checkDataList = []
this.isIndeterminate = true;
}
+ },
+ param(val){
+ if(val&&val.text){
+ this.componentData.entity.entrustCode = this.param.text
+ this.componentData.entity.state = 1;
+ this.tabIndex = 1;
+ this.refreshTable()
+ }
}
},
created() {
@@ -832,6 +847,14 @@
},
mounted() {
this.entityCopy = this.HaveJson(this.componentData.entity)
+ if(this.param&&this.param.text){
+ this.componentData.entity.entrustCode = this.param.text
+ this.componentData.entity.state = 1;
+ this.tabIndex = 1;
+ this.refreshTable()
+ }else{
+ this.refreshTable()
+ }
this.getPower()
this.getUserMenu()
this.getAuthorizedPerson()
diff --git a/src/components/view/index-index.vue b/src/components/view/index-index.vue
index 138696b..5f9be9f 100644
--- a/src/components/view/index-index.vue
+++ b/src/components/view/index-index.vue
@@ -212,6 +212,7 @@
border-radius: 16px;
overflow: hidden;
margin-bottom: 8px;
+ cursor: pointer;
}
.body-item.color0{
background: #70A090;
@@ -266,6 +267,9 @@
background: #3A7BFA !important;
color: #fff !important;
}
+ >>>.el-tag--dark{
+ border: 0;
+ }
</style>
<template>
@@ -288,10 +292,19 @@
<el-tag style="margin-top: 6px;" size="small">{{workList[index].length}} 鏉�</el-tag>
</div>
<div class="left-item-body">
- <div class="body-item" v-for="(m,i) in workList[index]" :key="i" :class="{color0:m.type==0,color1:m.type==1,color2:m.type==2}">
+ <div class="body-item" v-for="(m,i) in workList[index]" :key="i" :class="{color0:m.type==0,color1:m.type==1,color2:m.type==2}" @click="goAddList(m)">
<div>
- <span style="font-size: 12px;margin-bottom: 17px;">{{ m.text }}</span>
- <span style="display: inline-block;height: 24px;width: 24px;border-radius: 50%;line-height: 24px;text-align: center;background: #C0C4CC;color: #fff;">{{ m.name.charAt(0) }}</span>
+ <span style="font-size: 12px;margin-bottom: 8px;">{{ m.text }}</span>
+ <div class="tags" style="display: flex;align-items: end;flex-wrap: wrap;margin-bottom: 8px;">
+ <el-tag
+ v-for="(item,index) in m.sample.split(',')"
+ :key="index"
+ :color="m.type==0?'#70A090':(m.type==1?'#EBD476':'#FF3838')"
+ effect="dark" size="mini" style="margin: 2px;">
+ {{ item }}
+ </el-tag>
+ </div>
+ <span style="display: inline-block;height: 22px;width: 70px;border-radius: 10px;line-height: 22px;text-align: center;background: #C0C4CC;color: #fff;font-size: 14px;">{{ m.name }}</span>
</div>
</div>
</div>
@@ -733,18 +746,31 @@
})
},
goNoticeDetail(row){
- this.$axios.put(this.$api.informationNotification.triggerModificationStatusToRead+'/'+row.id).then(res => {
- row.num = Math.random(100);
+ this.$axios.put(this.$api.informationNotification.triggerModificationStatusToRead+'/'+row.id).then(res => {
+ row.num = Math.random(100);
+ this.$bus.$emit("change", JSON.stringify(row));
+ this.$parent.addTab({
+ v: "娑堟伅璇︽儏",
+ i: "el-icon-s-tools",
+ u: "notice-detail",
+ k:35,
+ p: "abcd"
+ },29);
+ })
+ },
+ goAddList(row){
this.$bus.$emit("change", JSON.stringify(row));
- this.$parent.addTab({
- v: "娑堟伅璇︽儏",
- i: "el-icon-s-tools",
- u: "notice-detail",
- k:35,
- p: "abcd"
- },29);
- })
- },
+ this.$parent.addTab({
+ v: "妫�楠屼笅鍗�",
+ i: "font icon-erjidaohang",
+ u: "b1-inspection-order",
+ k:3,
+ p: "selectInsOrderParameter",
+ param:{
+ text:row.text
+ }
+ },1);
+ }
},
deactivated(){
this.timer&&clearInterval(this.timer)
diff --git a/src/main.js b/src/main.js
index b6fd273..afa39b8 100644
--- a/src/main.js
+++ b/src/main.js
@@ -21,11 +21,11 @@
//鏈湴
// Vue.prototype.LOCATIONVUE = "http://127.0.0.1:80";
// const javaApi = 'http://127.0.0.1:8001';
-// const javaApi = 'http://172.20.10.5:8001';
+const javaApi = 'http://172.20.10.5:8001';
// //閫氫俊娴嬭瘯搴�
// Vue.prototype.LOCATIONVUE = "http://10.1.13.77:8080";
-const javaApi = 'http://10.1.13.77:8001';
+// const javaApi = 'http://10.1.13.77:8001';
// 閫氫俊姝e紡搴�
// Vue.prototype.LOCATIONVUE = "https://ztwxlims.ztt.cn:7443";
diff --git a/src/view/index.vue b/src/view/index.vue
index dff6f97..5a8417f 100644
--- a/src/view/index.vue
+++ b/src/view/index.vue
@@ -348,7 +348,7 @@
</div>
<div class="component_view">
<component class="com_index" v-for="(com, index) in tabs" :is="com.u" :key="com.k" v-show="com.k == tabActive"
- :ref="`com-${com.k}`">
+ :ref="`com-${com.k}`" :param="param">
</component>
</div>
</div>
@@ -432,7 +432,8 @@
query:{},
newMsg:false,
timer:null,
- menuId: 0
+ menuId: 0,
+ param:null,
};
},
created() {
@@ -499,6 +500,12 @@
if (ob.u == "") ob.u = "nullFace"
this.tabs.push(ob);
}
+ if(ob.param){
+ this.param = this.HaveJson(ob.param)
+ this.param.textNum = Math.random(100)
+ }else{
+ this.param = null
+ }
this.$refs['popoverName'].forEach(a=>{
a.doClose()
})
--
Gitblit v1.9.3