Commit 879cc6d0 authored by zhang's avatar zhang

feat: (首页/信息管理/检验内容库)新增章节选择功能,更新页面样式

parent 2dc0a080
...@@ -159,12 +159,10 @@ export default { ...@@ -159,12 +159,10 @@ export default {
this.$store.dispatch('standard/setStandardList', this.queryParams.name) this.$store.dispatch('standard/setStandardList', this.queryParams.name)
}, },
selectStandard(value) { selectStandard(value) {
console.log(value) this.$store.dispatch('standard/setStandard', '')
this.$store.dispatch('standard/setStandard', value)
this.loadData() this.loadData()
}, },
handleNodeClick(node,data){ handleNodeClick(node,data){
console.log(data)
if(data.isCurrent){ if(data.isCurrent){
node.isCurrent = true node.isCurrent = true
} }
...@@ -174,7 +172,7 @@ export default { ...@@ -174,7 +172,7 @@ export default {
let standard = { let standard = {
id:node.id, id:node.id,
name:node.label, name:node.label,
type:node.type || 'system', type:node.type,
chapter: data.level == 1 ? ' ' : node.label chapter: data.level == 1 ? ' ' : node.label
} }
...@@ -367,6 +365,7 @@ export default { ...@@ -367,6 +365,7 @@ export default {
} }
::v-deep .el-tree-node__content { // 节点内容样式设置 ::v-deep .el-tree-node__content { // 节点内容样式设置
width: 100%; width: 100%;
height: 30px;
//display: flex; //display: flex;
//justify-content: space-between; //justify-content: space-between;
margin-top: 5px; margin-top: 5px;
...@@ -384,10 +383,12 @@ export default { ...@@ -384,10 +383,12 @@ export default {
transition: all 0.5s; transition: all 0.5s;
} }
::v-deep .el-tree-node__children .el-tree-node__content{// 子节点内容样式设置 ::v-deep .el-tree-node__children .el-tree-node__content{// 子节点内容样式设置
height: 25px; width: 200px;
background-color: white; background-color: white;
} }
::v-deep .el-tree-node__children .el-tree-node__content:hover{// 子节点内容样式设置
background-color: #f0f7ff;
}
::v-deep .el-tree-node__children .el-tree-node__children .el-tree-node__content .el-tree-node__expand-icon{ ::v-deep .el-tree-node__children .el-tree-node__children .el-tree-node__content .el-tree-node__expand-icon{
opacity: 0; opacity: 0;
} }
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<!--章节选择:select--> <!--章节选择:select-->
<el-form-item prop="status"> <el-form-item prop="status">
<el-input <el-input
v-model="queryParams.chapter" v-model="searchQueryParams.chapter"
placeholder="请输入章节" placeholder="请输入章节"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<!--标准要求输入:input--> <!--标准要求输入:input-->
<el-form-item prop="status"> <el-form-item prop="status">
<el-input <el-input
v-model="queryParams.text" v-model="searchQueryParams.text"
placeholder="请输入标准要求" placeholder="请输入标准要求"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
...@@ -172,7 +172,7 @@ ...@@ -172,7 +172,7 @@
</span> </span>
</span> </span>
</el-tree> </el-tree>
<!-- <pagination <pagination
style="height: 50px;" style="height: 50px;"
v-show="total > 0" v-show="total > 0"
:total="total" :total="total"
...@@ -181,7 +181,7 @@ ...@@ -181,7 +181,7 @@
:limit.sync="queryParams.pageSize" :limit.sync="queryParams.pageSize"
@pagination="loadData" @pagination="loadData"
> >
</pagination> --> </pagination>
<!-- 详情弹窗 <!-- 详情弹窗
ref: 绑定detailModel组件 ref: 绑定detailModel组件
...@@ -258,6 +258,7 @@ export default { ...@@ -258,6 +258,7 @@ export default {
} }
}, },
listNewUrl:'/review/standard/listNew',
showSearch: true, // 是否显示搜索框 showSearch: true, // 是否显示搜索框
tableData: [], // 储存最终处理后的数据信息 tableData: [], // 储存最终处理后的数据信息
queryParams: { // 条件参数,储存用于搜索的条件 queryParams: { // 条件参数,储存用于搜索的条件
...@@ -265,11 +266,17 @@ export default { ...@@ -265,11 +266,17 @@ export default {
text: '', text: '',
name:'', name:'',
standardNo:'', standardNo:'',
pageNum:1,
pageSize:10,
standardId: this.$store.getters.standard, standardId: this.$store.getters.standard,
type:this.$store.getters.standard_type || 'system' type:this.$store.getters.standard_type
},
searchQueryParams:{
chapter:'',
text:''
}, },
queryParams_final:{},
detailModelManager:{ // 传递参数,储存传递给弹窗的信息 detailModelManager:{ // 传递参数,储存传递给弹窗的信息
dialogVisible:false, // 弹窗是否显现 dialogVisible:false, // 弹窗是否显现
refreshList: false, refreshList: false,
source: { // 数据源 source: { // 数据源
...@@ -363,8 +370,6 @@ export default { ...@@ -363,8 +370,6 @@ export default {
console.log(data); console.log(data);
}, },
async loadData() { async loadData() {
console.log(this.queryParams) // 获取源数据并进行处理处理
if (this.queryParams.standardId !== '') {
this.loading = true this.loading = true
await request({ await request({
url: this.listUrl, url: this.listUrl,
...@@ -421,11 +426,13 @@ export default { ...@@ -421,11 +426,13 @@ export default {
await listInspection({id:tempDataItem.id}).then(res=>{// 根据tempDataItem的id搜索详细数据 await listInspection({id:tempDataItem.id}).then(res=>{// 根据tempDataItem的id搜索详细数据
if(res.code == 200){ if(res.code == 200){
let temp = res.data let temp = res.data
console.log(temp)
forEach(temp,(pointItem)=>{ forEach(temp,(pointItem)=>{
forEach(pointItem,(pointDeepItem)=>{ forEach(pointItem,(pointDeepItem)=>{
pointDeepItem.label = '审查要点' pointDeepItem.label = '审查要点'
pointDeepItem.content = pointDeepItem.text pointDeepItem.content = pointDeepItem.text
pointDeepItem.quireId = tempDataItem.id pointDeepItem.quireId = tempDataItem.id
pointDeepItem.type = tempDataItem.type
obj.children.push(pointDeepItem) obj.children.push(pointDeepItem)
}) })
}) })
...@@ -451,18 +458,29 @@ export default { ...@@ -451,18 +458,29 @@ export default {
} }
this.loading = false this.loading = false
}) })
}
}, },
reset() { reset() {
this.queryParams.chapter = '' this.queryParams.chapter = ''
this.queryParams.text = '' this.queryParams.standard = ''
this.queryParams.testMethod = ''
this.queryParams.name = ''
this.queryParams.standardNo = ''
this.queryParams.type = ''
this.loadData()
},
handleQuery(){
console.log(this.searchQueryParams)
this.queryParams.chapter = this.searchQueryParams.chapter
this.queryParams.standard = ''
this.queryParams.testMethod = '' this.queryParams.testMethod = ''
this.queryParams.name = '' this.queryParams.name = ''
this.queryParams.standardNo = '' this.queryParams.standardNo = ''
this.queryParams.type = ''
this.queryParams.text = this.searchQueryParams.text
this.loadData() this.loadData()
}, },
handleUpdate(node) { // 查看检验内容 data:标准信息 node:审查信息 handleUpdate(node) { // 查看检验内容 data:标准信息 node:审查信息
console.log(node)
let data = this.modelData.find((item)=>item.id === node.quireId) // 获取当前审查信息 let data = this.modelData.find((item)=>item.id === node.quireId) // 获取当前审查信息
let standard = this.standardList.find((item)=>item.id == this.standard)// 获取当前审查信息的standard信息 let standard = this.standardList.find((item)=>item.id == this.standard)// 获取当前审查信息的standard信息
if(standard){ if(standard){
...@@ -470,7 +488,13 @@ export default { ...@@ -470,7 +488,13 @@ export default {
}else{ }else{
data.standard = '--' data.standard = '--'
} }
data.type =this.reviewTypeList.find((item)=>item.value == this.queryParams.type).label // 获取当前审查信息的类型 let review = this.reviewTypeList.find((item)=>item.value == node.type)
if(review){
data.type = review.label
}else{
data.type = ''
}
// 获取当前审查信息的类型
node.content = node.content.trim() // 去空格 node.content = node.content.trim() // 去空格
this.detailModelManager.source.standard = data // 赋值传递弹窗 this.detailModelManager.source.standard = data // 赋值传递弹窗
this.detailModelManager.source.judge = node this.detailModelManager.source.judge = node
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment