Commit ac6411a8 by lichengming

修改了试样管理

parent 5959c96a
......@@ -2,6 +2,7 @@
* 组织表相关
*/
// import Global from '../config'
import http from '../http'
export default {
......@@ -18,5 +19,7 @@ export default {
// 分配机构ztree
orginTreeList: () => http.post('/base/v1/org/org_tree').then(res => res),
// 当前用户所在部门
getOrg: () => http.get('/base/v1/org/current').then(res => res)
getOrg: () => http.get('/base/v1/org/current').then(res => res),
// 首页模块
getModulesList: () => http.post('/base/v1/module/list_user_module_food')
}
......@@ -272,7 +272,8 @@ export default {
this._changeTags()
} else {
// 其他
window.open(global.webURL + '/#/sysmanage?query=' + data, '_blank')
// window.open(global.webURL + '/#/sysmanage?query=' + data, '_blank')
window.open(global.webURL + '/sys/personal_data/my_home', '_blank')
}
},
// 多标签
......
// 请求地址
WEB_URL=http://web.dev.patzn.com:8028
WEB_URL=http://web.dev.patzn.com:8096
BASE_URL=http://api.dev.patzn.com:7000
SSO_URL=http://api.dev.patzn.com:7000
STATIC_URL=http://static.patzn.com
......
......@@ -47,12 +47,10 @@
</Row>
</div>
</div>
<PhotoManage ref="PhotoManage"></PhotoManage>
<FileManage ref="FileManage"></FileManage>
<Operation ref="operationModal"></Operation>
<SamplePreparationEdit ref="editModal" @on-result-change="_formSearch"></SamplePreparationEdit>
<SoilSampleManage ref="sampleManageModal" @on-result-change="_page"></SoilSampleManage>
<SoilSampleItemManageEdit ref="itemManageModal" @on-result-change="_page"></SoilSampleItemManageEdit>
<keep-alive>
<!-- eslint-disable-next-line vue/require-component-is -->
<component ref="refModal" :is="currentComponent" @on-result-change="_componentResult"></component>
</keep-alive>
</div>
</template>
<script>
......@@ -64,9 +62,13 @@ import SamplePreparationEdit from './SamplePreparationEdit'
import SoilSampleItemManageEdit from './SoilSampleItemManageEdit'
export default {
components: {
// eslint-disable-next-line vue/no-unused-components
Operation,
// eslint-disable-next-line vue/no-unused-components
SamplePreparationEdit,
// eslint-disable-next-line vue/no-unused-components
SoilSampleManage,
// eslint-disable-next-line vue/no-unused-components
SoilSampleItemManageEdit
},
data() {
......@@ -216,10 +218,19 @@ export default {
}
})
},
_componentResult(data, msg) {
switch (this.currentComponent) {
default:
this._page()
}
},
_sampleManage(data) {
// 管理样品
this.$refs.sampleManageModal._open(data)
this.currentComponent = 'SoilSampleManage'
this.$nextTick(() => {
this.$refs.refModal._open(data)
})
// this.$refs.sampleManageModal._open(data)
},
_submitToReview() {
this._submitByContractIds('委托评审')
......@@ -271,7 +282,11 @@ export default {
this._page()
},
_record(id) {
this.$refs.operationModal._open(id)
this.currentComponent = 'Operation'
this.$nextTick(() => {
this.$refs.refModal._open(id)
})
// this.$refs.operationModal._open(id)
},
_tableResultChange(msg, data) {
switch (msg) {
......@@ -325,16 +340,28 @@ export default {
},
// 追加项目
_itemManage(data) {
this.$refs.itemManageModal._openByEntrustId(data)
this.currentComponent = 'SoilSampleItemManageEdit'
this.$nextTick(() => {
this.$refs.refModal._openByEntrustId(data)
})
// this.$refs.itemManageModal._openByEntrustId(data)
},
_uploadPhoto(id) {
// 上传照片文件
this.$refs.PhotoManage._open(id, 'entrustId')
this.currentComponent = 'PhotoManage'
this.$nextTick(() => {
this.$refs.refModal._open(id, 'entrustId')
})
// this.$refs.PhotoManage._open(id, 'entrustId')
},
_upload(id) {
// 上传照片文件
this.$refs.FileManage._open(id, 'entrustId')
this.currentComponent = 'FileManage'
this.$nextTick(() => {
this.$refs.refModal._open(id, 'entrustId')
})
// this.$refs.FileManage._open(id, 'entrustId')
},
_exportEntrust(id) {
this.$Modal.confirm({
......
......@@ -49,10 +49,14 @@
</Row>
</div>
</div>
<MeterEntrustRecord ref="entrustRecordModal" @on-result-change="_page"></MeterEntrustRecord>
<SoilSampleManageHis ref="sampleManageModal" @on-result-change="_page"></SoilSampleManageHis>
<PhotoManage ref="photoManage"></PhotoManage>
<FileManage ref="fileManage"></FileManage>
<!-- <MeterEntrustRecord ref="entrustRecordModal" @on-result-change="_page"></MeterEntrustRecord>-->
<!-- <SoilSampleManageHis ref="sampleManageModal" @on-result-change="_page"></SoilSampleManageHis>-->
<!-- <PhotoManage ref="photoManage"></PhotoManage>-->
<!-- <FileManage ref="fileManage"></FileManage>-->
<keep-alive>
<!-- eslint-disable-next-line vue/require-component-is -->
<component ref="refModal" :is="currentComponent" @on-result-change="_componentResult"></component>
</keep-alive>
</div>
</template>
<script>
......@@ -60,6 +64,7 @@ import { soilAptitude, soilEntrust } from '../../../api'
import MeterEntrustRecord from '../../../components/operation/Operation'
import SoilSampleManageHis from '../SoilSampleManageHis'
export default {
// eslint-disable-next-line vue/no-unused-components
components: { SoilSampleManageHis, MeterEntrustRecord },
data() {
return {
......@@ -176,12 +181,26 @@ export default {
}
})
},
_componentResult(data, msg) {
switch (this.currentComponent) {
default:
this._page()
}
},
_sampleManage(data) {
this.currentComponent = 'SoilSampleManageHis'
this.$nextTick(() => {
this.$refs.refModal._open(data)
})
// 管理样品
this.$refs.sampleManageModal._open(data)
// this.$refs.sampleManageModal._open(data)
},
_record(id) {
this.$refs.entrustRecordModal._open(id)
this.currentComponent = 'MeterEntrustRecord'
this.$nextTick(() => {
this.$refs.refModal._open(id)
})
// this.$refs.entrustRecordModal._open(id)
},
_tableResultChange(msg, data) {
switch (msg) {
......@@ -231,11 +250,19 @@ export default {
this.$refs.refModal._open(data)
},
_upLoadPhoto(id) {
this.$refs.photoManage._open(id, 'entrustId')
this.currentComponent = 'PhotoManage'
this.$nextTick(() => {
this.$refs.refModal._open(id, 'entrustId')
})
// this.$refs.photoManage._open(id, 'entrustId')
},
_upload(id) {
// 上传文件
this.$refs.fileManage._open(id, 'entrustId')
this.currentComponent = 'FileManage'
this.$nextTick(() => {
this.$refs.refModal._open(id, 'entrustId')
})
// this.$refs.fileManage._open(id, 'entrustId')
},
_getById: async function(id) {
const result = await soilAptitude.getById(id)
......
......@@ -2,14 +2,22 @@
<div>
<div class="layout-content-padding">
<div class="layout-content-main">
<!-- <el-tabs v-model="activeName" @tab-click="_changeTabs">-->
<!-- <el-tab-pane label="待完成" name="wait">-->
<!-- <MeterSendEntrust ref="waitTabs"></MeterSendEntrust>-->
<!-- </el-tab-pane>-->
<!-- <el-tab-pane label="历史记录" name="his">-->
<!-- <MeterSendEntrustHis ref="hisTabs"></MeterSendEntrustHis>-->
<!-- </el-tab-pane>-->
<!-- </el-tabs>-->
<el-tabs v-model="activeName" @tab-click="_changeTabs">
<el-tab-pane label="待完成" name="wait">
<MeterSendEntrust ref="waitTabs"></MeterSendEntrust>
</el-tab-pane>
<el-tab-pane label="历史记录" name="his">
<MeterSendEntrustHis ref="hisTabs"></MeterSendEntrustHis>
</el-tab-pane>
<el-tab-pane label="待完成" name="wait"></el-tab-pane>
<el-tab-pane label="历史记录" name="his"></el-tab-pane>
</el-tabs>
<keep-alive>
<!-- eslint-disable-next-line vue/require-component-is -->
<component ref="refModal" :is="currentComponent"></component>
</keep-alive>
</div>
</div>
</div>
......@@ -19,13 +27,12 @@ import MeterSendEntrust from './SamplePreparation'
import MeterSendEntrustHis from './SamplePreparationHis'
export default {
name: 'MeterSendEntrustIndex',
components: {
MeterSendEntrust,
MeterSendEntrustHis
},
// eslint-disable-next-line vue/no-unused-components
components: { MeterSendEntrust, MeterSendEntrustHis },
data() {
return {
activeName: 'wait'
activeName: 'wait',
currentComponent: ''
}
},
mounted() {
......@@ -37,11 +44,18 @@ export default {
if (tab.name === 'wait') {
this._page()
} else {
this.$refs.hisTabs._page()
this.currentComponent = 'MeterSendEntrustHis'
this.$nextTick(() => {
this.$refs.refModal._page()
})
}
},
_page() {
this.$refs.waitTabs._page()
this.currentComponent = 'MeterSendEntrust'
this.$nextTick(() => {
this.$refs.refModal._page()
})
// this.$refs.waitTabs._page()
}
}
}
......
......@@ -2,14 +2,6 @@
<div>
<div class="layout-content-padding">
<div class="layout-content-main">
<!-- <el-tabs v-model="activeName" @tab-click="_changeTabs">-->
<!-- <el-tab-pane label="按委托接收" name="entrust">-->
<!-- <ReceiveByEntrust ref="entrustTabs"></ReceiveByEntrust>-->
<!-- </el-tab-pane>-->
<!-- <el-tab-pane label="接收历史" name="sample">-->
<!-- <ReceiveBySample ref="sampleTabs"></ReceiveBySample>-->
<!-- </el-tab-pane>-->
<!-- </el-tabs>-->
<el-tabs v-model="activeName" @tab-click="_changeTabs">
<el-tab-pane label="待完成" name="entrust"></el-tab-pane>
<el-tab-pane label="历史记录" name="sample"></el-tab-pane>
......
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