Commit ac6411a8 by lichengming

修改了试样管理

parent 5959c96a
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
* 组织表相关 * 组织表相关
*/ */
// import Global from '../config'
import http from '../http' import http from '../http'
export default { export default {
...@@ -18,5 +19,7 @@ export default { ...@@ -18,5 +19,7 @@ export default {
// 分配机构ztree // 分配机构ztree
orginTreeList: () => http.post('/base/v1/org/org_tree').then(res => res), 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 { ...@@ -272,7 +272,8 @@ export default {
this._changeTags() this._changeTags()
} else { } 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 BASE_URL=http://api.dev.patzn.com:7000
SSO_URL=http://api.dev.patzn.com:7000 SSO_URL=http://api.dev.patzn.com:7000
STATIC_URL=http://static.patzn.com STATIC_URL=http://static.patzn.com
......
...@@ -47,12 +47,10 @@ ...@@ -47,12 +47,10 @@
</Row> </Row>
</div> </div>
</div> </div>
<PhotoManage ref="PhotoManage"></PhotoManage> <keep-alive>
<FileManage ref="FileManage"></FileManage> <!-- eslint-disable-next-line vue/require-component-is -->
<Operation ref="operationModal"></Operation> <component ref="refModal" :is="currentComponent" @on-result-change="_componentResult"></component>
<SamplePreparationEdit ref="editModal" @on-result-change="_formSearch"></SamplePreparationEdit> </keep-alive>
<SoilSampleManage ref="sampleManageModal" @on-result-change="_page"></SoilSampleManage>
<SoilSampleItemManageEdit ref="itemManageModal" @on-result-change="_page"></SoilSampleItemManageEdit>
</div> </div>
</template> </template>
<script> <script>
...@@ -64,9 +62,13 @@ import SamplePreparationEdit from './SamplePreparationEdit' ...@@ -64,9 +62,13 @@ import SamplePreparationEdit from './SamplePreparationEdit'
import SoilSampleItemManageEdit from './SoilSampleItemManageEdit' import SoilSampleItemManageEdit from './SoilSampleItemManageEdit'
export default { export default {
components: { components: {
// eslint-disable-next-line vue/no-unused-components
Operation, Operation,
// eslint-disable-next-line vue/no-unused-components
SamplePreparationEdit, SamplePreparationEdit,
// eslint-disable-next-line vue/no-unused-components
SoilSampleManage, SoilSampleManage,
// eslint-disable-next-line vue/no-unused-components
SoilSampleItemManageEdit SoilSampleItemManageEdit
}, },
data() { data() {
...@@ -216,10 +218,19 @@ export default { ...@@ -216,10 +218,19 @@ export default {
} }
}) })
}, },
_componentResult(data, msg) {
switch (this.currentComponent) {
default:
this._page()
}
},
_sampleManage(data) { _sampleManage(data) {
// 管理样品 // 管理样品
this.$refs.sampleManageModal._open(data) this.currentComponent = 'SoilSampleManage'
this.$nextTick(() => {
this.$refs.refModal._open(data)
})
// this.$refs.sampleManageModal._open(data)
}, },
_submitToReview() { _submitToReview() {
this._submitByContractIds('委托评审') this._submitByContractIds('委托评审')
...@@ -271,7 +282,11 @@ export default { ...@@ -271,7 +282,11 @@ export default {
this._page() this._page()
}, },
_record(id) { _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) { _tableResultChange(msg, data) {
switch (msg) { switch (msg) {
...@@ -325,16 +340,28 @@ export default { ...@@ -325,16 +340,28 @@ export default {
}, },
// 追加项目 // 追加项目
_itemManage(data) { _itemManage(data) {
this.$refs.itemManageModal._openByEntrustId(data) this.currentComponent = 'SoilSampleItemManageEdit'
this.$nextTick(() => {
this.$refs.refModal._openByEntrustId(data)
})
// this.$refs.itemManageModal._openByEntrustId(data)
}, },
_uploadPhoto(id) { _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) { _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) { _exportEntrust(id) {
this.$Modal.confirm({ this.$Modal.confirm({
......
...@@ -49,10 +49,14 @@ ...@@ -49,10 +49,14 @@
</Row> </Row>
</div> </div>
</div> </div>
<MeterEntrustRecord ref="entrustRecordModal" @on-result-change="_page"></MeterEntrustRecord> <!-- <MeterEntrustRecord ref="entrustRecordModal" @on-result-change="_page"></MeterEntrustRecord>-->
<SoilSampleManageHis ref="sampleManageModal" @on-result-change="_page"></SoilSampleManageHis> <!-- <SoilSampleManageHis ref="sampleManageModal" @on-result-change="_page"></SoilSampleManageHis>-->
<PhotoManage ref="photoManage"></PhotoManage> <!-- <PhotoManage ref="photoManage"></PhotoManage>-->
<FileManage ref="fileManage"></FileManage> <!-- <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> </div>
</template> </template>
<script> <script>
...@@ -60,6 +64,7 @@ import { soilAptitude, soilEntrust } from '../../../api' ...@@ -60,6 +64,7 @@ import { soilAptitude, soilEntrust } from '../../../api'
import MeterEntrustRecord from '../../../components/operation/Operation' import MeterEntrustRecord from '../../../components/operation/Operation'
import SoilSampleManageHis from '../SoilSampleManageHis' import SoilSampleManageHis from '../SoilSampleManageHis'
export default { export default {
// eslint-disable-next-line vue/no-unused-components
components: { SoilSampleManageHis, MeterEntrustRecord }, components: { SoilSampleManageHis, MeterEntrustRecord },
data() { data() {
return { return {
...@@ -176,12 +181,26 @@ export default { ...@@ -176,12 +181,26 @@ export default {
} }
}) })
}, },
_componentResult(data, msg) {
switch (this.currentComponent) {
default:
this._page()
}
},
_sampleManage(data) { _sampleManage(data) {
this.currentComponent = 'SoilSampleManageHis'
this.$nextTick(() => {
this.$refs.refModal._open(data)
})
// 管理样品 // 管理样品
this.$refs.sampleManageModal._open(data) // this.$refs.sampleManageModal._open(data)
}, },
_record(id) { _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) { _tableResultChange(msg, data) {
switch (msg) { switch (msg) {
...@@ -231,11 +250,19 @@ export default { ...@@ -231,11 +250,19 @@ export default {
this.$refs.refModal._open(data) this.$refs.refModal._open(data)
}, },
_upLoadPhoto(id) { _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) { _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) { _getById: async function(id) {
const result = await soilAptitude.getById(id) const result = await soilAptitude.getById(id)
......
...@@ -2,14 +2,22 @@ ...@@ -2,14 +2,22 @@
<div> <div>
<div class="layout-content-padding"> <div class="layout-content-padding">
<div class="layout-content-main"> <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-tabs v-model="activeName" @tab-click="_changeTabs">
<el-tab-pane label="待完成" name="wait"> <el-tab-pane label="待完成" name="wait"></el-tab-pane>
<MeterSendEntrust ref="waitTabs"></MeterSendEntrust> <el-tab-pane label="历史记录" name="his"></el-tab-pane>
</el-tab-pane>
<el-tab-pane label="历史记录" name="his">
<MeterSendEntrustHis ref="hisTabs"></MeterSendEntrustHis>
</el-tab-pane>
</el-tabs> </el-tabs>
<keep-alive>
<!-- eslint-disable-next-line vue/require-component-is -->
<component ref="refModal" :is="currentComponent"></component>
</keep-alive>
</div> </div>
</div> </div>
</div> </div>
...@@ -19,13 +27,12 @@ import MeterSendEntrust from './SamplePreparation' ...@@ -19,13 +27,12 @@ import MeterSendEntrust from './SamplePreparation'
import MeterSendEntrustHis from './SamplePreparationHis' import MeterSendEntrustHis from './SamplePreparationHis'
export default { export default {
name: 'MeterSendEntrustIndex', name: 'MeterSendEntrustIndex',
components: { // eslint-disable-next-line vue/no-unused-components
MeterSendEntrust, components: { MeterSendEntrust, MeterSendEntrustHis },
MeterSendEntrustHis
},
data() { data() {
return { return {
activeName: 'wait' activeName: 'wait',
currentComponent: ''
} }
}, },
mounted() { mounted() {
...@@ -37,11 +44,18 @@ export default { ...@@ -37,11 +44,18 @@ export default {
if (tab.name === 'wait') { if (tab.name === 'wait') {
this._page() this._page()
} else { } else {
this.$refs.hisTabs._page() this.currentComponent = 'MeterSendEntrustHis'
this.$nextTick(() => {
this.$refs.refModal._page()
})
} }
}, },
_page() { _page() {
this.$refs.waitTabs._page() this.currentComponent = 'MeterSendEntrust'
this.$nextTick(() => {
this.$refs.refModal._page()
})
// this.$refs.waitTabs._page()
} }
} }
} }
......
...@@ -2,14 +2,6 @@ ...@@ -2,14 +2,6 @@
<div> <div>
<div class="layout-content-padding"> <div class="layout-content-padding">
<div class="layout-content-main"> <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-tabs v-model="activeName" @tab-click="_changeTabs">
<el-tab-pane label="待完成" name="entrust"></el-tab-pane> <el-tab-pane label="待完成" name="entrust"></el-tab-pane>
<el-tab-pane label="历史记录" name="sample"></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