|
|
@@ -146,10 +146,30 @@
|
|
|
<el-option v-for="item in sampletypes" :label="item.Name" :value="item.Id" :key="item.Id"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="录入日期">
|
|
|
- <el-date-picker v-model="CreateOn" type="daterange" range-separator="至" start-placeholder="开始日期"
|
|
|
- end-placeholder="结束日期" size="mini" style="width:100%"></el-date-picker>
|
|
|
+
|
|
|
+ <el-form-item label="创建日期">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="StartDate"
|
|
|
+ type="date"
|
|
|
+ size="mini"
|
|
|
+ format="yyyy-MM-dd"
|
|
|
+ style="width:100%"
|
|
|
+ placeholder="开始日期">
|
|
|
+ </el-date-picker>
|
|
|
</el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="容器选择">
|
|
|
+ <el-select size="mini" style="width:100%" v-model="value" placeholder="请选择">
|
|
|
+ <el-option
|
|
|
+ v-for="item in EquipmentList"
|
|
|
+ :key="item.DItem"
|
|
|
+ :label="item.DItemName"
|
|
|
+ :value="item.DItem">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="样本编码">
|
|
|
@@ -159,11 +179,21 @@
|
|
|
<el-input v-model="Name" placeholder="请输入名称" size="mini" style="width:100%"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="特有扩展">
|
|
|
- <el-select v-model="STNoteField" placeholder="请选择" size="mini" style="width:100%">
|
|
|
+ <el-select v-model="STNoteField" placeholder="请选择" size="mini" style="width:100%" clearable>
|
|
|
<el-option v-for="item in typetykzlist" :label="item.Name" :value="item.FieldName"
|
|
|
:key="item.FieldName"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="结束日期">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="EndDate"
|
|
|
+ type="date"
|
|
|
+ format="yyyy-MM-dd"
|
|
|
+ size="mini"
|
|
|
+ style="width:100%"
|
|
|
+ placeholder="结束日期">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="样本源名称">
|
|
|
@@ -179,6 +209,7 @@
|
|
|
<el-input v-model="GroupName" placeholder="输入所属分组" size="mini" style="width:100%"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
@@ -217,133 +248,15 @@
|
|
|
<batchrecoverydialog @close="recoverydialogcallback" :applyform="shenhe" :visible.sync="dialogfusuVisible">
|
|
|
</batchrecoverydialog>
|
|
|
|
|
|
-<!-- <el-dialog title="自定义搜索" :visible.sync="searchDialogVisible" width="1000px" top="5vh">
|
|
|
- <el-form ref="form" inline label-width="120px">
|
|
|
- <el-row :gutter="0">
|
|
|
- <el-col :span="10">
|
|
|
- <el-form-item label="自定义搜索名称">
|
|
|
- <el-input v-model="searchTemplateName" placeholder="请输入自定义名称" style="width:80%">
|
|
|
- </el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="2">
|
|
|
- <el-button @click="addSearchTab(searchTemplateName)">添加</el-button>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </el-form>
|
|
|
- <el-row :gutter="0">
|
|
|
- <el-col :span="5">
|
|
|
- <div class="searchDialogLeftStyle">
|
|
|
- <el-tag v-for="tag in searchTemplates" :id="tag.Name" :key="tag.Name" closable
|
|
|
- class="reporttag reportselect" :onclick="'clickmodeltypetag(' + tag.Name + ')'"
|
|
|
- style="display:block;text-align:center;color:white;" @close="removeSearchTab(tag.Name)">
|
|
|
- <i class="el-icon-caret-right" v-if="tag.Name == currentSearchTemplateName"></i>
|
|
|
- {{tag.Name}}
|
|
|
- </el-tag>
|
|
|
- </div>
|
|
|
- </el-col>
|
|
|
- <el-col :span="19">
|
|
|
- <div class="searchDialogRightStyle">
|
|
|
- <el-form ref="form" inline label-width="0px">
|
|
|
- <el-row style="margin-top:10px;">
|
|
|
- <el-col :span="24" style="margin-left:10px;">{{">> "+currentSearchTemplateName}}</el-col>
|
|
|
- </el-row>
|
|
|
- <el-row style="margin-top:10px;margin-bottom:10px;">
|
|
|
- <el-col class="line" :span="24" style="background-color:lightgrey; line-height: 2px;"> </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row :gutter="1">
|
|
|
- <el-col :span="5">
|
|
|
- <el-select v-model="searchField" @change="changeSearchField()" placeholder="请选择"
|
|
|
- style="margin-left:5px;margin-right:5px;">
|
|
|
- <el-option v-for="item in searchcolumn" :key="item.field" :label="item.name" :value="item.filed">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-col>
|
|
|
- <el-col :span="8">
|
|
|
- <el-input v-if="searchField == 'BarCode'" v-model="searchValue.BarCode" placeholder="请输入样本条码"
|
|
|
- style="margin-left:5px;display:inline-block;"></el-input>
|
|
|
- <el-input v-else-if="searchField == 'SampleCode'" v-model="searchValue.SampleCode"
|
|
|
- placeholder="请输入样本编码"></el-input>
|
|
|
- <el-input v-else-if="searchField == 'SourceName'" v-model="searchValue.SourceName"
|
|
|
- placeholder="请输入身份证号或姓名"></el-input>
|
|
|
- <el-input v-else-if="searchField == 'InnerCode'" v-model="searchValue.InnerCode"
|
|
|
- placeholder="请输入样本内码"></el-input>
|
|
|
- <el-input v-else-if="searchField == 'Name'" v-model="searchValue.Name" placeholder="请输入名称"></el-input>
|
|
|
- <el-input v-else-if="searchField == 'CreateBy'" v-model="searchValue.CreateBy" placeholder="请输入录入人">
|
|
|
- </el-input>
|
|
|
- <el-input v-else-if="searchField == 'GroupName'" v-model="searchValue.GroupName"
|
|
|
- placeholder="请输入所属分组"></el-input>
|
|
|
- <el-date-picker v-else-if="searchField == 'ReceiveDate'" v-model="searchValue.CreateOn"
|
|
|
- type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"
|
|
|
- style="width:100%"></el-date-picker>
|
|
|
- <el-select v-else-if="searchField == 'SampleTypeName'" v-model="searchValue.SampleType" clearable
|
|
|
- placeholder="请选择" @change="selsampletypeChange" style="width:100%">
|
|
|
- <el-option v-for="item in sampletypes" :key="item.Id" :label="item.Name" :value="item.Name">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- <el-date-picker v-else-if="searchField == 'ValidityDate'" v-model="searchValue.Validity"
|
|
|
- type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"
|
|
|
- style="width:100%">
|
|
|
- </el-date-picker>
|
|
|
- <el-input v-else-if="searchField == 'Capacity'" v-model="searchValue.Capacity" placeholder="请输入容量">
|
|
|
- </el-input>
|
|
|
- <el-input v-else-if="searchField == 'Location'" v-model="searchValue.Location" placeholder=" 请输入存储位置">
|
|
|
- </el-input>
|
|
|
- <el-input v-else v-model="searchValue.Extension" placeholder=""
|
|
|
- style="margin-left:5px;display:inline-block;"></el-input>
|
|
|
- </el-col>
|
|
|
- <el-col :span="3">
|
|
|
- <el-select v-model="orAnd" placeholder="请选择" style="margin-left:15px;">
|
|
|
- <el-option v-for="item in orAndData" :key="item.value" :label="item.name" :value="item.value">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-col>
|
|
|
- <el-col :span="3">
|
|
|
- <el-button type="primary" size="middle" style="margin-left:5px;display:inline-block;"
|
|
|
- @click="addSearchField">添加</el-button>
|
|
|
- </el-col>
|
|
|
- <el-col :span="5">
|
|
|
- <el-button type="primary" size="middle" style="display:inline-block;"
|
|
|
- @click="saveAndSearchWithTemplate">查询</el-button>
|
|
|
- <el-button type="primary" size="middle" style="display:inline-block;" @click="saveSearchTemplate">保存
|
|
|
- </el-button>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row style="margin-top:10px;">
|
|
|
- <el-col class="line" :span="24" style="background-color:lightgrey; line-height: 2px;"> </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row>
|
|
|
- <el-table :data="searchTableData" border style="width: 100%">
|
|
|
- <el-table-column prop="Name" label="检索名称" show-overflow-tooltip>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="Value" label="数值范围" width="300px" show-overflow-tooltip>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="Guanxi" label="查询关系" show-overflow-tooltip>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="Operate" label="操作" show-overflow-tooltip>
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-button @click="deleteSearchField(scope.row)" type="text" size="small">删除</el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- </el-row>
|
|
|
- </el-form>
|
|
|
- </div>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </el-dialog>-->
|
|
|
-
|
|
|
- <!-- 自定义查询 -->
|
|
|
<samplesearchdialog @close="closeDialog"
|
|
|
ref="samplesearchdialog"></samplesearchdialog>
|
|
|
|
|
|
+
|
|
|
<uploadattachdialog @close="uploaddialogcallback" :sampleinfo="sampleinfodetail"
|
|
|
:visible.sync="dialoguploadVisible"></uploadattachdialog>
|
|
|
</div>
|
|
|
|
|
|
- <!-- 自定义 -->
|
|
|
-<!-- <customsearchdialog @close="closeDialog"-->
|
|
|
-<!-- ref="customsearchdialog"></customsearchdialog>-->
|
|
|
+
|
|
|
</template>
|
|
|
<script>
|
|
|
import batchrecoverydialog from '../../../components/samples/batchrecoverydialog'
|
|
|
@@ -395,7 +308,10 @@
|
|
|
Stnotevalue: '', // 特有扩展检索值
|
|
|
STNoteField: [], // 特有扩展名称
|
|
|
CreateBy: '', // 录入人
|
|
|
- CreateOn: [], // 录入时期
|
|
|
+ EquipmentList: [], // 容器类型列表
|
|
|
+ StartDate: '', // 开始时期
|
|
|
+ EndDate: '', // 结束时期
|
|
|
+ CreateOn: [],
|
|
|
Name: '', // 名称
|
|
|
SourceName: '', // 样本来源
|
|
|
Validity: [], // 有效日期
|
|
|
@@ -440,6 +356,8 @@
|
|
|
Name: '',
|
|
|
CreateBy: '',
|
|
|
CreateOn: [],
|
|
|
+ StartDate: '',
|
|
|
+ EndDate: '',
|
|
|
selectedzuzhi: [],
|
|
|
SamplingSite: '',
|
|
|
SampleType: '',
|
|
|
@@ -491,9 +409,11 @@
|
|
|
if (searchmodel.CreateBy && searchmodel.CreateBy !== '') { // 录入人
|
|
|
this.CreateBy = searchmodel.CreateBy
|
|
|
}
|
|
|
+
|
|
|
if (searchmodel.CreateOn && searchmodel.CreateOn.length === 2) { // 录入日期
|
|
|
this.CreateOn = [new Date(searchmodel.CreateOn[0]), new Date(searchmodel.CreateOn[1])]
|
|
|
}
|
|
|
+
|
|
|
if (searchmodel.SampleType && searchmodel.SampleType !== '') { // 样本类型
|
|
|
this.SampleType = searchmodel.SampleType
|
|
|
this.searchsampletypeChange()
|
|
|
@@ -611,6 +531,15 @@
|
|
|
|
|
|
methods: {
|
|
|
initData () {
|
|
|
+ this.CreateOn = []
|
|
|
+ if ((this.StartDate != '' && this.EndDate == '') || (this.StartDate == '' && this.EndDate != '')) {
|
|
|
+ this.$message.error('请输入完整创建日期!')
|
|
|
+ } else if (this.StartDate > this.EndDate) {
|
|
|
+ this.$message.error('开始日期不能大于结束日期,请重新输入!')
|
|
|
+ } else if (this.StartDate != '' && this.EndDate != '') {
|
|
|
+ this.CreateOn.push(this.StartDate)
|
|
|
+ this.CreateOn.push(this.EndDate)
|
|
|
+ }
|
|
|
this.currentSearchTemplate = ''
|
|
|
let _this = this
|
|
|
// 增加自定义显示列,存储位置,之后需要去掉
|
|
|
@@ -672,6 +601,10 @@
|
|
|
.catch(err => {
|
|
|
console.error(err)
|
|
|
})
|
|
|
+ service.postRequest('dashoo.biobank.bee-0.1', 'Equipment', 'GetEquipmentType')
|
|
|
+ .then(res => {
|
|
|
+ this.EquipmentList = res.data
|
|
|
+ })
|
|
|
},
|
|
|
// 根据子code获取所有父code
|
|
|
getparentcodebytopcode (v) {
|
|
|
@@ -726,6 +659,7 @@
|
|
|
seachdata () {
|
|
|
this.currentPage = 1
|
|
|
this.initData()
|
|
|
+ this.dialogVisible = false
|
|
|
},
|
|
|
openPrintDialog (val) {
|
|
|
this.peintitemid = val.Id
|
|
|
@@ -1129,74 +1063,6 @@
|
|
|
this.initData()
|
|
|
},
|
|
|
|
|
|
- /* addSearchField () {
|
|
|
- let searchValue
|
|
|
- for (let k in this.searchValue) {
|
|
|
- if (typeof this.searchValue[k] === 'number') {
|
|
|
- searchValue = this.searchValue[k]
|
|
|
- break
|
|
|
- } else if (this.searchValue[k] && this.searchValue[k].length > 0) {
|
|
|
- searchValue = this.searchValue[k]
|
|
|
- break
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- if (!searchValue) {
|
|
|
- this.$message('请输入检索数值或范围')
|
|
|
- return
|
|
|
- }
|
|
|
-
|
|
|
- let s = ''
|
|
|
- if (searchValue instanceof Array && searchValue.length > 0) {
|
|
|
- if (searchValue[0] instanceof Date) {
|
|
|
- let arr = []
|
|
|
- for (let j = 0; j < searchValue.length; j++) {
|
|
|
- arr.push(this.formatDateTime(searchValue[j]))
|
|
|
- }
|
|
|
- s = arr.join('--')
|
|
|
- } else {
|
|
|
- s = searchValue[searchValue.length - 1]
|
|
|
- }
|
|
|
- } else {
|
|
|
- s = searchValue
|
|
|
- }
|
|
|
-
|
|
|
- for (let i = 0; i < this.searchTemplates.length; i++) {
|
|
|
- if (this.searchTemplates[i].Name == this.currentSearchTemplateName) {
|
|
|
- for (let index in this.searchTemplates[i].Fields) {
|
|
|
- let field = this.searchTemplates[i].Fields[index]
|
|
|
- if (field.Field == this.searchField && field.Value == this.searchValue && field.OrAnd == this.orAnd) {
|
|
|
- this.$message('此查询条件已经存在')
|
|
|
- return
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- this.searchTemplates[i].Fields.push({
|
|
|
- Field: this.searchField,
|
|
|
- Value: s + '',
|
|
|
- OrAnd: this.orAnd,
|
|
|
- Name: this.getFieldName(this.searchField)
|
|
|
- })
|
|
|
- this.searchTableData = this.getSearchTableData(this.searchTemplates[i].Fields)
|
|
|
- break
|
|
|
- }
|
|
|
- }
|
|
|
- }, */
|
|
|
-
|
|
|
- /* deleteSearchField (v) {
|
|
|
- if (v.Name) {
|
|
|
- for (let i = 0; i < this.searchTemplates.length; i++) {
|
|
|
- if (this.searchTemplates[i].Name == this.currentSearchTemplateName) {
|
|
|
- this.searchTemplates[i].Fields = this.searchTemplates[i].Fields.filter(function (ele) {
|
|
|
- return !(ele.Value == v.Value && ele.Field == v.Field && ele.OrAnd == v.OrAnd)
|
|
|
- })
|
|
|
- this.searchTableData = this.getSearchTableData(this.searchTemplates[i].Fields)
|
|
|
- break
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }, */
|
|
|
-
|
|
|
getSearchTableData (searchFields) {
|
|
|
let data = searchFields.map(function (ele) {
|
|
|
if (ele['OrAnd'] == 'or') {
|
|
|
@@ -1378,7 +1244,7 @@
|
|
|
this.list = res.data.list
|
|
|
this.currentItemCount = res.data.total
|
|
|
})
|
|
|
- /*this.currentSearchTemplate = command*/
|
|
|
+ /* this.currentSearchTemplate = command */
|
|
|
}
|
|
|
},
|
|
|
|
|
|
@@ -1451,6 +1317,8 @@
|
|
|
Name: '',
|
|
|
CreateBy: '',
|
|
|
CreateOn: [],
|
|
|
+ StartDate: [],
|
|
|
+ EndDate: [],
|
|
|
selectedzuzhi: [],
|
|
|
SamplingSite: '',
|
|
|
SampleType: '',
|
|
|
@@ -1461,6 +1329,19 @@
|
|
|
GroupName: ''
|
|
|
}
|
|
|
},
|
|
|
+ /* formatDateTime (date) {
|
|
|
+ var y = date.getFullYear()
|
|
|
+ var m = date.getMonth() + 1
|
|
|
+ m = m < 10 ? ('0' + m) : m
|
|
|
+ var d = date.getDate()
|
|
|
+ d = d < 10 ? ('0' + d) : d
|
|
|
+ var h = date.getHours()
|
|
|
+ var minute = date.getMinutes()
|
|
|
+ var second = date.getSeconds()
|
|
|
+ minute = minute < 10 ? ('0' + minute) : minute
|
|
|
+ minute = second < 10 ? ('0' + second) : second
|
|
|
+ return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + second
|
|
|
+ }, */
|
|
|
clearSearch () {
|
|
|
this.BarCode = ''
|
|
|
this.SampleCode = ''
|
|
|
@@ -1469,6 +1350,8 @@
|
|
|
this.Name = ''
|
|
|
this.CreateBy = ''
|
|
|
this.CreateOn = []
|
|
|
+ this.StartDate = []
|
|
|
+ this.EndDate = []
|
|
|
this.SampleType = ''
|
|
|
this.STNoteField = ''
|
|
|
this.Stnotevalue = ''
|
|
|
@@ -1476,19 +1359,6 @@
|
|
|
this.currentPage = 1
|
|
|
this.GroupName = ''
|
|
|
this.initData()
|
|
|
- },
|
|
|
- formatDateTime (date) {
|
|
|
- var y = date.getFullYear()
|
|
|
- var m = date.getMonth() + 1
|
|
|
- m = m < 10 ? ('0' + m) : m
|
|
|
- var d = date.getDate()
|
|
|
- d = d < 10 ? ('0' + d) : d
|
|
|
- var h = date.getHours()
|
|
|
- var minute = date.getMinutes()
|
|
|
- var second = date.getSeconds()
|
|
|
- minute = minute < 10 ? ('0' + minute) : minute
|
|
|
- minute = second < 10 ? ('0' + second) : second
|
|
|
- return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + second
|
|
|
}
|
|
|
}
|
|
|
}
|