Merge remote-tracking branch 'origin/master'

# Conflicts:
#	ruoyi-ui/src/views/benyi/dayflowstudy/index.vue
This commit is contained in:
sk1551 2020-06-23 08:21:49 +08:00
commit 39f78a24af

View File

@ -24,20 +24,37 @@
/> />
</div> </div>
</el-col> </el-col>
<div> <el-col :span="20" :xs="24">
<span>流程中所含任务</span> <el-card class="box-card">
</div> <div slot="header" class="clearfix">
<el-col :span="20" :xs="24" v-for="(item, index) in dayflowtaskList" :key="index" > <span>{{title}}</span>
<el-card :body-style="{ padding: '2px' }"> </div>
<div class="to-detail"> <div class="text item">
<el-tooltip effect="dark" :content="item.taskLable" placement="right"> 导言
<div> <br />
<p class="info-title">{{item.taskLable}}</p> <label v-html="content"></label>
</div> </div>
</el-tooltip> <div class="text item">
<p class="info-title info-title-name">该任务所含标准个数:{{ item.standardCount }}</p> 目的
<div class="bottom"> <br />
<time class="time">{{ parseTime(item.createtime) }}</time> <label v-html="note"></label>
</div>
<div v-for="(item, index) in dayflowtaskList" :key="index" class="text item">
{{item.taskLable}}
<br />
{{item.taskContent}}
<div
v-for="(item_standard, index_standard) in (dayflowstandardList.filter(p=>p.taskCode==item.code))"
:key="index_standard"
class="text item"
>
{{item_standard.standardTitle}}
<br />解读
<div
v-for="(item_unscramble, index_unscramble) in (dayflowunscrambleList.filter(p=>p.standardId==item_standard.id))"
:key="index_unscramble"
class="text item"
>{{item_unscramble.sort}}){{item_unscramble.content}}</div>
</div> </div>
</div> </div>
</el-card> </el-card>
@ -47,29 +64,31 @@
</template> </template>
<script> <script>
import { listDetail, getDetail } from "@/api/benyi/dayflow/dayflowmanger";
import { listDayflowtask } from "@/api/benyi/dayflow/dayflowtask"; import { listDayflowtask } from "@/api/benyi/dayflow/dayflowtask";
import { listStandard } from "@/api/benyi/dayflow/biaozhun/standard" import { listStandard } from "@/api/benyi/dayflow/biaozhun/standard";
import { treeselect } from "@/api/benyi/dayflow/dayflowmanger"; import { listUnscramble } from "@/api/benyi/dayflow/unscramble";
import Treeselect from "@riophae/vue-treeselect"; import { treeselect, getDetail } from "@/api/benyi/dayflow/dayflowmanger";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default { export default {
name: "Detail", name: "Detail",
data() { data() {
return { return {
//
loading: true,
// //
name: undefined, name: undefined,
// id // id
id: undefined, id: undefined,
//
title: "一日流程",
//
content: undefined,
//
note: undefined,
// id // id
dayflowtaskList: [], dayflowtaskList: [],
// //
dayflowstandardList: [], dayflowstandardList: [],
//
dayflowunscrambleList: [],
// //
treeOptions: [], treeOptions: [],
// //
@ -79,8 +98,7 @@ export default {
}, },
// //
queryParams: { queryParams: {
detailId: undefined, detailId: undefined
taskCode: undefined,
} }
}; };
}, },
@ -92,6 +110,7 @@ export default {
}, },
created() { created() {
this.getTreeselect(); this.getTreeselect();
this.getChildNodeList();
}, },
methods: { methods: {
/** 查询部门下拉树结构 */ /** 查询部门下拉树结构 */
@ -100,6 +119,14 @@ export default {
this.treeOptions = response.data; this.treeOptions = response.data;
}); });
}, },
getChildNodeList() {
listStandard(null).then(response => {
this.dayflowstandardList = response.rows;
});
listUnscramble(null).then(response => {
this.dayflowunscrambleList = response.rows;
});
},
// //
filterNode(value, data) { filterNode(value, data) {
if (!value) return true; if (!value) return true;
@ -108,60 +135,39 @@ export default {
// //
handleNodeClick(data) { handleNodeClick(data) {
this.queryParams.detailId = data.id; this.queryParams.detailId = data.id;
this.title = data.label;
this.getTaskList(); this.getTaskList();
console.log(this.dayflowtaskList); // console.log(this.dayflowtaskList[date.id])
console.log(this.dayflowtaskList[0].value.code); // this.getStandardList();
//this.getStandardList();
}, },
/** 查询一日流程任务列表 */ /** 查询一日流程任务列表 */
getTaskList() { getTaskList() {
this.loading = true;
listDayflowtask(this.queryParams).then(response => { listDayflowtask(this.queryParams).then(response => {
this.dayflowtaskList = response.rows; this.dayflowtaskList = response.rows;
// console.log(this.dayflowtaskList);
this.loading = false;
}); });
}, getDetail(this.queryParams.detailId).then(response => {
/** 查询任务标准列表 */ this.content = response.data.content;
// getStandardList() { this.note = response.data.note;
// this.loading = true; });
// listStandard(this.queryParams).then(response => { }
// this.dayflowstandardList = response.rows;
// console.log(this.dayflowstandardList);
// this.loading = false;
// });
// },
} }
}; };
</script> </script>
<style> <style>
.time { .text {
line-height: 12px; font-size: 14px;
font-size: 12px;
color: #999;
} }
.bottom { .item {
margin-top: 13px; margin-bottom: 18px;
display: flex;
justify-content: space-between;
align-items: center;
} }
.to-detail { .clearfix:before,
/*cursor: pointer;*/ .clearfix:after {
padding: 14px; display: table;
content: "";
} }
.clearfix:after {
.info-title { clear: both;
width: 100%; /*根据自己项目进行定义宽度*/
overflow: hidden; /*设置超出的部分进行影藏*/
text-overflow: ellipsis; /*设置超出部分使用省略号*/
white-space: nowrap; /*设置为单行*/
}
.info-title-name {
font-size: 12px;
} }
</style> </style>