Commit f14f3dce by wangweidong

土工试验Lims

parent ffa609d2
......@@ -9,6 +9,8 @@ export default {
http.get('/res/v1/user_group/get_by_uid/' + data.uid).then(res => res),
userPage: data =>
http.post('/res/v1/user_group/page_rel_user', data).then(res => res),
pageGroupUser: data =>
http.post('/soil/v1/experiment/page_group_user', data).then(res => res),
add: data => http.post('/res/v1/user_group/', data).then(res => res),
edit: data =>
http.put('/res/v1/user_group/' + data.id, data.obj).then(res => res),
......
......@@ -120,6 +120,17 @@ export default {
data.remark
)
.then(res => res),
// 样品检测退回
testInputBack: data =>
http
.post(
'soil/v1/experiment/exp_data_input_back?ids=' +
data.ids +
'&reason=' +
data.remark
)
.then(res => res),
getDictList: data =>
http.post('res/v1/dict/dict_query?type=' + data).then(res => res),
editBackup: data =>
......
......@@ -10,6 +10,10 @@ export default {
// 根据机构查人员
userSelect: data =>
http.post('/base/v1/user/page_org/' + data.orgId, data).then(res => res),
pageUserVO: data =>
http
.post('/soil/v1/experiment/page_user_vo/' + data.orgId, data)
.then(res => res),
pageFlowExcludeMemberShip: data =>
http
.post('/base/v1/user/page_flow_exclude_member_ship/' + data.groupId, data)
......
......@@ -8,13 +8,13 @@
<Col span="10">
<Card class="user_card_tree">
<p slot="title">{{titleChange}}</p>
<p v-if="isChange === undefined" slot="extra" @click="_changeLimit">
<Tooltip content="切换" placement="top-end">
<Badge dot>
<Icon type="ios-switch" size="23"></Icon>
</Badge>
</Tooltip>
</p>
<!-- <p v-if="isChange === undefined" slot="extra" @click="_changeLimit">-->
<!-- <Tooltip content="切换" placement="top-end">-->
<!-- <Badge dot>-->
<!-- <Icon type="ios-switch" size="23"></Icon>-->
<!-- </Badge>-->
<!-- </Tooltip>-->
<!-- </p>-->
<div>
<orginZtree v-show="changeBool" ref="orginZtree" @on-result-change="_orgData"></orginZtree>
<userMarshalling
......
......@@ -68,6 +68,7 @@ export default {
pageParams: { page: 1, rows: 20 },
pageColumns: [
{ title: '姓名', key: 'realname' },
{ title: '待办试验项目量', key: 'total' },
{ title: '性别', key: 'sex', sex: true, width: 100 }
],
getPage: {},
......@@ -109,7 +110,9 @@ export default {
this._pageChange(1)
},
_page: async function() {
const result = await sysUser.userSelect(this._searchParams())
const data = this._searchParams()
console.log('---xxx---', data)
const result = await sysUser.userSelect(data)
if (result) {
this.getPage = result
}
......@@ -123,7 +126,9 @@ export default {
return this.$extend(data, this.pageParams)
},
_pageMa: async function() {
const result = await lmsMarshalManage.userPage(this._searchParamsMa())
const result = await lmsMarshalManage.pageGroupUser(
this._searchParamsMa()
)
if (result) {
this.getPage = result
}
......
......@@ -6,21 +6,21 @@
<Form id="task-assign-item-right" :label-width="70" inline onsubmit="return false">
<label class="label-sign"></label>
<Form-item class="search-item" label="试样编号:">
<Input v-model="formObj.sampleCode" @on-enter="_formSearch" name="sampleCode" placeholder="请输入试样编号" clearable></Input>
<Input v-model="formObj.sampleCode" name="sampleCode" placeholder="请输入试样编号" clearable @on-enter="_formSearch"></Input>
</Form-item>
<Form-item class="search-btn">
<Button @click="_formSearch" type="primary">搜索</Button>
<Button type="primary" @click="_formSearch">搜索</Button>
</Form-item>
</Form>
</Col>
<!--操作-->
<Col span="24">
<btn-list :msg="btn" @on-result-change="_btnClick" class="contHide"></btn-list>
<btn-list :msg="btn" class="contHide" @on-result-change="_btnClick"></btn-list>
</Col>
<!-- 表格 -->
<Col span="24">
<PTVXETable ref="pageTable" :page-columns="pageColumns" :table-height="tableHeight"
:get-page="getPage" :icon-msg="iconMsg" :table-name="tableName" @on-result-change="_tableResultChange" is-task select-data>
:get-page="getPage" :icon-msg="iconMsg" :table-name="tableName" is-task select-data @on-result-change="_tableResultChange">
<vxe-table-column
v-for="item in userColumns.length > 0 ?userColumns:pageColumns"
:key="item.key"
......@@ -56,6 +56,7 @@
<CollectFileManage ref="collectFileModal" @on-result-change="_page"></CollectFileManage>
<SelEquip ref="selEquip" @on-result-change="_equipResult"></SelEquip>
<CreateReport ref="createModal" @on-result-change="_certificateSelectExcelBack"></CreateReport>
<Reason ref="reasonModal" @on-result-change="_reasonResult" />
</div>
</template>
<script>
......@@ -69,6 +70,7 @@ import SelEquip from '../../../../components/select-equip/SelEquip'
import EquipManage from '../EquipManage'
import CollectManage from '../CollectManage'
import CollectFileManage from '../CollectFileManage'
import Reason from '../../../../components/base/Reason'
import CreateReport from './CreateReport'
export default {
components: {
......@@ -80,6 +82,7 @@ export default {
EquipManage,
CollectManage,
CollectFileManage,
Reason,
CreateReport
},
data() {
......@@ -126,16 +129,11 @@ export default {
},
{ type: 'success', id: '', name: '原始记录填写' },
{ type: 'success', id: '', name: '完成提交' },
{ type: 'success', id: '', name: '设备' }
],
btnPro: [
{ type: 'success', id: '', name: '填写原始记录' },
{ type: 'success', id: '', name: '设备' },
{ type: 'success', id: '', name: '完成提交' }
{ type: 'success', id: '', name: '退回' }
],
iconMsg: [
{ type: 'ios-book', id: '', name: '查看原始记录' },
// { type: 'md-eye', id: '', name: '原始记录查看/编辑' },
{ type: 'md-apps', id: '', name: '查看指标' },
{ type: 'ios-bookmarks', id: '', name: '查看采集数据' },
{ type: 'ios-browsers', id: '', name: '查看采集文件' },
......@@ -321,10 +319,6 @@ export default {
}
)
},
// 获取column
_getColumn() {
this.$refs.pageTable._getColByTableName()
},
// 重置column
_resetColumn(colList) {
this.userColumns = colList
......@@ -353,53 +347,11 @@ export default {
if (result) {
this.$Message.success('添加成功')
this.$refs.pageTable._hideLoading()
this._page()
await this._page()
} else {
this.$refs.pageTable._hideLoading()
}
},
// 从字典查预警期
_dicSearch() {
const data = ['食品检测预警天数', '食品默认计划完成时间']
this.$store.dispatch('LmsBaseDict/listDict', data).then(() => {
const result = this.$store.state.LmsBaseDict.list
// eslint-disable-next-line camelcase
const result_1 = result[0]
// eslint-disable-next-line camelcase
const result_2 = result[1]
// 1食品检测预警天数
if (result_1.length !== 0) {
this.warningValue = result_1[0].name
}
// 2食品默认计划完成时间
this.defaultPlanDate =
result_2.length !== 0
? result_2[0].name === '是'
? (this.defaultPlanDate = true)
: (this.defaultPlanDate = false)
: (this.defaultPlanDate = false)
})
},
_selInputResult1(msg, data) {
switch (msg) {
case 'keyword':
this.$refs.selInput2._setCompareKeyword(data)
break
case 'search':
this._formSearch()
break
}
},
_selInputResult2(msg, data) {
switch (msg) {
case 'keyword':
this.$refs.selInput1._setCompareKeyword(data)
break
case 'search':
this._formSearch()
break
}
},
_modalResult(data) {
switch (this.currentComponent) {
case 'AssignPerson':
......@@ -409,13 +361,6 @@ export default {
this._userResult(data)
}
break
case 'EndDateModal':
// if(this.defaultPlanDate){
// this._endDate()
// } else {
this._page()
// }
break
case 'UserGroup':
this._userGroupResult(data)
break
......@@ -423,62 +368,13 @@ export default {
this._page()
}
},
// 为 true时,有字典按人分配
_trueDefault(data) {
const tempData = {
ids: this.selectIds.join(','),
personId: data.userId,
personName: data.realname,
groupId: data.groupId,
groupName: data.groupName
}
Object.assign(tempData, { planDate: null })
this.$store.dispatch('FoodItem/personAllot', tempData).then(() => {
if (this.$store.state.FoodItem.success) {
this.sampleNames = ''
this._page()
this._resultChange('分配成功!')
}
})
},
// 设置时间
_endDate() {
if (this.selectIds.length === 0) {
this.$Message.warning('请至少选择一条数据!')
} else {
const user = Global.getUserInfo('userInfo')
this.currentComponent = 'AssignPerson'
this.$nextTick(function() {
this.$refs.refModal._openGoupByUserId('分配人员', user.id, 'itemTree')
})
}
},
// 调整分组
_userGroupResult(data) {
const tempData = {
groupId: data.id,
groupName: data.name,
ids: this.selectIds.join(',')
}
this.$store.dispatch('FoodItem/adjustTestGroup', tempData).then(() => {
this._resultChange('调整成功')
})
},
_resultChange(msg) {
this.$Message.success(msg)
this._page()
this.$emit('on-result-change')
},
async _btnClick(msg) {
_btnClick(msg) {
switch (msg) {
case '按人分配':
this._allotByPerson()
// await this._reportDueDate()
// await this._userAssign()
break
case '试验项目分配':
this._userAssign()
break
case '填写原始记录':
this._addRecord()
break
......@@ -491,31 +387,37 @@ export default {
case '设备':
this._selectEquipment()
break
case '按组分配':
await this._reportDueDate()
await this._groupAssign()
break
case '调整分组':
if (this.selectIds.length === 0) {
this.$Message.warning('请至少选择=一条数据')
} else {
this.currentComponent = 'UserGroup'
this.$nextTick(() => {
this.$refs.refModal._open()
})
}
break
case '设置计划完成时间':
this.currentComponent = 'EndDateModal'
this.$nextTick(function() {
this._changeDate()
})
break
case '信息维护':
this._maintainInfo()
case '退回':
this._goBack()
break
}
},
_goBack() {
// 退回
if (this.selectIds.length === 0) {
this.$Message.warning('请至少选择一条委托!')
} else {
this.$refs.reasonModal._open('退回原因')
}
},
_reasonResult(data) {
if (undefined !== data && data !== '') {
this._reportCheckBack(data)
}
},
_reportCheckBack: async function(data) {
const result = await soilSample.testInputBack({
ids: this.selectIds,
remark: data
})
if (result) {
this.$Message.success('退回成功!')
this.$emit('on-result-change')
await this._page()
}
},
_selectEquipment() {
if (this.selectIds.length === 0) {
this.$Message.warning('请至少选择一条数据!')
......
......@@ -33,6 +33,9 @@
<div v-if="item.key === 'name'" :style="{color:colorComputed(scope.row.planEndDate)}">
{{scope.row[item.key]}}
</div>
<div v-else-if="item.key==='progress'">
{{ scope.row[item.key].display }}
</div>
<a v-else-if="item.key==='code'" @click.stop="_detailModal(scope.row)">{{scope.row[item.key]}}</a>
<a v-else-if="item.key==='num'" @click.stop="_sampleDetail(scope.row)">{{scope.row[item.key]}}</a>
<span
......@@ -104,6 +107,7 @@ export default {
getPage: {},
pageColumns: [
{ title: '检测项目', key: 'name', width: 120, fixed: 'left' },
{ title: '状态', key: 'progress', width: 120 },
{ title: '试样编号', key: 'sampleCode', width: 180 },
{ title: '试样深度', key: 'sampleDepth', width: 180 },
{ title: '试样包装类型', key: 'samplePack', width: 180 },
......
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