Commit f14f3dce by wangweidong

土工试验Lims

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