index.js 902 Bytes
Newer Older
fukai committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
import Api from '~/service/Api';
import commonFunctions from '~/mixin/commonFunctions.js';
export default {
	mixins: [commonFunctions],
	methods: {
		initDoctre (requestParams) {
			this.model.trnmod.buildParams = requestParams
			this.processDoctre()
		},
		buildDoctre () {
			let params = {
				...this.model.trnmod.buildParams,
			};
			return params
		},
		async processDoctre() {
			const loading = this.loading('正在请求数据');
			let doctreRequest = this.buildDoctre()
			let objtyp = doctreRequest.rec.objtyp;
			doctreRequest.sptinr = this.$route.query.businessInr || ''
			let rtnmsg = await Api.post(`/${this.moduleRouter()}/${objtyp.toLowerCase()}/doctre/assertDoctre`, doctreRequest);
			if (rtnmsg.respCode == SUCCESS) {
				this.$set(this.model, 'shwinc', rtnmsg.data.shwinc || [])
				this.$set(this.model, 'shwout', rtnmsg.data.shwout || [])
			}
			loading.close();
		},
	}
};