Commit 08448d2b by wenyi.chen

v1开发完成

parent 6d6c4251
......@@ -29,11 +29,11 @@
ref="multipleTableRef" @selection-change="tableSelection">
<el-table-column type="selection" width="55" :reserve-selection="true" />
<el-table-column label="序号" type="index" width="100" show-overflow-tooltip align="center"></el-table-column>
<el-table-column prop="taskPackageInfo.name" label="任务名称" show-overflow-tooltip align="center">
<el-table-column prop="taskPackageInfo.name" width="300" label="任务名称" show-overflow-tooltip align="center">
</el-table-column>
<el-table-column prop="normInfo.name" label="子任务名称" show-overflow-tooltip align="center">
<el-table-column prop="normInfo.name" width="300" label="子任务名称" show-overflow-tooltip align="center">
</el-table-column>
<el-table-column prop="name" label="指标名称" show-overflow-tooltip align="center">
<el-table-column prop="name" label="指标名称" width="300" show-overflow-tooltip align="center">
</el-table-column>
<el-table-column prop="price" label="单价" show-overflow-tooltip align="center">
</el-table-column>
......@@ -44,15 +44,15 @@
<span style="color: #F56C6C;" v-if="scope.row.sort=='3'"></span>
</template>
</el-table-column>
<el-table-column prop="level" label="难度等级" show-overflow-tooltip align="center"></el-table-column>
<el-table-column prop="level" label="难度等级" width="100" show-overflow-tooltip align="center"></el-table-column>
<el-table-column prop="refer" label="参考信源" show-overflow-tooltip align="center">
<el-table-column prop="refer" label="参考信源" width="300" show-overflow-tooltip align="center">
<template #default="scope">
<el-link type="danger" v-if="checkUrl(scope.row.refer)" :href="scope.row.refer" target ="_blank">点击查看</el-link>
<span v-else>{{scope.row.refer}}</span>
</template>
</el-table-column>
<el-table-column prop="guide" label="参考指南" show-overflow-tooltip align="center">
<el-table-column prop="guide" label="参考指南" width="300" show-overflow-tooltip align="center">
<template #default="scope">
<el-link type="danger" v-if="checkUrl(scope.row.guide)" :href="scope.row.guide" target ="_blank">点击查看</el-link>
<span v-else>{{scope.row.guide}}</span>
......
......@@ -14,7 +14,7 @@
<el-table :data="state.tableData" border style="width: 100%;" :height="state.tableHeight"
ref="multipleTableRef">
<el-table-column :cell-style="{ 'white-space': 'normal' }" v-for="column in state.columns" :key="column.prop" :label="column.label" :prop="column.prop" :width="column.width" show-overflow-tooltip align="center">
<template #default="scope"><div v-html="formatOutputCustom(scope.row[column.prop],scope.row.id)"></div>
<template #default="scope"><div v-html="formatOutputCustom(scope.row[column.prop],scope.row.id,column.label,scope.row)"></div>
<!-- <span style="color:#409EFF" v-if="column.label =='用户名称'">{{scope.row[column.prop]}}</span>
<span style="color:#909399" v-else-if="column.label =='领取状态' && scope.row[column.prop] ==1">已领取</span>
<span style="color:#E6A23C" v-else-if="column.label =='完成状态' && scope.row[column.prop] ==0">未完成</span>
......@@ -55,6 +55,7 @@
id:'',
page: 1,
limit: 10,
shouw:1,
},
total: 0,
tableData:[],
......@@ -112,6 +113,7 @@
'norm_info.guide': addItem.guide?addItem.guide:'/',
'norm_list_info.name': item.norm_list_info.name,
'fileListPdf': item.fileListPdf?item.fileListPdf:'/',
'fileName': item.file_name,
}
state.tableData.push(list);
item.norm_list_extend.forEach(function(items, indexs, arrs) {
......@@ -146,7 +148,6 @@
if(item.status == 4){
list['status'] ='已通过、已结算'
}
console.log(item)
if(item.not_collectible==null){
list['not_collectible'] ='待采集'
list['not_collectible_remarks'] ='/'
......@@ -191,10 +192,39 @@
* 自定义内容格式化输出
* @param {*} vlaue
*/
const formatOutputCustom = (value,id) =>{
const formatOutputCustom = (value,id,title,data) =>{
if(value&&typeof value =="string"){
let arr = value.split(',');
let txt = '';
console.log(title)
if(title == '上传文件'){
// 取出文件原名称
let file_name = [];
console.log(data)
if(data.fileName){
file_name = data.fileName.split(',');
}
arr.map((item, index) => {
let str = checkUrl(item);
if(str){
let name = '';
if(file_name.length==arr.length){
name = file_name[index]
}else{
name = '文件_'+(index+1)
}
if(index==0){
txt+= "<a style='color:#409EFF;cursor:pointer' href='"+item+"' target ='_blank'>"+name+"</a>";
}else if(index>4){
txt= "<div style='color:#409EFF;cursor:pointer' onclick='handleClick("+id+")'>查看所有文件</div>";
}else{
txt+= "<br><br><a style='color:#409EFF;cursor:pointer' href='"+item+"' target ='_blank'>"+name+"</a>";
}
}else{
txt+= item;
}
})
}else{
arr.map((item, index) => {
let str = checkUrl(item);
if(str){
......@@ -209,6 +239,7 @@
txt+= item;
}
})
}
return txt;
}else{
return value;
......
......@@ -13,8 +13,12 @@
<el-card shadow="hover">
<el-table :data="state.tableData" border style="width: 100%;" :height="state.tableHeight"
ref="multipleTableRef">
<el-table-column :cell-style="{ 'white-space': 'normal' }" v-for="column in state.columns" :key="column.prop" :label="column.label" :prop="column.prop" :width="column.width" show-overflow-tooltip align="center">
<template #default="scope"><div v-html="formatOutputCustom(scope.row[column.prop],scope.row.id)"></div>
<el-table-column :cell-style="{ 'white-space': 'normal' }" v-for="column in state.columns"
:key="column.prop" :label="column.label"
:prop="column.prop" :width="column.width"
show-overflow-tooltip
align="center">
<template #default="scope"><div v-html="formatOutputCustom(scope.row[column.prop],scope.row.id,column.label,scope.row)"></div>
<!-- <span style="color:#409EFF" v-if="column.label =='用户名称'">{{scope.row[column.prop]}}</span>
<span style="color:#909399" v-else-if="column.label =='领取状态' && scope.row[column.prop] ==1">已领取</span>
<span style="color:#E6A23C" v-else-if="column.label =='完成状态' && scope.row[column.prop] ==0">未完成</span>
......@@ -22,6 +26,13 @@
<span v-else>{{scope.row[column.prop]}}</span> -->
</template>
</el-table-column>
<el-table-column label="状态" prop="status" fixed="right" min-width="230">
<template #default="scope">
<span style="color:#409EFF">{{scope.row.status}}</span>
</template>
</el-table-column>
<el-table-column label="是否可采集" prop="not_collectible" fixed="right" min-width="230"></el-table-column>
<el-table-column label="不可采集原因" prop="not_collectible_remarks" fixed="right" min-width="230"></el-table-column>
</el-table>
<div class="pagination-box">
<el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" class="mt15"
......@@ -111,7 +122,8 @@
'norm_info.price': addItem.price,
'norm_info.guide': addItem.guide?addItem.guide:'/',
'norm_list_info.name': item.norm_list_info.name,
'fileListPdf': item.fileListPdf?item.fileListPdf:'/',
'fileListPdf': item.fileListPdf,
'fileName': item.file_name,
}
state.tableData.push(list);
item.norm_list_extend.forEach(function(items, indexs, arrs) {
......@@ -146,7 +158,6 @@
if(item.status == 4){
list['status'] ='已通过、已结算'
}
console.log(item)
if(item.not_collectible==null){
list['not_collectible'] ='待采集'
list['not_collectible_remarks'] ='/'
......@@ -158,9 +169,9 @@
list['not_collectible_remarks'] ='/'
}
});
state.columns.push( { label: '状态', prop:'status',width:350 })
state.columns.push( { label: '是否可采集', prop:'not_collectible',width:200 })
state.columns.push( { label: '不可采集原因', prop:'not_collectible_remarks',width:350 })
// state.columns.push( { label: '状态', prop:'status',width:350 })
// state.columns.push( { label: '是否可采集', prop:'not_collectible',width:200 })
// state.columns.push( { label: '不可采集原因', prop:'not_collectible_remarks',width:350 ,fixed:"right"})
state.loading = false
}).catch(() => {
......@@ -191,10 +202,39 @@
* 自定义内容格式化输出
* @param {*} vlaue
*/
const formatOutputCustom = (value,id) =>{
const formatOutputCustom = (value,id,title,data) =>{
if(value&&typeof value =="string"){
let arr = value.split(',');
let txt = '';
if(title == '上传文件'){
// 取出文件原名称
let file_name = [];
if(data.fileName){
file_name = data.fileName.split(',');
}
arr.map((item, index) => {
let str = checkUrl(item);
if(str){
let name = '';
console.log(file_name.length)
console.log(arr.length)
if(file_name.length==arr.length){
name = file_name[index]
}else{
name = '文件_'+(index+1)
}
if(index==0){
txt+= "<a style='color:#409EFF;cursor:pointer' href='"+item+"' target ='_blank'>"+name+"</a>";
}else if(index>4){
txt= "<div style='color:#409EFF;cursor:pointer' onclick='handleClick("+id+")'>查看所有文件</div>";
}else{
txt+= "<br><br><a style='color:#409EFF;cursor:pointer' href='"+item+"' target ='_blank'>"+name+"</a>";
}
}else{
txt+= item;
}
})
}else{
arr.map((item, index) => {
let str = checkUrl(item);
if(str){
......@@ -209,6 +249,7 @@
txt+= item;
}
})
}
return txt;
}else{
return value;
......
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