From c0bc2331e9abb2ae003c8dc0ab4524d6101493a1 Mon Sep 17 00:00:00 2001
From: 王震 <10952869+daywangzhen@user.noreply.gitee.com>
Date: 星期一, 25 九月 2023 09:12:51 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
src/components/view/self-inspection.vue | 121 +++++++++++++++++++++++++++------------
1 files changed, 83 insertions(+), 38 deletions(-)
diff --git a/src/components/view/self-inspection.vue b/src/components/view/self-inspection.vue
index e52bfac..39c236d 100644
--- a/src/components/view/self-inspection.vue
+++ b/src/components/view/self-inspection.vue
@@ -113,7 +113,6 @@
<el-col :span="12" style="line-height: 32px;">鑷椤圭洰缁存姢</el-col>
<el-col :span="12" style="text-align: right;">
<el-button type="primary" icon="el-icon-plus" style="background: #004EA2;" @click="addend">鏂板</el-button>
- <!-- <el-button icon="el-icon-edit-outline" @click="modify">淇敼</el-button> -->
<el-button icon="el-icon-delete" @click="dels">鍒犻櫎</el-button>
</el-col>
</el-row>
@@ -121,35 +120,19 @@
<div class="choose">
<span>绫诲瀷锛�</span>
<el-select v-model="search.type" size="small" @change="TYpe" placeholder="璇烽�夋嫨" style="width: 224px;margin-right: 30px;">
- <el-option label="姗¤兌杩炴帴鍣�" :value="0"></el-option>
- <el-option label="閲戝睘杩炴帴鍣�" :value="1"></el-option>
- <el-option label="婀挎彃鎷旂數杩炴帴鍣�" :value="2"></el-option>
- <el-option label="鍒嗘敮缁勪欢" :value="3"></el-option>
+ <el-option v-for="(a, ai) in bigType" :key="ai" :value="a">
+ </el-option>
</el-select>
- <!-- <span>宸ュ簭锛�</span> -->
- <!-- <el-select v-model="search.name" size="small" placeholder="璇烽�夋嫨" style="width: 224px;margin-right: 30px;">
- <el-option v-for="(a, ai) in process" key="ai" :label="a.name" :value="a.id"></el-option>
- </el-select>
- <span>椤圭洰锛�</span>
- <el-select v-model="search.name" size="small" placeholder="璇烽�夋嫨" style="width: 224px;margin-right: 30px;">
- <el-option v-for="(a, ai) in product" key="ai" :label="a.name" :value="a.id"></el-option>
- </el-select>
- <el-button size="mini" @click="clean()"><span>閲� 缃�</span></el-button>
- <el-button size="mini" type="primary" style="background: #004EA2;"><span>鏌�
- 璇�</span></el-button> -->
</div>
<div class="thing">
<div class="left">
<el-input v-model="search.technology" suffix-icon="el-icon-search" placeholder="璇疯緭鍏ユ悳绱㈠唴瀹�" size="small" clearable @input="(val)=>$refs.tree.filter(val)"></el-input>
- <el-tree :data="list" ref="tree" :props="{children: 'children',label: 'name'}" node-key="id" default-expand-all
+ <el-tree :data="list" ref="tree" :props="{children: 'children',label: 'name'}" node-key="name" default-expand-all
@node-click="handleNodeClick" highlight-current @node-expand="nodeOpen" @node-collapse="nodeClose" :filter-node-method="filterNode"
:key="upIndex">
<div class="custom-tree-node" slot-scope="{ node, data }">
<span><i :class="`node_i ${data.code != '[2]'?'el-icon-folder-opened':'el-icon-tickets'}`"></i>
{{data.code}} {{ data.name }}</span>
- <el-button type="text" size="mini" @click.stop="remove(node, data)">
- <i class="el-icon-delete"></i>
- </el-button>
</div>
</el-tree>
</div>
@@ -216,11 +199,8 @@
<el-form ref="form" :model="form" label-width="80px">
<el-form-item label="绫诲瀷">
<template>
- <el-select v-model="form.value" placeholder="璇烽�夋嫨绫诲瀷" style="width: 480px;">
- <el-option label="姗¤兌杩炴帴鍣�" :value="0"></el-option>
- <el-option label="閲戝睘杩炴帴鍣�" :value="1"></el-option>
- <el-option label="婀挎彃鎷旂數杩炴帴鍣�" :value="2"></el-option>
- <el-option label="鍒嗘敮缁勪欢" :value="3"></el-option>
+ <el-select v-model="form.value" placeholder="璇烽�夋嫨" @change="edittype" style="width: 100%;">
+ <el-option v-for="(a, ai) in bigType" :key="ai" :value="a"></el-option>
</el-select>
</template>
</el-form-item>
@@ -228,7 +208,7 @@
<template>
<el-select v-model="form.procedure"
@change="workevent"
- placeholder="璇烽�夋嫨绫诲瀷" style="width: 480px;">
+ placeholder="璇烽�夋嫨" style="width: 100%;">
<el-option
v-for="item in process"
:key="item.name"
@@ -242,7 +222,7 @@
<el-col :span="10">
<el-form-item label="宸ヨ壓鍚嶇О">
<template>
- <el-select v-model="form.name" placeholder="璇烽�夋嫨绫诲瀷" style="width: 180px;">
+ <el-select v-model="form.name" placeholder="璇烽�夋嫨" style="width: 180px;">
<el-option
v-for="item in craftapi"
:key="item.id"
@@ -253,9 +233,9 @@
</template>
</el-form-item>
</el-col>
- <el-col :span="10" :offset="3">
+ <el-col :span="10" :offset="4">
<el-form-item label="鑷椤圭洰">
- <el-input v-model="form.project" style="width: 180px;"></el-input>
+ <el-input v-model="form.project" style="width: 100%;"></el-input>
</el-form-item>
</el-col>
</el-row>
@@ -265,9 +245,9 @@
<el-input v-model="form.unit" style="width: 180px;"></el-input>
</el-form-item>
</el-col>
- <el-col :span="10" :offset="3">
+ <el-col :span="10" :offset="4">
<el-form-item label="鏍囧噯鍊�">
- <el-input v-model="form.standard" style="width: 180px;"></el-input>
+ <el-input v-model="form.standard" style="width: 100%;"></el-input>
</el-form-item>
</el-col>
</el-row>
@@ -382,8 +362,9 @@
product: [],
list: [],
checkTreeNode: {
- id:2,
+ id:'',
},
+ bigType: [],
tableData: [],
upIndex: 0,
selects: [],
@@ -402,10 +383,36 @@
}
},
mounted() {
- this.selectAllleft()
- this.selectAllSelf()
+ this.chooseType()
+
},
methods: {
+ chooseType() {
+ this.$axios.get(this.$api.url.chooseType).then(res => {
+ this.bigType = res.data
+ this.typeselect = res.data[0]
+ console.log(this.typeselect);
+ this.search.type = res.data[0]
+ this.selectAllleft()
+ this.selectAllSelf()
+ })
+ },
+ selectDataList() {
+ this.list.forEach(a => {
+ a.code = '[1]'
+ if (a.children != undefined) {
+ a.children.forEach(b => {
+ b.code = '[2]'
+ if (b.children != undefined) {
+ b.children.forEach(c => {
+ c.code = '[3]'
+ })
+ }
+ })
+ }
+ })
+ this.upIndex++
+ },
//鍒犻櫎
delSelfcheck() {
console.log(this.upData.id);
@@ -426,13 +433,21 @@
ids:this.delete
})
},
+ //缂栬緫
+ writeRecordById() {
-
-
+ },
//鏂板
add() {
- this.dialogVisible = false
+ if (this.form.standard[0] !== "<" && this.form.standard[0] !== "<=" && this.form.standard[0] !== ">"){
+ this.$message({
+ message: '杈撳叆鐨勭涓�涓瓧绗﹀繀椤绘槸 '<' 鎴� '<='锛�',
+ type: 'warning'
+ });
+ return;
+ }
this.addSelfcheck()
+ this.dialogVisible = false
},
addSelfcheck() {
this.$axios.post(this.$api.url.addSelfcheck,{
@@ -473,6 +488,11 @@
console.log(this.typeselect);
this.selectAllleft()
},
+ edittype(val) {
+ // this.typeselect = ''
+ this.typeselect = val
+ this.chooseTechFath()
+ },
//涓讳綋宸�
selectAllleft() {
this.$axios.get(this.$api.url.selectAllleft,{
@@ -480,9 +500,34 @@
}).then(res => {
this.list = res.data;
console.log(this.list);
+ this.selectDataList()
+ this.$nextTick(() => {
+ this.$refs.tree.setCurrentKey(this.list[0].children[0].name) // 榛樿閫変腑鑺傜偣绗竴涓�
+ })
+ console.log("===========");
+ console.log(this.list);
+ let one=this.list.filter(item=>{
+ return item.children.length>0
+ })[0]
+ console.log(one);
+ let id =one.children[0].id
+ this.checkTreeNode.id = id
+ console.log(id);
+ this.selectAllSelfStart(id)
+ this.selectDataList();
+ console.log("===========");
})
},
- //selectAllSelf checkTreeNode
+ //榛樿
+ selectAllSelfStart(id) {
+ this.$axios.get(this.$api.url.selectAllSelf,{
+ params:{id:id}
+ }).then(res => {
+ this.tableData = res.data;
+ console.log(this.tableData);
+ })
+ },
+ //鍙�
selectAllSelf() {
this.$axios.get(this.$api.url.selectAllSelf,{
params:{id:this.checkTreeNode.id}
--
Gitblit v1.9.3