|
|
@@ -59,7 +59,7 @@
|
|
|
</div>
|
|
|
|
|
|
<el-table ref="tableData" :data="donorsList" border style="width: 100%" height="calc(100vh - 230px)"
|
|
|
- @selection-change="handleSelectionChange" @sort-change="orderby">
|
|
|
+ @selection-change="handleSelectionChange" @sort-change="orderby" @header-dragend="header_dragend">
|
|
|
<el-table-column type="selection" width="55"></el-table-column>
|
|
|
<el-table-column label="操作" width="100" align="center" fixed>
|
|
|
<template slot-scope="scope">
|
|
|
@@ -121,6 +121,19 @@
|
|
|
<template v-if="item.filed === 'Address'">
|
|
|
{{getaddress(scope.row)}}
|
|
|
</template>
|
|
|
+ <template v-if="item.filed === 'Genus'">
|
|
|
+ <el-popover trigger="hover" placement="top">
|
|
|
+ <template v-for="item in ExpandInfoList">
|
|
|
+<!-- <p v-if="item.FieldName == scope.row[item.FieldName]">
|
|
|
+
|
|
|
+ </p>-->
|
|
|
+ {{item.Name}}:{{scope.row[item.FieldName]}}
|
|
|
+ </template>
|
|
|
+ <div slot="reference" class="name-wrapper">
|
|
|
+ <el-tag size="medium">{{ scope.row[item.filed] }}</el-tag>
|
|
|
+ </div>
|
|
|
+ </el-popover>
|
|
|
+ </template>
|
|
|
<template v-else-if="item.filed === 'SurveyDate'">
|
|
|
{{jstimehandle(scope.row[item.filed])}}
|
|
|
</template>
|
|
|
@@ -262,6 +275,7 @@ import {
|
|
|
} from 'vuex'
|
|
|
import service from '../../../utils/micro_request'
|
|
|
import samplesourcesearchdialog from '../../../components/samples/samplesourcesearchdialog'
|
|
|
+import draggable from 'vuedraggable'
|
|
|
import store from 'store'
|
|
|
export default {
|
|
|
|
|
|
@@ -272,7 +286,8 @@ export default {
|
|
|
},
|
|
|
name: 'samplessource',
|
|
|
components: {
|
|
|
- samplesourcesearchdialog
|
|
|
+ samplesourcesearchdialog,
|
|
|
+ draggable
|
|
|
},
|
|
|
data () {
|
|
|
return {
|
|
|
@@ -293,6 +308,7 @@ export default {
|
|
|
isIndeterminate: false,
|
|
|
checkAll: true,
|
|
|
exportloading: false,
|
|
|
+ ExpandInfoList: [], // 扩展字段列表
|
|
|
searchform: {
|
|
|
GenusId: '',
|
|
|
Genus: '',
|
|
|
@@ -513,6 +529,10 @@ export default {
|
|
|
.catch(err => {
|
|
|
console.error(err)
|
|
|
})
|
|
|
+ service.postRequest('dashoo.biobank.bee-0.1', 'SampleRelated', 'CustomizeSearch', {type: 'SampleSource'})
|
|
|
+ .then(res => {
|
|
|
+ this.ExpandInfoList = res.data
|
|
|
+ })
|
|
|
},
|
|
|
getaddress (val) {
|
|
|
let address = val.ProvinceName + val.CityName + val.StreetName + val.Address
|
|
|
@@ -582,7 +602,7 @@ export default {
|
|
|
_this.importfilepath = ''
|
|
|
_this.importmsg = '未选择文件'
|
|
|
// 更新界面
|
|
|
- _this.initData()
|
|
|
+ _this.initdata()
|
|
|
} else {
|
|
|
_this.$message({
|
|
|
type: 'warning',
|
|
|
@@ -676,6 +696,15 @@ export default {
|
|
|
this.Column.Prop = column.prop
|
|
|
this.initdata()
|
|
|
},
|
|
|
+ header_dragend (newWidth, oldWidth, column, event) {
|
|
|
+ for (var i = 0; i < this.showcolumn.length; i++) {
|
|
|
+ if (this.showcolumn[i].name === column.label) {
|
|
|
+ this.showcolumn[i].columnwidth = newWidth
|
|
|
+ store.set('sapminputshowcolumn', this.showcolumn)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
seachdata () {
|
|
|
console.log("this.SurveyDateStart", this.SurveyDateStart)
|
|
|
console.log("this.SurveyDateEnd", this.SurveyDateEnd)
|
|
|
@@ -974,7 +1003,7 @@ export default {
|
|
|
type: 'success',
|
|
|
message: '自定义显示列设置成功'
|
|
|
})
|
|
|
- this.initData()
|
|
|
+ this.initdata()
|
|
|
},
|
|
|
checkedshowall () {
|
|
|
let tc = 0
|
|
|
@@ -1009,6 +1038,29 @@ export default {
|
|
|
margin: 1rem 0 2rem;
|
|
|
text-align: right;
|
|
|
}
|
|
|
+.sampshowfiledsort_ul_tags {
|
|
|
+ padding-left: 12px;
|
|
|
+ margin-top: -5px;
|
|
|
+}
|
|
|
+
|
|
|
+.sampshowfiledsort_ul_tags:after {
|
|
|
+ clear: both;
|
|
|
+ content: '';
|
|
|
+ display: block;
|
|
|
+}
|
|
|
+
|
|
|
+.sampshowfiledsort_ul_tags li {
|
|
|
+ color: #fff;
|
|
|
+ float: left;
|
|
|
+ margin: 2px 2px 3px 0;
|
|
|
+ padding: 3px 3px;
|
|
|
+ min-width: 15px;
|
|
|
+ font-size: 16px;
|
|
|
+ text-align: center;
|
|
|
+ cursor: move;
|
|
|
+ transition: all 1s;
|
|
|
+ list-style-type: none;
|
|
|
+}
|
|
|
|
|
|
.plab {
|
|
|
font-size: 13px;
|