From 0e16b1bf195ee9ac5dcc8ec25e4b01597ebc4d59 Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期二, 16 四月 2024 09:11:23 +0800
Subject: [PATCH] Merge branch 'master' of http://114.132.189.42:9002/r/center-lims-before into master

---
 src/components/view/a7-standard-method.vue |  311 ++++++++++++++++++++++++---------------------------
 1 files changed, 148 insertions(+), 163 deletions(-)

diff --git a/src/components/view/a7-standard-method.vue b/src/components/view/a7-standard-method.vue
index 2e33e47..5176e02 100644
--- a/src/components/view/a7-standard-method.vue
+++ b/src/components/view/a7-standard-method.vue
@@ -1,175 +1,160 @@
 <style scoped>
-	.title {
-		height: 60px;
-		line-height: 60px;
-	}
+  .title {
+    height: 60px;
+    line-height: 60px;
+  }
 
-	.search {
-		background-color: #fff;
-		height: 80px;
-		display: flex;
-		align-items: center;
-	}
+  .search {
+    background-color: #fff;
+    height: 80px;
+    display: flex;
+    align-items: center;
+  }
 
-	.search_thing {
-		width: 350px;
-		display: flex;
-		align-items: center;
-	}
+  .search_thing {
+    width: 350px;
+    display: flex;
+    align-items: center;
+  }
 
-	.search_label {
-		width: 110px;
-		font-size: 14px;
-		text-align: right;
-	}
+  .search_label {
+    width: 110px;
+    font-size: 14px;
+    text-align: right;
+  }
 
-	.search_input {
-		width: calc(100% - 110px);
-	}
+  .search_input {
+    width: calc(100% - 110px);
+  }
 
-	.table {
-		margin-top: 10px;
-		background-color: #fff;
-		width: calc(100% - 40px);
-		height: calc(100% - 60px - 80px - 10px - 40px);
-		padding: 20px;
-	}
+  .table {
+    margin-top: 10px;
+    background-color: #fff;
+    width: calc(100% - 40px);
+    height: calc(100% - 60px - 80px - 10px - 40px);
+    padding: 20px;
+  }
 </style>
 
 <template>
-	<div class="standard_method">
-		<div>
-			<el-row class="title">
-				<el-col :span="12" style="padding-left: 20px;">鏍囧噯鏂规硶</el-col>
-				<el-col :span="12" style="text-align: right;">
-					<el-button size="medium" type="primary" @click="openAdd" v-if="addPower">鏂板</el-button>
-				</el-col>
-			</el-row>
-		</div>
-		<div class="search">
-			<div class="search_thing">
-				<div class="search_label">鏍囧噯缂栧彿锛�</div>
-				<div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable
-						v-model="componentData.entity.code" @keyup.enter.native="refreshTable()"></el-input></div>
-			</div>
-			<div class="search_thing">
-				<div class="search_label">鏍囧噯鍚嶇О锛�</div>
-				<div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable
-						v-model="componentData.entity.name" @keyup.enter.native="refreshTable()"></el-input></div>
-			</div>
-			<div class="search_thing" style="padding-left: 30px;">
-				<el-button size="small" @click="refresh()">閲� 缃�</el-button>
-				<el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button>
-			</div>
-		</div>
-		<div class="table">
-			<ValueTable ref="ValueTable" :url="$api.standardMethod.selectStandardMethodList"
-			:delUrl="$api.standardMethod.delStandardMethod" :upUrl="$api.standardMethod.upStandardMethod" :componentData="componentData" :key="upIndex"/>
-		</div>
-	</div>
+  <div class="standard_method">
+    <div>
+      <el-row class="title">
+        <el-col :span="12" style="padding-left: 20px;">鏍囧噯鏂规硶</el-col>
+        <el-col :span="12" style="text-align: right;">
+          <el-button size="medium" type="primary" @click="openAdd" v-if="addPower">鏂板</el-button>
+        </el-col>
+      </el-row>
+    </div>
+    <div class="search">
+      <div class="search_thing">
+        <div class="search_label">鏍囧噯缂栧彿锛�</div>
+        <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="componentData.entity.code"
+            @keyup.enter.native="refreshTable()"></el-input></div>
+      </div>
+      <div class="search_thing">
+        <div class="search_label">鏍囧噯鍚嶇О锛�</div>
+        <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="componentData.entity.name"
+            @keyup.enter.native="refreshTable()"></el-input></div>
+      </div>
+      <div class="search_thing" style="padding-left: 30px;">
+        <el-button size="small" @click="refresh()">閲� 缃�</el-button>
+        <el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button>
+      </div>
+    </div>
+    <div class="table">
+      <ValueTable ref="ValueTable" :url="$api.standardMethod.selectStandardMethodList"
+        :delUrl="$api.standardMethod.delStandardMethod" :upUrl="$api.standardMethod.upStandardMethod"
+        :componentData="componentData" :key="upIndex" />
+    </div>
+  </div>
 </template>
 
 <script>
-	import ValueTable from '../tool/value-table.vue'
-	export default {
-		components: {
-			ValueTable
-		},
-		data() {
-			return {
-				componentData: {
-					entity: {
-						code: null,
-						name: null,
-						orderBy: {
-							field: 'id',
-							order: 'asc'
-						}
-					},
-					isIndex: true,
-					showSelect: false,
-					select: true,
-					do: [{
-						id: 'update',
-						font: '缂栬緫',
-						type: 'text',
-						method: 'doDiy',
-						field:['sampleType','createUserName','updateUserName','妫�楠屽璞�=structureTestObjectId']
-					},{
-						id: 'delete',
-						font: '鍒犻櫎',
-						type: 'text',
-						method: 'doDiy'
-					}],
-					tagField: {
-						structureTestObjectId:{select: []}
-					},
-					selectField: {
-						structureTestObjectId:{select: []}
-					},
-					requiredAdd:['code','name','structureTestObjectId'],
-					requiredUp:['code','name','structureTestObjectId']
-				},
-				entityCopy: {},
-				upIndex: 0,
-				addDia: false,
-				addPower: true
-			}
-		},
-		mounted() {
-			this.entityCopy = this.HaveJson(this.componentData.entity)
-			this.getPower()
-			this.selectTestObjectByName()
-		},
-		methods: {
-			refreshTable() {
-				this.$refs['ValueTable'].selectList()
-			},
-			refresh() {
-				this.componentData.entity = this.HaveJson(this.entityCopy)
-				this.upIndex++
-			},
-			// 鏉冮檺鍒嗛厤
-			getPower(){
-				let power = JSON.parse(sessionStorage.getItem('power'))
-				let up = false
-				let del = false
-				let add = false
-				for (var i = 0; i < power.length; i++) {
-					if(power[i].menuMethod=='addStandardMethod'){
-						add = true
-					}
-					if(power[i].menuMethod=='delStandardMethod'){
-						del = true
-					}
-					if(power[i].menuMethod=='upStandardMethod'){
-						up = true
-					}
-				}
-				if(!del){
-					this.componentData.do.splice(1, 1)
-				}
-				if(!up){
-					this.componentData.do.splice(0, 1)
-				}
-				this.addPower = add
-			},
-			openAdd(){
-				this.$refs.ValueTable.openAddDia(this.$api.standardMethod.addStandardMethod);
-			},
-			selectTestObjectByName() {
-				this.$axios.get(this.$api.capacityScope.selectTestObjectByName).then(res => {
-					let data = []
-					res.data.forEach(a => {
-						data.push({
-							label: a.specimenName,
-							value: a.id
-						})
-					})
-					this.componentData.selectField.structureTestObjectId.select = data
-					this.componentData.tagField.structureTestObjectId.select = data
-				})
-			},
-		}
-	}
-</script>
\ No newline at end of file
+  import ValueTable from '../tool/value-table.vue'
+  export default {
+    components: {
+      ValueTable
+    },
+    data() {
+      return {
+        componentData: {
+          entity: {
+            code: null,
+            name: null,
+            orderBy: {
+              field: 'id',
+              order: 'asc'
+            }
+          },
+          isIndex: true,
+          showSelect: false,
+          select: true,
+          do: [{
+            id: 'update',
+            font: '缂栬緫',
+            type: 'text',
+            method: 'doDiy',
+            field: ['sampleType', 'createUserName', 'updateUserName', '妫�楠屽璞�=structureTestObjectId']
+          }, {
+            id: 'delete',
+            font: '鍒犻櫎',
+            type: 'text',
+            method: 'doDiy'
+          }],
+          tagField: {
+            structureTestObjectId: {
+              select: []
+            },
+            isProduct: {
+              select: [{
+                value: 0,
+                type: 'info',
+                label: '鍚�'
+              }, {
+                value: 1,
+                label: '鏄�'
+              }]
+            }
+          },
+          selectField: {
+            structureTestObjectId: {
+              select: []
+            },
+            isProduct: {
+              select: [{
+                value: 0,
+                label: '鍚�'
+              }, {
+                value: 1,
+                label: '鏄�'
+              }]
+            }
+          },
+          requiredAdd: ['code', 'name', 'structureTestObjectId', 'isProduct'],
+          requiredUp: ['code', 'name', 'structureTestObjectId', 'isProduct']
+        },
+        entityCopy: {},
+        upIndex: 0,
+        addDia: false,
+        addPower: true
+      }
+    },
+    mounted() {
+      this.entityCopy = this.HaveJson(this.componentData.entity)
+      this.getPower()
+      this.selectTestObjectByName()
+    },
+    methods: {
+      refreshTable() {
+        this.$refs['ValueTable'].selectList()
+      },
+      refresh() {
+        this.componentData.entity = this.HaveJson(this.entityCopy)
+        this.upIndex++
+      },
+      // 鏉冮檺鍒嗛厤
+      getPower() {
+        let power = JSON.parse(sessionStorage.getItem('power'))
+        let up = false
+        let del = fa

--
Gitblit v1.9.3