Commit 06cfbc6f authored by 何虹's avatar 何虹 💬

优化参照

parent 1d2d4145
...@@ -5,7 +5,7 @@ import commonUtility from './commonUtility' ...@@ -5,7 +5,7 @@ import commonUtility from './commonUtility'
import _ from 'lodash' import _ from 'lodash'
import hswebapp2frame from 'hswebapp2frame' import hswebapp2frame from 'hswebapp2frame'
let fullLoading let fullLoading
function showLoading () { function showLoading() {
fullLoading = Loading.service({ fullLoading = Loading.service({
lock: true, lock: true,
text: '加载中...', text: '加载中...',
...@@ -16,17 +16,17 @@ function showLoading () { ...@@ -16,17 +16,17 @@ function showLoading () {
fullLoading.close() fullLoading.close()
}, 10000) }, 10000)
} }
function closeLoading () { function closeLoading() {
fullLoading && fullLoading.close() fullLoading && fullLoading.close()
} }
let loading_request_count = 0 let loading_request_count = 0
function show_full_screen_loading () { function show_full_screen_loading() {
if (loading_request_count === 0) { if (loading_request_count === 0) {
showLoading() showLoading()
} }
loading_request_count++ loading_request_count++
} }
function hide_full_screen_loading () { function hide_full_screen_loading() {
if (loading_request_count <= 0) return if (loading_request_count <= 0) return
loading_request_count-- loading_request_count--
if (loading_request_count === 0) { if (loading_request_count === 0) {
...@@ -35,7 +35,7 @@ function hide_full_screen_loading () { ...@@ -35,7 +35,7 @@ function hide_full_screen_loading () {
} }
// 增加一个response拦截器 // 增加一个response拦截器
axios.interceptors.response.use( axios.interceptors.response.use(
function (response) { function(response) {
hide_full_screen_loading() hide_full_screen_loading()
if (response.data) { if (response.data) {
const { error_detail, error_title } = response.data const { error_detail, error_title } = response.data
...@@ -58,7 +58,7 @@ axios.interceptors.response.use( ...@@ -58,7 +58,7 @@ axios.interceptors.response.use(
return response return response
} }
}, },
function (error) { function(error) {
hide_full_screen_loading() hide_full_screen_loading()
if (self === top) { if (self === top) {
dyncInnerErrorDel(error) dyncInnerErrorDel(error)
...@@ -68,7 +68,7 @@ axios.interceptors.response.use( ...@@ -68,7 +68,7 @@ axios.interceptors.response.use(
return Promise.reject(error) return Promise.reject(error)
} }
) )
function dyncInnerErrorDel (error) { function dyncInnerErrorDel(error) {
if (error.message === 'Network Error') { if (error.message === 'Network Error') {
Notification.error({ Notification.error({
title: '错误信息!', title: '错误信息!',
...@@ -104,7 +104,7 @@ function dyncInnerErrorDel (error) { ...@@ -104,7 +104,7 @@ function dyncInnerErrorDel (error) {
}) })
} }
} }
function response_error_del (error) { function response_error_del(error) {
const { response, code } = error const { response, code } = error
const { status, statusText, data } = response || {} const { status, statusText, data } = response || {}
let error_title = '错误信息' let error_title = '错误信息'
...@@ -134,8 +134,8 @@ function response_error_del (error) { ...@@ -134,8 +134,8 @@ function response_error_del (error) {
// 这条判断是解决 下载文件返回流的情况 要把流转成json // 这条判断是解决 下载文件返回流的情况 要把流转成json
const reader = new FileReader() const reader = new FileReader()
reader.readAsText(data) reader.readAsText(data)
const dealFileReader = async function () { const dealFileReader = async function() {
const result = await new Promise(function (resolve, reject) { const result = await new Promise(function(resolve, reject) {
reader.onload = e => { reader.onload = e => {
resolve(JSON.parse(e.target.result)) resolve(JSON.parse(e.target.result))
} }
...@@ -198,7 +198,7 @@ const bill_close_bills = `${commonUtilAPI}close_bills/` ...@@ -198,7 +198,7 @@ const bill_close_bills = `${commonUtilAPI}close_bills/`
const bill_un_close_bills = `${commonUtilAPI}un_close_bills/` const bill_un_close_bills = `${commonUtilAPI}un_close_bills/`
const bill_send_bills = `${commonUtilAPI}send_bills/` const bill_send_bills = `${commonUtilAPI}send_bills/`
const bill_un_send_bills = `${commonUtilAPI}un_send_bills/` const bill_un_send_bills = `${commonUtilAPI}un_send_bills/`
function getPageParms () { function getPageParms() {
const { db_name, is_mock, db_code } = commonUtility.parseUrlQueryString() const { db_name, is_mock, db_code } = commonUtility.parseUrlQueryString()
const { appCode, pagename } = commonUtility.parseUrlQueryBIDyncAppcodePageName() const { appCode, pagename } = commonUtility.parseUrlQueryBIDyncAppcodePageName()
const isMock = emptyList.includes(is_mock) ? 1 : is_mock const isMock = emptyList.includes(is_mock) ? 1 : is_mock
...@@ -213,9 +213,9 @@ function getPageParms () { ...@@ -213,9 +213,9 @@ function getPageParms () {
return obj return obj
} }
const API = { const API = {
runAsync (url, routerParms = {}, on_off = false) { runAsync(url, routerParms = {}, on_off = false) {
let str = '' let str = ''
var p = new Promise(function (resolve, reject) { var p = new Promise(function(resolve, reject) {
if (!on_off) { if (!on_off) {
const { page, isMock, dbName, db_code } = getPageParms() const { page, isMock, dbName, db_code } = getPageParms()
const sPag = routerParms.page || page const sPag = routerParms.page || page
...@@ -265,7 +265,7 @@ const API = { ...@@ -265,7 +265,7 @@ const API = {
}) })
return p return p
}, },
getData (data) { // routerParms: page路由 position位置 other参数 getData(data) { // routerParms: page路由 position位置 other参数
const { appCode, page, isMock, dbName: db_Name, db_code } = getPageParms() const { appCode, page, isMock, dbName: db_Name, db_code } = getPageParms()
const { sAppCode: sAppCode_, sPage: sPage_, sControl: sControl_, isMock: is_mock, dbName, elInfo: elInfo_, other } = data const { sAppCode: sAppCode_, sPage: sPage_, sControl: sControl_, isMock: is_mock, dbName, elInfo: elInfo_, other } = data
const db_name = dbName || db_Name || '' const db_name = dbName || db_Name || ''
...@@ -274,7 +274,7 @@ const API = { ...@@ -274,7 +274,7 @@ const API = {
const sAppCode = sAppCode_ || appCode const sAppCode = sAppCode_ || appCode
const sControl = sControl_ || elInfo.position const sControl = sControl_ || elInfo.position
const isMock_ = typeof is_mock !== 'undefined' ? is_mock : (isMock || 1) const isMock_ = typeof is_mock !== 'undefined' ? is_mock : (isMock || 1)
var p = new Promise(function (resolve, reject) { var p = new Promise(function(resolve, reject) {
const postData = { const postData = {
exec_sql: `EXEC dbo.spappCommonQuery_Data @sAppCode='${sAppCode}',@sPage='${sPage}',@sControl='${sControl}',@sParam='${other ? JSON.stringify(other) : '0x'}',@bMockData=${isMock_}`, exec_sql: `EXEC dbo.spappCommonQuery_Data @sAppCode='${sAppCode}',@sPage='${sPage}',@sControl='${sControl}',@sParam='${other ? JSON.stringify(other) : '0x'}',@bMockData=${isMock_}`,
db_name: db_name, db_name: db_name,
...@@ -298,7 +298,7 @@ const API = { ...@@ -298,7 +298,7 @@ const API = {
}) })
return p return p
}, },
getConfig (data) { getConfig(data) {
const { appCode, page, dbName: db_Name, db_code } = getPageParms() const { appCode, page, dbName: db_Name, db_code } = getPageParms()
const { sAppCode: sAppCode_, sPage: sPage_, sControl: sControl_, dbName, elInfo: elInfo_, other } = data const { sAppCode: sAppCode_, sPage: sPage_, sControl: sControl_, dbName, elInfo: elInfo_, other } = data
const elInfo = elInfo_ || {} const elInfo = elInfo_ || {}
...@@ -307,7 +307,7 @@ const API = { ...@@ -307,7 +307,7 @@ const API = {
const sAppCode = sAppCode_ || appCode const sAppCode = sAppCode_ || appCode
const sControl = sControl_ || elInfo.position const sControl = sControl_ || elInfo.position
const otherParm = other ? JSON.stringify(other) : '0x' const otherParm = other ? JSON.stringify(other) : '0x'
var p = new Promise(function (resolve, reject) { var p = new Promise(function(resolve, reject) {
const postData = { const postData = {
exec_sql: `EXEC dbo.spappCommonQuery_Config @sAppCode='${sAppCode}',@sPage='${sPage}',@sControl='${sControl}',@sParam='${otherParm}'`, exec_sql: `EXEC dbo.spappCommonQuery_Config @sAppCode='${sAppCode}',@sPage='${sPage}',@sControl='${sControl}',@sParam='${otherParm}'`,
db_name: db_name, db_name: db_name,
...@@ -321,11 +321,11 @@ const API = { ...@@ -321,11 +321,11 @@ const API = {
}) })
return p return p
}, },
runSave (data) { // routerParms: page路由 position位置 other参数, sConfig 配置json sData 数据json runSave(data) { // routerParms: page路由 position位置 other参数, sConfig 配置json sData 数据json
const { sAppCode: sAppCode_, sPage: sPage_, sControl: sControl_, sConfig, sData, sQuerySql, is_mock, dbName, elInfo } = data const { sAppCode: sAppCode_, sPage: sPage_, sControl: sControl_, sConfig, sData, sQuerySql, is_mock, dbName, elInfo } = data
const control_type = (elInfo && elInfo.el) || '' const control_type = (elInfo && elInfo.el) || ''
const { appCode, page, isMock, dbName: db_Name, db_code } = getPageParms() const { appCode, page, isMock, dbName: db_Name, db_code } = getPageParms()
var p = new Promise(function (resolve, reject) { var p = new Promise(function(resolve, reject) {
const db_name = dbName || (elInfo && elInfo.db_name) || db_Name || '' const db_name = dbName || (elInfo && elInfo.db_name) || db_Name || ''
const sPage = sPage_ || (elInfo && elInfo.page) || page || '' const sPage = sPage_ || (elInfo && elInfo.page) || page || ''
const sAppCode = sAppCode_ || (elInfo && elInfo.sAppCode) || appCode const sAppCode = sAppCode_ || (elInfo && elInfo.sAppCode) || appCode
...@@ -366,12 +366,12 @@ const API = { ...@@ -366,12 +366,12 @@ const API = {
}) })
return p return p
}, },
getSql (data) { getSql(data) {
const { sAppCode: sAppCode_, sPage: sPage_, sControl: sControl_, dbName } = data const { sAppCode: sAppCode_, sPage: sPage_, sControl: sControl_, dbName } = data
const { appCode, page, dbName: db_Name, db_code } = getPageParms() const { appCode, page, dbName: db_Name, db_code } = getPageParms()
const globalParams = commonUtility.parseGlobalParams() const globalParams = commonUtility.parseGlobalParams()
const user_id = globalParams.user_id || 1 const user_id = globalParams.user_id || 1
var p = new Promise(function (resolve, reject) { var p = new Promise(function(resolve, reject) {
const db_name = dbName || db_Name || '' const db_name = dbName || db_Name || ''
const sAppCode = sAppCode_ || appCode const sAppCode = sAppCode_ || appCode
const sPage = sPage_ || page || '' const sPage = sPage_ || page || ''
...@@ -387,7 +387,7 @@ const API = { ...@@ -387,7 +387,7 @@ const API = {
}) })
return p return p
}, },
download (name, data) { download(name, data) {
var urlObject = window.URL || window.webkitURL || window var urlObject = window.URL || window.webkitURL || window
var downloadData = new Blob([data]) var downloadData = new Blob([data])
var save_link = document.createElementNS('http://www.w3.org/1999/xhtml', 'a') var save_link = document.createElementNS('http://www.w3.org/1999/xhtml', 'a')
...@@ -395,7 +395,7 @@ const API = { ...@@ -395,7 +395,7 @@ const API = {
save_link.download = name save_link.download = name
this.fake_click(save_link) this.fake_click(save_link)
}, },
fake_click (obj) { fake_click(obj) {
var ev = document.createEvent('MouseEvents') var ev = document.createEvent('MouseEvents')
ev.initMouseEvent( ev.initMouseEvent(
'click', true, false, window, 0, 0, 0, 0, 0 'click', true, false, window, 0, 0, 0, 0, 0
...@@ -403,7 +403,7 @@ const API = { ...@@ -403,7 +403,7 @@ const API = {
) )
obj.dispatchEvent(ev) obj.dispatchEvent(ev)
}, },
downSql (data) { downSql(data) {
const { sAppCode: sAppCode_, sPage: sPage_, dbName } = data const { sAppCode: sAppCode_, sPage: sPage_, dbName } = data
const { appCode, page, dbName: db_Name, db_code } = getPageParms() const { appCode, page, dbName: db_Name, db_code } = getPageParms()
const db_name = dbName || db_Name || '' const db_name = dbName || db_Name || ''
...@@ -420,7 +420,7 @@ const API = { ...@@ -420,7 +420,7 @@ const API = {
this.download(`spappWebChartConfig_Upgrade_${sAppCode}_${sPage}.sql`, r_d) this.download(`spappWebChartConfig_Upgrade_${sAppCode}_${sPage}.sql`, r_d)
}) })
}, },
execSql (data) { execSql(data) {
var postData = {} var postData = {}
const { dbName: db_Name, db_code } = getPageParms() const { dbName: db_Name, db_code } = getPageParms()
if (typeof data === 'object') { if (typeof data === 'object') {
...@@ -438,20 +438,20 @@ const API = { ...@@ -438,20 +438,20 @@ const API = {
db_code db_code
} }
} }
var p = new Promise(function (resolve, reject) { var p = new Promise(function(resolve, reject) {
axios.post(module_url, postData).then(res => { axios.post(module_url, postData).then(res => {
resolve(res.data) resolve(res.data)
}) })
}) })
return p return p
}, },
getPageLog (data) { getPageLog(data) {
const { sAppCode: sAppCode_, sPage: sPage_, dbName, sControl } = data const { sAppCode: sAppCode_, sPage: sPage_, dbName, sControl } = data
const { appCode, page, dbName: db_Name, db_code } = getPageParms() const { appCode, page, dbName: db_Name, db_code } = getPageParms()
const db_name = dbName || db_Name || '' const db_name = dbName || db_Name || ''
const sAppCode = sAppCode_ || appCode const sAppCode = sAppCode_ || appCode
const sPage = sPage_ || page || '' const sPage = sPage_ || page || ''
var p = new Promise(function (resolve, reject) { var p = new Promise(function(resolve, reject) {
const postData = { const postData = {
exec_sql: `EXEC dbo.spappWebChartConfig_QueryLog @sAppCode='${sAppCode}',@sPageName='${sPage}',@sControlName='${sControl}'`, exec_sql: `EXEC dbo.spappWebChartConfig_QueryLog @sAppCode='${sAppCode}',@sPageName='${sPage}',@sControlName='${sControl}'`,
db_name: db_name, db_name: db_name,
...@@ -471,7 +471,7 @@ const API = { ...@@ -471,7 +471,7 @@ const API = {
}) })
return p return p
}, },
revertPageLog (data) { revertPageLog(data) {
const { sAppCode: sAppCode_, sPage: sPage_, dbName, sControl, version: version_ } = data const { sAppCode: sAppCode_, sPage: sPage_, dbName, sControl, version: version_ } = data
const { appCode, page, dbName: db_Name, db_code } = getPageParms() const { appCode, page, dbName: db_Name, db_code } = getPageParms()
const db_name = dbName || db_Name || '' const db_name = dbName || db_Name || ''
...@@ -479,7 +479,7 @@ const API = { ...@@ -479,7 +479,7 @@ const API = {
const sAppCode = sAppCode_ || appCode const sAppCode = sAppCode_ || appCode
const sPage = sPage_ || page || '' const sPage = sPage_ || page || ''
const version = version_ || '' const version = version_ || ''
var p = new Promise(function (resolve, reject) { var p = new Promise(function(resolve, reject) {
const postData = { const postData = {
exec_sql: `EXEC dbo.spappWebChartConfig_Revert @sAppCode='${sAppCode}',@sPageName='${sPage}',@sControlName='${sControl}',@iVersion='${version}'`, exec_sql: `EXEC dbo.spappWebChartConfig_Revert @sAppCode='${sAppCode}',@sPageName='${sPage}',@sControlName='${sControl}',@iVersion='${version}'`,
db_name: db_name, db_name: db_name,
...@@ -491,7 +491,7 @@ const API = { ...@@ -491,7 +491,7 @@ const API = {
}) })
return p return p
}, },
getPageInfo (data) { getPageInfo(data) {
const queryString = commonUtility.parseUrlQueryString() const queryString = commonUtility.parseUrlQueryString()
const { sAppCode: sAppCode_, sPage: sPage_, dbName, control_name, param, return_type, dbCode } = data const { sAppCode: sAppCode_, sPage: sPage_, dbName, control_name, param, return_type, dbCode } = data
const { appCode, page, dbName: db_Name, db_code } = getPageParms() const { appCode, page, dbName: db_Name, db_code } = getPageParms()
...@@ -525,7 +525,7 @@ const API = { ...@@ -525,7 +525,7 @@ const API = {
if (user_id) { if (user_id) {
datas.user_id = user_id datas.user_id = user_id
} }
var p = new Promise(function (resolve, reject) { var p = new Promise(function(resolve, reject) {
axios.post(`${module_query_page}`, datas).then(res => { axios.post(`${module_query_page}`, datas).then(res => {
if (!res) { if (!res) {
resolve([]) resolve([])
...@@ -540,7 +540,7 @@ const API = { ...@@ -540,7 +540,7 @@ const API = {
}) })
return p return p
}, },
getGqlData (data, url = module_Gql_query) { getGqlData(data, url = module_Gql_query) {
const { dbName: db_Name } = getPageParms() const { dbName: db_Name } = getPageParms()
let url_ = url let url_ = url
if (!url_.includes('?')) { if (!url_.includes('?')) {
...@@ -555,7 +555,7 @@ const API = { ...@@ -555,7 +555,7 @@ const API = {
} }
return axios.post(url_, data) return axios.post(url_, data)
}, },
saveGqlData (data, url = module_Gql_query_save) { saveGqlData(data, url = module_Gql_query_save) {
const { dbName: db_Name } = getPageParms() const { dbName: db_Name } = getPageParms()
let url_ = url let url_ = url
if (!url.includes('?')) { if (!url.includes('?')) {
...@@ -571,7 +571,7 @@ const API = { ...@@ -571,7 +571,7 @@ const API = {
} }
return axios.post(url_, data_) return axios.post(url_, data_)
}, },
parseUrlParams (queryParms = {}) { parseUrlParams(queryParms = {}) {
const urlQueryParams = commonUtility.parseUrlQueryString() const urlQueryParams = commonUtility.parseUrlQueryString()
let queryParms_str = '' let queryParms_str = ''
if (queryParms && typeof queryParms === 'object') { if (queryParms && typeof queryParms === 'object') {
...@@ -586,7 +586,7 @@ const API = { ...@@ -586,7 +586,7 @@ const API = {
return queryParms_str return queryParms_str
}, },
// 通过主键id 来查询值 // 通过主键id 来查询值
queryByParimaryKey (parms) { queryByParimaryKey(parms) {
const { tableName, id, appCode: appCode_, queryParms, group, dyncQueryParms } = parms const { tableName, id, appCode: appCode_, queryParms, group, dyncQueryParms } = parms
const menuParams = getPageParms() const menuParams = getPageParms()
const appCode__ = appCode_ || menuParams.appCode const appCode__ = appCode_ || menuParams.appCode
...@@ -600,7 +600,7 @@ const API = { ...@@ -600,7 +600,7 @@ const API = {
return axios.get(url_) return axios.get(url_)
}, },
// 保存 // 保存
save (data) { save(data) {
const { tableName, appCode: appCode_, bodyData, group, parms } = data const { tableName, appCode: appCode_, bodyData, group, parms } = data
const { appCode } = getPageParms() const { appCode } = getPageParms()
const queryParms_str = this.parseUrlParams(parms) const queryParms_str = this.parseUrlParams(parms)
...@@ -612,7 +612,7 @@ const API = { ...@@ -612,7 +612,7 @@ const API = {
url = url + '?' + queryParms_str url = url + '?' + queryParms_str
return axios.post(url, bodyData) return axios.post(url, bodyData)
}, },
put (data) { put(data) {
const { tableName, appCode: appCode_, bodyData, group, parms } = data const { tableName, appCode: appCode_, bodyData, group, parms } = data
const { appCode } = getPageParms() const { appCode } = getPageParms()
const queryParms_str = this.parseUrlParams(parms) const queryParms_str = this.parseUrlParams(parms)
...@@ -625,7 +625,7 @@ const API = { ...@@ -625,7 +625,7 @@ const API = {
return axios.put(url, bodyData) return axios.put(url, bodyData)
}, },
// 查询列表 // 查询列表
queryList (parms) { queryList(parms) {
const { tableName, appCode: appCode_, queryParms, group, bodyData } = parms const { tableName, appCode: appCode_, queryParms, group, bodyData } = parms
const { appCode } = getPageParms() const { appCode } = getPageParms()
const appCode__ = appCode_ || appCode const appCode__ = appCode_ || appCode
...@@ -642,7 +642,7 @@ const API = { ...@@ -642,7 +642,7 @@ const API = {
} }
}, },
// 批量删除 // 批量删除
deleteList (parms) { deleteList(parms) {
const { tableName, appCode: appCode_, bodyData } = parms const { tableName, appCode: appCode_, bodyData } = parms
const { appCode } = getPageParms() const { appCode } = getPageParms()
const queryParms_str = this.parseUrlParams() const queryParms_str = this.parseUrlParams()
...@@ -652,9 +652,10 @@ const API = { ...@@ -652,9 +652,10 @@ const API = {
data: bodyData data: bodyData
}) })
}, },
importExcel (formData, data) { importExcel(formData, data) {
const { table_name, queryParms } = data const { table_name, queryParms, appCode: appCode_ } = data
const { appCode, dbName } = getPageParms() const { appCode, dbName } = getPageParms()
const appCode__ = appCode_ || appCode
let strParms = '' let strParms = ''
if (queryParms) { if (queryParms) {
const itemParms_ = _.cloneDeep(queryParms) const itemParms_ = _.cloneDeep(queryParms)
...@@ -664,16 +665,17 @@ const API = { ...@@ -664,16 +665,17 @@ const API = {
strParms += `&${key}=${itemParms_[key]}` strParms += `&${key}=${itemParms_[key]}`
} }
} }
const url = `${module_toolAPI}${appCode}/${table_name}/import_excel/?db_name=${dbName}${strParms}` const url = `${module_toolAPI}${appCode__}/${table_name}/import_excel/?db_name=${dbName}${strParms}`
return axios.post(url, formData) return axios.post(url, formData)
}, },
getNewId (number) { getNewId(number) {
const number_ = number || 100 const number_ = number || 100
return axios.get(module_tool + `common/new_id/${number_}/`) return axios.get(module_tool + `common/new_id/${number_}/`)
}, },
importDataIframe (data, parms) { importDataIframe(data, parms) {
const { dbName, appCode } = getPageParms() const { dbName, appCode } = getPageParms()
const { table_name, import_name, queryParms } = parms const { table_name, import_name, queryParms, appCode: appCode_ } = parms
const appCode__ = appCode_ || appCode
let strParms = '' let strParms = ''
if (queryParms) { if (queryParms) {
const itemParms_ = _.cloneDeep(queryParms) const itemParms_ = _.cloneDeep(queryParms)
...@@ -683,11 +685,11 @@ const API = { ...@@ -683,11 +685,11 @@ const API = {
strParms += `&${key}=${itemParms_[key]}` strParms += `&${key}=${itemParms_[key]}`
} }
} }
const url_ = `${module_toolAPI}${appCode}/${table_name}/${import_name}/?db_name=${dbName}${strParms}` const url_ = `${module_toolAPI}${appCode__}/${table_name}/${import_name}/?db_name=${dbName}${strParms}`
return axios.post(url_, data) return axios.post(url_, data)
}, },
// 单据流控制 // 单据流控制
billHandleCommon (obj) { billHandleCommon(obj) {
const { data, type } = obj const { data, type } = obj
let url = '' let url = ''
switch (type) { switch (type) {
...@@ -712,7 +714,7 @@ const API = { ...@@ -712,7 +714,7 @@ const API = {
} }
return axios.post(url, data) return axios.post(url, data)
}, },
queryBillpbWebDyncCode (parms) { queryBillpbWebDyncCode(parms) {
const { appCode: appCode_, queryParms, tableName } = parms const { appCode: appCode_, queryParms, tableName } = parms
const { appCode, page } = getPageParms() const { appCode, page } = getPageParms()
const appCode__ = appCode_ || appCode const appCode__ = appCode_ || appCode
...@@ -722,20 +724,20 @@ const API = { ...@@ -722,20 +724,20 @@ const API = {
return axios.get(url_) return axios.get(url_)
}, },
// action打印 // action打印
printTask (data) { printTask(data) {
const url = `${module_tool}common/print_task/` const url = `${module_tool}common/print_task/`
return axios.post(url, data) return axios.post(url, data)
}, },
// 默认单据类型打印 // 默认单据类型打印
TypePrintTask (data) { TypePrintTask(data) {
const url = `${module_tool}common/print_task_by_bill_type/` const url = `${module_tool}common/print_task_by_bill_type/`
return axios.post(url, data) return axios.post(url, data)
}, },
get (url) { get(url) {
return axios.get(url) return axios.get(url)
}, },
// 上传附件 // 上传附件
uploadFile (formData) { uploadFile(formData) {
const { appCode } = getPageParms() const { appCode } = getPageParms()
return axios.post(`fileresourceAPI/file/${appCode}/`, formData) return axios.post(`fileresourceAPI/file/${appCode}/`, formData)
} }
......
...@@ -67,13 +67,13 @@ ...@@ -67,13 +67,13 @@
</el-date-picker> </el-date-picker>
</template> </template>
<template v-if="item.type==='elSwitch'"> <template v-if="item.type==='elSwitch'">
<hsSwitch <hs-switch
style="width:100%" style="width:100%"
size='mini' size='mini'
:disabled='disabled' :disabled='disabled'
v-model="formParms[item.prop]" v-model="formParms[item.prop]"
> >
</hsSwitch> </hs-switch>
</template> </template>
<template v-if="item.type==='elCheckbox'"> <template v-if="item.type==='elCheckbox'">
<el-checkbox <el-checkbox
......
...@@ -289,6 +289,8 @@ export default { ...@@ -289,6 +289,8 @@ export default {
const value = writeProp[key] const value = writeProp[key]
this.$set(this.writeBackObject, key, data[value]) this.$set(this.writeBackObject, key, data[value])
} }
this.initValue(this.value)
console.log(data, 'link out select')
this.dialogIframeVisible = false this.dialogIframeVisible = false
}, },
jumpSelect() { jumpSelect() {
......
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