|
@@ -23,6 +23,8 @@
|
|
|
<router-link :to="'/biobank/source/addsource/operationb'">
|
|
<router-link :to="'/biobank/source/addsource/operationb'">
|
|
|
<el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;">添加</el-button>
|
|
<el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;">添加</el-button>
|
|
|
</router-link>
|
|
</router-link>
|
|
|
|
|
+ <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;"
|
|
|
|
|
+ @click="columndialogVisible = true">显示列</el-button>
|
|
|
<!-- <el-button size="mini" type="primary" style="margin-left:10px; margin-top: -4px;"
|
|
<!-- <el-button size="mini" type="primary" style="margin-left:10px; margin-top: -4px;"
|
|
|
@click="importVisible = true">导入</el-button> -->
|
|
@click="importVisible = true">导入</el-button> -->
|
|
|
</span>
|
|
</span>
|
|
@@ -34,8 +36,10 @@
|
|
|
<el-input size="mini" style="width: 165px;" v-model="searchform.InnerNo" placeholder="请输入来源内码"></el-input>
|
|
<el-input size="mini" style="width: 165px;" v-model="searchform.InnerNo" placeholder="请输入来源内码"></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="创建日期">
|
|
<el-form-item label="创建日期">
|
|
|
- <el-date-picker size="mini" style="width: 220px" v-model="CreateOn" type="daterange" range-separator="至"
|
|
|
|
|
- start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
|
|
|
|
|
|
|
+ <el-date-picker size="mini" style="width: 110px" v-model="CreateOnStart" type="date"
|
|
|
|
|
+ placeholder="开始日期"></el-date-picker>
|
|
|
|
|
+ <el-date-picker size="mini" style="width: 110px" v-model="CreateOnEnd" type="date"
|
|
|
|
|
+ placeholder="结束日期"></el-date-picker>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
<el-form-item>
|
|
|
<el-dropdown split-button type="primary" size="mini" @click="seachdata" @command="searchCommand">
|
|
<el-dropdown split-button type="primary" size="mini" @click="seachdata" @command="searchCommand">
|
|
@@ -82,33 +86,52 @@
|
|
|
</span>
|
|
</span>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column prop="Name" sortable min-width="80" label="样本源名称" align="center" show-overflow-tooltip>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
- <el-table-column prop="Genus" sortable min-width="80" label="蜂种" align="center" show-overflow-tooltip>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
- <el-table-column prop="InnerNo" sortable align="center" label="来源内码" min-width="160" show-overflow-tooltip>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
- <el-table-column prop="AddressLine" sortable align="center" label="取样地区" min-width="160" show-overflow-tooltip>
|
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
|
- <p>{{getaddress(scope.row)}}</p>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
- <el-table-column prop="Amount" sortable label="数量" align="center" show-overflow-tooltip min-width="60">
|
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
|
- <p>{{scope.row.Amount}} {{scope.row.Unit}}</p>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
- <el-table-column prop="AuditorStatus" sortable label="审核状态" align="center" min-width="80">
|
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
|
- <el-tag v-show="scope.row.AuditorStatus=='0'" type="warning">未审核</el-tag>
|
|
|
|
|
- <el-tag v-show="scope.row.AuditorStatus=='1'" type="success">审核成功</el-tag>
|
|
|
|
|
- <el-tag v-show="scope.row.AuditorStatus=='2'" type="danger">审核失败</el-tag>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column>
|
|
|
|
|
- <el-table-column prop="AuditorName" sortable label="审核人" align="center" show-overflow-tooltip></el-table-column>
|
|
|
|
|
- <el-table-column prop="SurveyDate" sortable align="center" label="采样日期" min-width="80" show-overflow-tooltip>
|
|
|
|
|
|
|
+<!-- <el-table-column prop="Name" sortable min-width="80" label="样本源名称" align="center" show-overflow-tooltip>-->
|
|
|
|
|
+<!-- </el-table-column>-->
|
|
|
|
|
+<!-- <el-table-column prop="Genus" sortable min-width="80" label="蜂种" align="center" show-overflow-tooltip>-->
|
|
|
|
|
+<!-- </el-table-column>-->
|
|
|
|
|
+<!-- <el-table-column prop="InnerNo" sortable align="center" label="来源内码" min-width="160" show-overflow-tooltip>-->
|
|
|
|
|
+<!-- </el-table-column>-->
|
|
|
|
|
+<!-- <el-table-column prop="AddressLine" sortable align="center" label="取样地区" min-width="160" show-overflow-tooltip>-->
|
|
|
|
|
+<!-- <template slot-scope="scope">-->
|
|
|
|
|
+<!-- <p>{{getaddress(scope.row)}}</p>-->
|
|
|
|
|
+<!-- </template>-->
|
|
|
|
|
+<!-- </el-table-column>-->
|
|
|
|
|
+<!-- <el-table-column prop="Amount" sortable label="数量" align="center" show-overflow-tooltip min-width="60">-->
|
|
|
|
|
+<!-- <template slot-scope="scope">-->
|
|
|
|
|
+<!-- <p>{{scope.row.Amount}} {{scope.row.Unit}}</p>-->
|
|
|
|
|
+<!-- </template>-->
|
|
|
|
|
+<!-- </el-table-column>-->
|
|
|
|
|
+<!-- <el-table-column prop="AuditorStatus" sortable label="审核状态" align="center" min-width="80">-->
|
|
|
|
|
+<!-- <template slot-scope="scope">-->
|
|
|
|
|
+<!-- <el-tag v-show="scope.row.AuditorStatus=='0'" type="warning">未审核</el-tag>-->
|
|
|
|
|
+<!-- <el-tag v-show="scope.row.AuditorStatus=='1'" type="success">审核成功</el-tag>-->
|
|
|
|
|
+<!-- <el-tag v-show="scope.row.AuditorStatus=='2'" type="danger">审核失败</el-tag>-->
|
|
|
|
|
+<!-- </template>-->
|
|
|
|
|
+<!-- </el-table-column>-->
|
|
|
|
|
+<!-- <el-table-column prop="AuditorName" sortable label="审核人" align="center" show-overflow-tooltip></el-table-column>-->
|
|
|
|
|
+<!-- <el-table-column prop="SurveyDate" sortable align="center" label="采样日期" min-width="80" show-overflow-tooltip>-->
|
|
|
|
|
+<!-- <template slot-scope="scope">-->
|
|
|
|
|
+<!-- <p>{{jstimehandle(scope.row.SurveyDate)}}</p>-->
|
|
|
|
|
+<!-- </template>-->
|
|
|
|
|
+<!-- </el-table-column>-->
|
|
|
|
|
+ <el-table-column :label="item.name" :key="item.name" v-if="item.show" v-for="item in showcolumn"
|
|
|
|
|
+ :width="item.columnwidth" align="center" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <p>{{jstimehandle(scope.row.SurveyDate)}}</p>
|
|
|
|
|
|
|
+ <template v-if="item.filed === 'Address'">
|
|
|
|
|
+ {{getaddress(scope.row)}}
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template v-else-if="item.filed === 'SurveyDate'">
|
|
|
|
|
+ {{jstimehandle(scope.row[item.filed])}}
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template v-else-if="item.filed === 'AuditorStatus'">
|
|
|
|
|
+ <el-tag v-show="scope.row.AuditorStatus=='0'" type="warning">未审核</el-tag>
|
|
|
|
|
+ <el-tag v-show="scope.row.AuditorStatus=='1'" type="success">审核成功</el-tag>
|
|
|
|
|
+ <el-tag v-show="scope.row.AuditorStatus=='2'" type="danger">审核失败</el-tag>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template v-else>
|
|
|
|
|
+ {{scope.row[item.filed]}}
|
|
|
|
|
+ </template>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
@@ -154,8 +177,10 @@
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
<el-form-item label="采样日期">
|
|
<el-form-item label="采样日期">
|
|
|
- <el-date-picker size="mini" style="width: 240px" v-model="SurveyDate" type="daterange" range-separator="至"
|
|
|
|
|
- start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
|
|
|
|
|
|
|
+ <el-date-picker size="mini" style="width: 120px" v-model="SurveyDateStart" type="date"
|
|
|
|
|
+ placeholder="开始日期"></el-date-picker>
|
|
|
|
|
+ <el-date-picker size="mini" style="width: 120px" v-model="SurveyDateEnd" type="date"
|
|
|
|
|
+ placeholder="结束日期"></el-date-picker>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
@@ -209,6 +234,23 @@
|
|
|
</div>
|
|
</div>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
+ <el-dialog title="选中显示列(拖拽可以实现排序)" :visible.sync="columndialogVisible" top="5vh">
|
|
|
|
|
+ <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange"
|
|
|
|
|
+ style="margin-left:15px;">全选</el-checkbox>
|
|
|
|
|
+ <div style="margin: 10px 0;"></div>
|
|
|
|
|
+ <draggable v-model="showcolumn">
|
|
|
|
|
+ <transition-group class="sampshowfiledsort_ul sampshowfiledsort_ul_tags" tag="ul">
|
|
|
|
|
+ <li v-for="item in showcolumn" :key="item.filed">
|
|
|
|
|
+ <el-checkbox v-model="item.show" :label="item.filed" @change="checkedshowall()">{{item.name}}</el-checkbox>
|
|
|
|
|
+ </li>
|
|
|
|
|
+ </transition-group>
|
|
|
|
|
+ </draggable>
|
|
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
|
|
+ <el-button @click="columndialogVisible = false">取 消</el-button>
|
|
|
|
|
+ <el-button type="primary" @click="saveshowfiled()">确 定</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-dialog>
|
|
|
|
|
+
|
|
|
<!-- 自定义查询 -->
|
|
<!-- 自定义查询 -->
|
|
|
<samplesourcesearchdialog @close="closeDialog"
|
|
<samplesourcesearchdialog @close="closeDialog"
|
|
|
ref="samplesourcesearchdialog"></samplesourcesearchdialog>
|
|
ref="samplesourcesearchdialog"></samplesourcesearchdialog>
|
|
@@ -246,6 +288,10 @@ export default {
|
|
|
currentSearchTemplateName: '', // 当前搜索模板名称
|
|
currentSearchTemplateName: '', // 当前搜索模板名称
|
|
|
searchTemplates: [], // 自定义模板
|
|
searchTemplates: [], // 自定义模板
|
|
|
list: [], // table显示数据集
|
|
list: [], // table显示数据集
|
|
|
|
|
+ showcolumn: [], // 显示列
|
|
|
|
|
+ columndialogVisible: false, // 自定义显示列弹框
|
|
|
|
|
+ isIndeterminate: false,
|
|
|
|
|
+ checkAll: true,
|
|
|
exportloading: false,
|
|
exportloading: false,
|
|
|
searchform: {
|
|
searchform: {
|
|
|
GenusId: '',
|
|
GenusId: '',
|
|
@@ -266,8 +312,12 @@ export default {
|
|
|
starttime: null,
|
|
starttime: null,
|
|
|
endtime: null
|
|
endtime: null
|
|
|
},
|
|
},
|
|
|
|
|
+ SurveyDateStart: '', // 采样开始日期
|
|
|
|
|
+ SurveyDateEnd: '', // 采样结束日期
|
|
|
SurveyDate: [], // 采样日期
|
|
SurveyDate: [], // 采样日期
|
|
|
- CreateOn: [],
|
|
|
|
|
|
|
+ CreateOnStart: '', // 创建开始日期
|
|
|
|
|
+ CreateOnEnd: '', // 创建结束日期
|
|
|
|
|
+ CreateOn: [], // 创建日期
|
|
|
currentItemCount: 0,
|
|
currentItemCount: 0,
|
|
|
currentPage: 1,
|
|
currentPage: 1,
|
|
|
size: 200,
|
|
size: 200,
|
|
@@ -284,7 +334,6 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
created () {
|
|
created () {
|
|
|
- let _this = this
|
|
|
|
|
// console.log('jlw', store.get('samplestoredseach'))
|
|
// console.log('jlw', store.get('samplestoredseach'))
|
|
|
if (this.$route.query.size && this.$route.query.currentPage) {
|
|
if (this.$route.query.size && this.$route.query.currentPage) {
|
|
|
this.size = parseInt(this.$route.query.size)
|
|
this.size = parseInt(this.$route.query.size)
|
|
@@ -323,10 +372,58 @@ export default {
|
|
|
} else {
|
|
} else {
|
|
|
store.set('samplestoredseach', '')
|
|
store.set('samplestoredseach', '')
|
|
|
}
|
|
}
|
|
|
|
|
+ let cachecols = store.get('sapmsourceinputshowcolumn')
|
|
|
|
|
+ if (cachecols && cachecols !== '') {
|
|
|
|
|
+ this.showcolumn = cachecols
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.showcolumn = [{
|
|
|
|
|
+ filed: 'Name',
|
|
|
|
|
+ name: '样本源名称',
|
|
|
|
|
+ show: true,
|
|
|
|
|
+ kuoz: false
|
|
|
|
|
+ }, {
|
|
|
|
|
+ filed: 'Genus',
|
|
|
|
|
+ name: '蜂种',
|
|
|
|
|
+ show: true,
|
|
|
|
|
+ kuoz: false
|
|
|
|
|
+ }, {
|
|
|
|
|
+ filed: 'InnerNo',
|
|
|
|
|
+ name: '来源内码',
|
|
|
|
|
+ show: true,
|
|
|
|
|
+ kuoz: false
|
|
|
|
|
+ }, {
|
|
|
|
|
+ filed: 'Address',
|
|
|
|
|
+ name: '取样地区',
|
|
|
|
|
+ show: true,
|
|
|
|
|
+ kuoz: false
|
|
|
|
|
+ }, {
|
|
|
|
|
+ filed: 'Amount',
|
|
|
|
|
+ name: '数量',
|
|
|
|
|
+ show: true,
|
|
|
|
|
+ kuoz: false
|
|
|
|
|
+ }, {
|
|
|
|
|
+ filed: 'AuditorStatus',
|
|
|
|
|
+ name: '审核状态',
|
|
|
|
|
+ show: true,
|
|
|
|
|
+ kuoz: false
|
|
|
|
|
+ }, {
|
|
|
|
|
+ filed: 'AuditorName',
|
|
|
|
|
+ name: '审核人',
|
|
|
|
|
+ show: true,
|
|
|
|
|
+ kuoz: false
|
|
|
|
|
+ }, {
|
|
|
|
|
+ filed: 'SurveyDate',
|
|
|
|
|
+ name: '采样日期',
|
|
|
|
|
+ show: true,
|
|
|
|
|
+ kuoz: false
|
|
|
|
|
+ }]
|
|
|
|
|
+ }
|
|
|
this.filehost = process.env.imgserverhost
|
|
this.filehost = process.env.imgserverhost
|
|
|
this.initdata()
|
|
this.initdata()
|
|
|
this.getAnimalGenus()
|
|
this.getAnimalGenus()
|
|
|
|
|
+ this.checkedshowall()
|
|
|
this.getProjectlist()
|
|
this.getProjectlist()
|
|
|
|
|
+ this.getAllSearchTab()
|
|
|
this.importfileparam = {
|
|
this.importfileparam = {
|
|
|
accode: this.authUser.Profile.AccCode
|
|
accode: this.authUser.Profile.AccCode
|
|
|
}
|
|
}
|
|
@@ -534,33 +631,6 @@ export default {
|
|
|
console.error(err)
|
|
console.error(err)
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- // getSearchTableData (searchFields) {
|
|
|
|
|
- // let data = searchFields.map(function (ele) {
|
|
|
|
|
- // // if (ele['OrAnd'] === 'or') {
|
|
|
|
|
- // // ele['Guanxi'] = '或者'
|
|
|
|
|
- // // } else {
|
|
|
|
|
- // // ele['Guanxi'] = '并且'
|
|
|
|
|
- // // }
|
|
|
|
|
- //
|
|
|
|
|
- // // _this.searchTemplates.forEach((item) => {
|
|
|
|
|
- // // item.Fields.forEach((it) => {
|
|
|
|
|
- // // if (it.TagIcon == "cascader") {
|
|
|
|
|
- // // it.Value = "[" + it.Value + "]"
|
|
|
|
|
- // // }
|
|
|
|
|
- // // })
|
|
|
|
|
- // // })
|
|
|
|
|
- // if (ele['Operate'] === 'between') {
|
|
|
|
|
- // ele['Value'] = ele['Value'].split('--')
|
|
|
|
|
- // }
|
|
|
|
|
- // if (ele.TagIcon == 'cascader') {
|
|
|
|
|
- // ele.Value = ele.Value.split('/')
|
|
|
|
|
- // }
|
|
|
|
|
- // return ele
|
|
|
|
|
- // })
|
|
|
|
|
- //
|
|
|
|
|
- // return data || []
|
|
|
|
|
- // },
|
|
|
|
|
-
|
|
|
|
|
getSearchTableData (searchFields) {
|
|
getSearchTableData (searchFields) {
|
|
|
let data = searchFields.map(function (ele) {
|
|
let data = searchFields.map(function (ele) {
|
|
|
if (ele['OrAnd'] === 'or') {
|
|
if (ele['OrAnd'] === 'or') {
|
|
@@ -607,7 +677,27 @@ export default {
|
|
|
this.initdata()
|
|
this.initdata()
|
|
|
},
|
|
},
|
|
|
seachdata () {
|
|
seachdata () {
|
|
|
|
|
+ console.log("this.SurveyDateStart", this.SurveyDateStart)
|
|
|
|
|
+ console.log("this.SurveyDateEnd", this.SurveyDateEnd)
|
|
|
this.currentPage = 1
|
|
this.currentPage = 1
|
|
|
|
|
+ this.SurveyDate = []
|
|
|
|
|
+ if ((this.SurveyDateStart != '' && this.SurveyDateEnd == '') || (this.SurveyDateStart == '' && this.SurveyDateEnd != '')) {
|
|
|
|
|
+ this.$message.error('请输入完整采集日期!')
|
|
|
|
|
+ } else if (this.SurveyDateStart > this.SurveyDateEnd) {
|
|
|
|
|
+ this.$message.error('开始日期不能大于结束日期,请重新输入!')
|
|
|
|
|
+ } else if (this.SurveyDateStart != '' && this.SurveyDateEnd != ''){
|
|
|
|
|
+ this.SurveyDate.push(this.SurveyDateStart)
|
|
|
|
|
+ this.SurveyDate.push(this.SurveyDateEnd)
|
|
|
|
|
+ }
|
|
|
|
|
+ if ((this.CreateOnStart != '' && this.CreateOnEnd == '') || (this.CreateOnStart == '' && this.CreateOnEnd != '')) {
|
|
|
|
|
+ this.$message.error('请输入完整创建日期!')
|
|
|
|
|
+ } else if (this.CreateOnStart > this.CreateOnEnd) {
|
|
|
|
|
+ this.$message.error('开始日期不能大于结束日期,请重新输入!')
|
|
|
|
|
+ } else if (this.CreateOnStart != '' && this.CreateOnEnd != ''){
|
|
|
|
|
+ this.CreateOn.push(this.CreateOnStart)
|
|
|
|
|
+ this.CreateOn.push(this.CreateOnEnd)
|
|
|
|
|
+ }
|
|
|
|
|
+ console.log("CreateOn", this.CreateOn)
|
|
|
this.initdata()
|
|
this.initdata()
|
|
|
},
|
|
},
|
|
|
searchCommand (command) {
|
|
searchCommand (command) {
|
|
@@ -875,6 +965,40 @@ export default {
|
|
|
handleSelectionChange (val) {
|
|
handleSelectionChange (val) {
|
|
|
this.multipleSelection = val
|
|
this.multipleSelection = val
|
|
|
console.log('this.multipleSelection', this.multipleSelection)
|
|
console.log('this.multipleSelection', this.multipleSelection)
|
|
|
|
|
+ },
|
|
|
|
|
+ // 自定义显示列保存操作
|
|
|
|
|
+ saveshowfiled () {
|
|
|
|
|
+ store.set('sapmsourceinputshowcolumn', this.showcolumn)
|
|
|
|
|
+ this.columndialogVisible = false
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ type: 'success',
|
|
|
|
|
+ message: '自定义显示列设置成功'
|
|
|
|
|
+ })
|
|
|
|
|
+ this.initData()
|
|
|
|
|
+ },
|
|
|
|
|
+ checkedshowall () {
|
|
|
|
|
+ let tc = 0
|
|
|
|
|
+ for (var i = 0; i < this.showcolumn.length; i++) {
|
|
|
|
|
+ if (this.showcolumn[i].show) {
|
|
|
|
|
+ tc++
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ if (tc > 0 && tc < this.showcolumn.length) {
|
|
|
|
|
+ this.isIndeterminate = true
|
|
|
|
|
+ this.checkAll = false
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.isIndeterminate = false
|
|
|
|
|
+ if (tc === 0) {
|
|
|
|
|
+ this.checkAll = false
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.checkAll = true
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ handleCheckAllChange (val) {
|
|
|
|
|
+ for (var i = 0; i < this.showcolumn.length; i++) {
|
|
|
|
|
+ this.showcolumn[i].show = val
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|