Commit 99d9841d by 袁成

Merge branch 'develop' of ssh://nvwa.jiuqi.com.cn:2222/GFP/RBC/rbc-frontend into develop-yuancheng

parents cf919340 0686fa40
......@@ -21,7 +21,8 @@
"viewerjs": "^1.10.2",
"vue": "^2.6.11",
"vue-router": "^3.2.0",
"vuex": "^3.4.0"
"vuex": "^3.4.0",
"currency.js": "^1.2.2"
},
"files": [
"dist",
......
......@@ -60,7 +60,7 @@ export default {
GMS.$hideContainer.$Message.error('未找到下一节点的审批人');
})
} else {
alert('缺少参数');
GMS.$hideContainer.$Message.error('缺少参数');
}
},
executeApproval: function(bill, param) {
......
......@@ -27,7 +27,7 @@ export default {
this.approval(bill, param);
}
}else{
alert('缺少参数');
GMS.$hideContainer.$Message.error('缺少参数');
}
},
approval: function(bill, param){
......
......@@ -7,7 +7,7 @@
style="width: 250px"
/>
<div slot="footer">
<Button type="primary" @click="asyncOK">确定</Button>
<Button type="primary" :loading="loading" @click="asyncOK">确定</Button>
</div>
</Modal>
</div>
......@@ -28,6 +28,7 @@ export default {
draftModal: false,
value: "",
billDefineName: null,
loading:false
};
},
mounted() {},
......@@ -37,6 +38,7 @@ export default {
this.$Message.info('请输入草稿名称');
return
}
this.loading = true;
//掉接口保存当前json 和value
let obj = {
billDefineName: this.billDefineName,
......@@ -51,6 +53,7 @@ export default {
})
.then(
function (data, textStatus, response) {
this.loading = false;
if(data.code == 0){
this.$Message.info("保存成功");
this.draftModal = false;
......@@ -60,6 +63,7 @@ export default {
}.bind(this)
)
.catch((XMLHttpRequest, textStatus, errorThrown) => {
this.loading = false;
});
},
},
......
......@@ -8,14 +8,12 @@
class-name="yc"
>
<Table
width="100%"
:height="maxHeight"
border
:columns="columns"
:data="queryData"
ref="table"
style="height:100%"
>
style="height:100%">
<template slot-scope="{ row }" slot="name">
{{ row.name }}
</template>
......@@ -52,7 +50,7 @@
style="width: 250px"
/>
<div slot="footer">
<Button type="primary" @click="asyncOK">确定</Button>
<Button type="primary" :loading="loading" @click="asyncOK">确定</Button>
</div>
</Modal>
</div>
......@@ -77,6 +75,7 @@ export default {
templateName: "",
queryData: [],
currentId: null,
loading:false,
columns: [
{
title: "草稿名称",
......@@ -148,6 +147,7 @@ export default {
title: this.value,
id: this.currentId,
};
this.loading = true;
GAMS.Util.invokeServer({
path: "rbcfunc/billdraft/update",
type: "POST",
......@@ -156,6 +156,7 @@ export default {
})
.then(
function (data, textStatus, response) {
this.loading = false;
if(data.code == 0){
this.getList();
this.draftModal = false;
......@@ -164,7 +165,9 @@ export default {
}
}.bind(this)
)
.catch((XMLHttpRequest, textStatus, errorThrown) => {});
.catch((XMLHttpRequest, textStatus, errorThrown) => {
this.loading = false;
});
},
showData(row) {
let billObj = this.bill.getBuillData();
......@@ -223,16 +226,10 @@ export default {
},
convertOnlyReadBillDefine(billDefine){
// 解决遗留问题,接待单子的只读界面标识特殊处理
let temp = billDefine
if (temp) {
switch(temp){
case 'bill.JDHDFYZCDJD':
temp = 'bill.JDHDFYZC';
break;
default:
}
if (billDefine == 'bill.JDHDFYZCDJD') {
billDefine = 'bill.JDHDFYZC';
}
return temp
return billDefine
}
},
};
......
......@@ -1303,7 +1303,8 @@ export default {
},
"description": "",
"title": "查看详情[showDetailAction]",
"value": "showDetailAction"
"value": "showDetailAction",
"alwaysUse":true
},
{
"discard": false,
......@@ -1574,7 +1575,8 @@ export default {
},
"description": "",
"title": "编辑常用审批意见",
"value": "approvalEditModalOpen"
"value": "approvalEditModalOpen",
"alwaysUse":true
},
{
"discard": false,
......@@ -1636,7 +1638,8 @@ export default {
},
"description": "",
"title": "添加常用审批意见",
"value": "approvalMessageAdd"
"value": "approvalMessageAdd",
"alwaysUse":true
},
{
"discard": false,
......
import _ from "./FormulaConstants";
import currency from "./currencyUtil.js"
import currency from 'currency.js/dist/currency.js'
/**
* 金额比较公式
* 比较左右两个操作数是否相等 参数可以是返回值类型为number的公式
......
......@@ -63,7 +63,6 @@ export default {
var decimalNum; //金额小数部分
//输出的中文金额字符串
var chineseStr = '';
var parts; //分离金额后用的数组,预定义
if (money == '') { return ''; }
money = parseFloat(money);
......@@ -85,8 +84,8 @@ export default {
if (parseInt(integerNum, 10) > 0) {
var zeroCount = 0;
var IntLen = integerNum.length;
for (var i = 0; i < IntLen; i++) {
var n = integerNum.substr(i, 1);
for (let i = 0; i < IntLen; i++) {
let n = integerNum.substr(i, 1);
var p = IntLen - i - 1;
var q = p / 4;
var m = p % 4;
......@@ -109,8 +108,8 @@ export default {
//小数部分
if (decimalNum != '') {
var decLen = decimalNum.length;
for (var i = 0; i < decLen; i++) {
var n = decimalNum.substr(i, 1);
for (let i = 0; i < decLen; i++) {
let n = decimalNum.substr(i, 1);
if (n != '0') {
if(decLen == 1){
chineseStr += cnNums[Number(n)] + cnDecUnits[i+1];
......
/*!
* currency.js - v2.0.4
* http://scurker.github.io/currency.js
*
* Copyright (c) 2021 Jason Wilson
* Released under MIT license
*/
'use strict';
var defaults = {
symbol: '$',
separator: ',',
decimal: '.',
errorOnInvalid: false,
precision: 2,
pattern: '!#',
negativePattern: '-!#',
format: format,
fromCents: false
};
var round = function round(v) {
return Math.round(v);
};
var pow = function pow(p) {
return Math.pow(10, p);
};
var rounding = function rounding(value, increment) {
return round(value / increment) * increment;
};
var groupRegex = /(\d)(?=(\d{3})+\b)/g;
var vedicRegex = /(\d)(?=(\d\d)+\d\b)/g;
/**
* Create a new instance of currency.js
* @param {number|string|currency} value
* @param {object} [opts]
*/
function currency(value, opts) {
var that = this;
if (!(that instanceof currency)) {
return new currency(value, opts);
}
var settings = Object.assign({}, defaults, opts),
precision = pow(settings.precision),
v = parse(value, settings);
that.intValue = v;
that.value = v / precision; // Set default incremental value
settings.increment = settings.increment || 1 / precision; // Support vedic numbering systems
// see: https://en.wikipedia.org/wiki/Indian_numbering_system
if (settings.useVedic) {
settings.groups = vedicRegex;
} else {
settings.groups = groupRegex;
} // Intended for internal usage only - subject to change
this.s = settings;
this.p = precision;
}
function parse(value, opts) {
var useRounding = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
var v = 0,
decimal = opts.decimal,
errorOnInvalid = opts.errorOnInvalid,
decimals = opts.precision,
fromCents = opts.fromCents,
precision = pow(decimals),
isNumber = typeof value === 'number',
isCurrency = value instanceof currency;
if (isCurrency && fromCents) {
return value.intValue;
}
if (isNumber || isCurrency) {
v = isCurrency ? value.value : value;
} else if (typeof value === 'string') {
var regex = new RegExp('[^-\\d' + decimal + ']', 'g'),
decimalString = new RegExp('\\' + decimal, 'g');
v = value.replace(/\((.*)\)/, '-$1') // allow negative e.g. (1.99)
.replace(regex, '') // replace any non numeric values
.replace(decimalString, '.'); // convert any decimal values
v = v || 0;
} else {
if (errorOnInvalid) {
throw Error('Invalid Input');
}
v = 0;
}
if (!fromCents) {
v *= precision; // scale number to integer value
v = v.toFixed(4); // Handle additional decimal for proper rounding.
}
return useRounding ? round(v) : v;
}
/**
* Formats a currency object
* @param currency
* @param {object} [opts]
*/
function format(currency, settings) {
var pattern = settings.pattern,
negativePattern = settings.negativePattern,
symbol = settings.symbol,
separator = settings.separator,
decimal = settings.decimal,
groups = settings.groups,
split = ('' + currency).replace(/^-/, '').split('.'),
dollars = split[0],
cents = split[1];
return (currency.value >= 0 ? pattern : negativePattern).replace('!', symbol).replace('#', dollars.replace(groups, '$1' + separator) + (cents ? decimal + cents : ''));
}
currency.prototype = {
/**
* Adds values together.
* @param {number} number
* @returns {currency}
*/
add: function add(number) {
var intValue = this.intValue,
_settings = this.s,
_precision = this.p;
return currency((intValue += parse(number, _settings)) / (_settings.fromCents ? 1 : _precision), _settings);
},
/**
* Subtracts value.
* @param {number} number
* @returns {currency}
*/
subtract: function subtract(number) {
var intValue = this.intValue,
_settings = this.s,
_precision = this.p;
return currency((intValue -= parse(number, _settings)) / (_settings.fromCents ? 1 : _precision), _settings);
},
/**
* Multiplies values.
* @param {number} number
* @returns {currency}
*/
multiply: function multiply(number) {
var intValue = this.intValue,
_settings = this.s;
return currency((intValue *= number) / (_settings.fromCents ? 1 : pow(_settings.precision)), _settings);
},
/**
* Divides value.
* @param {number} number
* @returns {currency}
*/
divide: function divide(number) {
var intValue = this.intValue,
_settings = this.s;
return currency(intValue /= parse(number, _settings, false), _settings);
},
/**
* Takes the currency amount and distributes the values evenly. Any extra pennies
* left over from the distribution will be stacked onto the first set of entries.
* @param {number} count
* @returns {array}
*/
distribute: function distribute(count) {
var intValue = this.intValue,
_precision = this.p,
_settings = this.s,
distribution = [],
split = Math[intValue >= 0 ? 'floor' : 'ceil'](intValue / count),
pennies = Math.abs(intValue - split * count),
precision = _settings.fromCents ? 1 : _precision;
for (; count !== 0; count--) {
var item = currency(split / precision, _settings); // Add any left over pennies
pennies-- > 0 && (item = item[intValue >= 0 ? 'add' : 'subtract'](1 / precision));
distribution.push(item);
}
return distribution;
},
/**
* Returns the dollar value.
* @returns {number}
*/
dollars: function dollars() {
return ~~this.value;
},
/**
* Returns the cent value.
* @returns {number}
*/
cents: function cents() {
var intValue = this.intValue,
_precision = this.p;
return ~~(intValue % _precision);
},
/**
* Formats the value as a string according to the formatting settings.
* @param {boolean} useSymbol - format with currency symbol
* @returns {string}
*/
format: function format(options) {
var _settings = this.s;
if (typeof options === 'function') {
return options(this, _settings);
}
return _settings.format(this, Object.assign({}, _settings, options));
},
/**
* Formats the value as a string according to the formatting settings.
* @returns {string}
*/
toString: function toString() {
var intValue = this.intValue,
_precision = this.p,
_settings = this.s;
return rounding(intValue / _precision, _settings.increment).toFixed(_settings.precision);
},
/**
* Value for JSON serialization.
* @returns {float}
*/
toJSON: function toJSON() {
return this.value;
}
};
module.exports = currency;
......@@ -23,12 +23,11 @@ export default {
let arr = [];
let arrApi = [];
Promise.all(arrApi1).then((list) => {
list.forEach((v,i)=>{
let res = v;
list.forEach((res,i)=>{
if(res && res[subTable]){
res[subTable].forEach(v=>{
let billDefine = v.BILLNAME && v.BILLNAME.replace(/_E/ig, "").replace(/_R/ig, "").replace(/_A/ig, "");
arrApi.push(that.searchBillObj(billDefine,v.BILLID,i))
let billDefine1 = v.BILLNAME && v.BILLNAME.replace(/_E/ig, "").replace(/_R/ig, "").replace(/_A/ig, "");
arrApi.push(that.searchBillObj(billDefine1,v.BILLID,i))
})
}
arr.push({//直接生成
......
/*
* @Description:通用/单张生成
*/
import axios from 'axios'
export default {
execute(context, param) {
let subTable = param.subTable||'BXMXZB';
......@@ -23,12 +22,11 @@ export default {
let arr = [];
let arrApi = [];
Promise.all(arrApi1).then((list) => {
list.forEach((v,i)=>{
let res = v;
list.forEach((res,i)=>{
if(res && res[subTable]){
res[subTable].forEach(v=>{
let billDefine = v.BILLNAME && v.BILLNAME.replace(/_E/ig, "").replace(/_R/ig, "").replace(/_A/ig, "");
arrApi.push(that.searchBillObj(billDefine,v.BILLID,i))
let billDefine1 = v.BILLNAME && v.BILLNAME.replace(/_E/ig, "").replace(/_R/ig, "").replace(/_A/ig, "");
arrApi.push(that.searchBillObj(billDefine1,v.BILLID,i))
})
}
arr.push({//直接生成
......@@ -54,15 +52,10 @@ export default {
})
},
generateVoucher(list,context){
axios({
          method: 'POST',
          url:GMS.url+'/mechanismVchr/singleCreateVchr',//单张生成接口
          headers: {
              Authorization:GMS.token,
          },
data:list
        }).then(res => {
          if (res.status === 200) {
GMS.$http.post('/mechanismVchr/singleCreateVchr',{
data:list
    }).then(res => {
           if (res.status === 200) {
if(res.data.data.showVoucher){//展示凭证
GMS.vbus.$emit('previewVoucher',res.data.data);
}else{
......@@ -76,13 +69,13 @@ export default {
onOk: () => {},
});
}
          }
        })
           }
        })
},
searchBillObj(billDefine, billId, index) {
return new Promise((resolve, reject) => {
GMS.$http.get(
`/gms/bill/${billDefine}/${billId}?withSubs=true`
`/gms/bill/bill.${billDefine}/${billId}?withSubs=true`
).then((data) => {
if (data.status == 200 && data.data.code == 0) {
let obj = data.data.content
......
......@@ -23,12 +23,11 @@ export default {
let arr = [];
let arrApi = [];
Promise.all(arrApi1).then((list) => {
list.forEach((v,i)=>{
let res = v;
list.forEach((res,i)=>{
if(res && res[subTable]){
res[subTable].forEach(v=>{
let billDefine = v.BILLNAME && v.BILLNAME.replace(/_E/ig, "").replace(/_R/ig, "").replace(/_A/ig, "");
arrApi.push(that.searchBillObj(billDefine,v.BILLID,i))
let billDefine1 = v.BILLNAME && v.BILLNAME.replace(/_E/ig, "").replace(/_R/ig, "").replace(/_A/ig, "");
arrApi.push(that.searchBillObj(billDefine1,v.BILLID,i))
})
}
arr.push({//直接生成
......
/*
* @Description:通用/汇总生成
*/
import axios from 'axios'
export default {
execute(context, param) {
let subTable = param.subTable||'BXMXZB';
......@@ -23,12 +22,11 @@ export default {
let arr = [];
let arrApi = [];
Promise.all(arrApi1).then((list) => {
list.forEach((v,i)=>{
let res = v;
list.forEach((res,i)=>{
if(res && res[subTable]){
res[subTable].forEach(v=>{
let billDefine = v.BILLNAME && v.BILLNAME.replace(/_E/ig, "").replace(/_R/ig, "").replace(/_A/ig, "");
arrApi.push(that.searchBillObj(billDefine,v.BILLID,i))
let billDefine1 = v.BILLNAME && v.BILLNAME.replace(/_E/ig, "").replace(/_R/ig, "").replace(/_A/ig, "");
arrApi.push(that.searchBillObj(billDefine1,v.BILLID,i))
})
}
arr.push({//直接生成
......@@ -54,35 +52,30 @@ export default {
})
},
generateVoucher(list,context){
axios({
          method: 'POST',
url:GMS.url+'/mechanismVchr/combineCreateVchr',//汇总生成
          headers: {
              Authorization:GMS.token,
          },
data:list
        }).then(res => {
          if (res.status === 200) {
if(res.data.data.showVoucher){//展示凭证
GMS.vbus.$emit('previewVoucher',res.data.data);
}else{
if(res.data.data.successVchrs && res.data.data.successVchrs.length > 0){
GMS.vbus.$emit('custom-query-refresh');
GMS.vbus.$emit('tab-count-refresh');
}
context.dom.$Modal.warning({
title: '信息提示',
content: res.data.data.processMsg,
onOk: () => {},
});
GMS.$http.post('/mechanismVchr/combineCreateVchr',{
data:list
    }).then(res => {
          if (res.status === 200) {
if(res.data.data.showVoucher){//展示凭证
GMS.vbus.$emit('previewVoucher',res.data.data);
}else{
if(res.data.data.successVchrs && res.data.data.successVchrs.length > 0){
GMS.vbus.$emit('custom-query-refresh');
GMS.vbus.$emit('tab-count-refresh');
}
          }
        })
context.dom.$Modal.warning({
title: '信息提示',
content: res.data.data.processMsg,
onOk: () => {},
});
}
          }
        })
},
searchBillObj(billDefine, billId ,index) {
return new Promise((resolve, reject) => {
GMS.$http.get(
`/gms/bill/${billDefine}/${billId}?withSubs=true`
`/gms/bill/bill.${billDefine}/${billId}?withSubs=true`
).then((data) => {
if (data.status == 200 && data.data.code == 0) {
let obj = data.data.content
......
/*
* @Description:通用/撤销生成
*/
import axios from 'axios'
export default {
execute(context, param) {
if (!param.billId || !param.billDefine) {
......@@ -25,15 +24,10 @@ export default {
that.deleteVchrAsync(arr,context);
},
deleteVchrAsync(list,context){
axios({
          method: 'POST',
          url:GMS.url+'/mechanismVchr/deleteVchr',//撤销凭证
          headers: {
              Authorization:GMS.token,
          },
data:list
        }).then(res => {
          if (res.status === 200) {
GMS.$http.post('/mechanismVchr/deleteVchr',{
data:list
    }).then(res => {
        if (res.status === 200) {
if(res.data.data.showVoucher){//展示凭证
GMS.vbus.$emit('previewVoucher',res.data.data);
}else{
......@@ -48,6 +42,6 @@ export default {
});
}
          }
        })
        })
}
}
\ No newline at end of file
......@@ -41,8 +41,8 @@ export default {
        }).then(res => {
          if (res.status === 200) {
if(res.data.data.showVoucher){//展示凭证
let obj = res.data.data;
obj.previewState = 'readonly';
let resObj = res.data.data;
resObj.previewState = 'readonly';
GMS.vbus.$emit('previewVoucher',res.data.data);
}else{
context.dom.$Modal.warning({
......
/*
* @Description:通用/联查凭证
*/
import axios from 'axios'
export default {
execute(context, param) {
if (!param.billId || !param.billDefine) {
......@@ -31,18 +30,13 @@ export default {
that.showVchrAsync(obj,context);
},
showVchrAsync(obj,context){
axios({
          method: 'POST',
          url:GMS.url+'/mechanismVchr/showVchr',//查看凭证
          headers: {
              Authorization:GMS.token,
          },
data:obj
        }).then(res => {
          if (res.status === 200) {
GMS.$http.post('/mechanismVchr/showVchr',{
data:obj
    }).then(res => {
        if (res.status === 200) {
if(res.data.data.showVoucher){//展示凭证
let obj = res.data.data;
obj.previewState = 'readonly';
let resObj = res.data.data;
resObj.previewState = 'readonly';
GMS.vbus.$emit('previewVoucher',res.data.data);
}else{
context.dom.$Modal.warning({
......@@ -51,7 +45,7 @@ export default {
onOk: () => {},
});
}
          }
        })
        }
    })
}
}
\ No newline at end of file
......@@ -27,6 +27,7 @@
"less": "^4.1.1",
"less-loader": "^7.3.0",
"node-sass": "^4.12.0",
"resize-observer-polyfill": "^1.5.1",
"sass-loader": "^8.0.2",
"svg-sprite-loader": "^6.0.11",
"vue-template-compiler": "^2.6.11"
......@@ -14099,8 +14100,8 @@
},
"node_modules/resize-observer-polyfill": {
"version": "1.5.1",
"resolved": "http://nvwa.jiuqi.com.cn/nexus/repository/npm-gov-public/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz",
"integrity": "sha1-DpAg3T0hAkRY1OvSfiPkAmmBBGQ=",
"resolved": "http://nvwa.jiuqi.com.cn/nexus/repository/npm-gov-group/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz",
"integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==",
"license": "MIT"
},
"node_modules/resolve": {
......@@ -29167,8 +29168,8 @@
},
"resize-observer-polyfill": {
"version": "1.5.1",
"resolved": "http://nvwa.jiuqi.com.cn/nexus/repository/npm-gov-public/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz",
"integrity": "sha1-DpAg3T0hAkRY1OvSfiPkAmmBBGQ="
"resolved": "http://nvwa.jiuqi.com.cn/nexus/repository/npm-gov-group/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz",
"integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg=="
},
"resolve": {
"version": "1.20.0",
......@@ -5,6 +5,7 @@
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"build-dev": "vue-cli-service build --mode development",
"build-dev-watch": "vue-cli-service build --mode development --watch",
"lint": "vue-cli-service lint"
},
"dependencies": {
......@@ -32,6 +33,7 @@
"less": "^4.1.1",
"less-loader": "^7.3.0",
"node-sass": "^4.12.0",
"resize-observer-polyfill": "^1.5.1",
"sass-loader": "^8.0.2",
"svg-sprite-loader": "^6.0.11",
"vue-template-compiler": "^2.6.11"
......
<template>
<div
class="commonfunctions-card"
@click="gotoQuery(item)"
>
<div class="icon">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>{{item.function.title}}</title>
<use :xlink:href="`${item.icon}`"></use>
</svg>
</div>
<div class="title">
{{item.function.title}}
<div class="click-area" @click="gotoQuery(item)">
<div class="icon">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>{{item.function.title}}</title>
<use :xlink:href="`${item.icon}`"></use>
</svg>
</div>
<div class="title">
{{item.function.title}}
</div>
</div>
</div>
</template>
......@@ -105,25 +106,30 @@ export default {
background: #FFFFFF;
padding: 24px 16px 16px 16px;
font-family: PingFangSC-Regular, PingFang SC;
cursor: pointer;
.icon {
width: 46px;
height: 46px;
margin: 0 auto 12px auto;
svg {
.click-area {
height: 100%;
width: fit-content;
margin: 0 auto;
cursor: pointer;
.icon {
width: 46px;
height: 46px;
margin: 0 auto 12px auto;
svg {
width: 100%;
height: 100%;
}
}
.title {
height: 20px;
font-size: 14px;
font-weight: 400;
color: #424242;
line-height: 20px;
width: 100%;
height: 100%;
overflow: hidden;
text-overflow: ellipsis;
}
}
.title {
height: 20px;
font-size: 14px;
font-weight: 400;
color: #424242;
line-height: 20px;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
}
}
</style>
\ No newline at end of file
......@@ -2,35 +2,6 @@
<Collapse v-model="value1" class="property">
<Panel name="1">
列表设置
<div slot="content">
<Form :label-width="80">
<FormItem label="每行图标数目">
<Input v-model="properties.rowIconNum" />
</FormItem>
</Form>
<Divider />
<div class="property-item" v-for="(config, index) in properties.configList" :key="index">
<Form :model="config" :label-width="80">
<FormItem label="功能">
<Select v-model="config.function" filterable>
<Option v-for="item in functionList" :value="item.id" :key="item.id">
{{item.title}}
</Option>
</Select>
</FormItem>
<FormItem label="图标">
<Select v-model="config.icon">
<Option v-for="item in iconList" :key="item.value" :value="item.value">
{{item.name}}
</Option>
</Select>
</FormItem>
</Form>
<Button size="small" type="error" @click="removeItem(index)">删除</Button>
<Divider />
</div>
<Button size="small" type="primary" @click="addItem">添加</Button>
</div>
</Panel>
</Collapse>
</template>
......@@ -38,17 +9,6 @@
<script>
export default {
watch: {
'properties.configList': {
handler(newVal) {
window.GMS.vbus.$emit('widgetPluginPropertiesChange', { id: this.type + this.id, properties: this.properties })
this.itemSetting.properties = this.properties
},
deep: true,
},
'properties.rowIconNum'() {
window.GMS.vbus.$emit('widgetPluginPropertiesChange', { id: this.type + this.id, properties: this.properties })
this.itemSetting.properties = this.properties
}
},
props: {
itemSetting: {
......@@ -62,40 +22,7 @@ export default {
properties: { configList: [] },
configList: [],
functionList: [],
iconList: [
{
value: '#icon-a-46_HOME_E_RBC_changyonggongneng_1',
name: '常用功能1',
},
{
value: '#icon-a-46_HOME_E_RBC_changyonggongneng_2',
name: '常用功能2',
},
{
value: '#icon-a-46_HOME_E_RBC_changyonggongneng_3',
name: '常用功能3',
},
{
value: '#icon-a-46_HOME_E_RBC_changyonggongneng_4',
name: '常用功能4',
},
{
value: '#icon-a-46_HOME_E_RBC_changyonggongneng_5',
name: '常用功能5',
},
{
value: '#icon-a-46_HOME_E_RBC_changyonggongneng_6',
name: '常用功能6',
},
{
value: '#icon-a-46_HOME_E_RBC_changyonggongneng_7',
name: '常用功能7',
},
{
value: '#icon-a-46_HOME_E_RBC_changyonggongneng',
name: '常用功能8',
},
],
}
},
computed: {
......@@ -130,13 +57,6 @@ export default {
},
},
created() {
window.GMS.util.nvwa.getRoutes().then((res) => {
this.addFunction(res.data.children)
})
let prop = this.itemSetting.properties
if (prop && prop.configList) {
this.properties = prop
}
},
}
</script>
......
......@@ -3,6 +3,7 @@
:templateName="config.name"
v-if="config.name"
:extrCondition="extrCondition"
:tableHeight="tableHeight"
></gms-query>
<p v-else>没有查询模板定义!</p>
</template>
......@@ -18,8 +19,16 @@ export default {
},
},
data() {
let height = window.innerHeight - 245
if (window.osConfig.appOpenMode == 'apploader') {
height -= 32
}
if (window.osConfig.showAcctbookBar) {
height -= 32
}
return {
extrCondition: [],
tableHeight: height,
};
},
mounted() {
......
......@@ -7,7 +7,8 @@ const service = axios.create({
})
service.interceptors.request.use(config => {
config.headers.Authorization = nros.SDK.utils.getToken()
let token = window.nros.SDK.utils.getToken();
config.headers.Authorization = token;
return config
})
......
......@@ -51,43 +51,51 @@ export default {
window.GMS.vbus.$emit('tab-count-refresh');
},
async getCerSerName(){
const res = await getCertifyServiceName();
if (res.data.content){
this.certifyServiceName = res.data.content;
this.getNvwaCertifyData(this.certifyServiceName);
try {
const res = await getCertifyServiceName();
if (res.data.content){
this.certifyServiceName = res.data.content;
this.getNvwaCertifyData(this.certifyServiceName);
}
} catch (e) {
console.log(e)
}
},
/**
* 获取认证服务url和token信息
*/
async getNvwaCertifyData (certifyServiceId) {
let url = null;
const getCurrentUrl = await getCertifyServiceUrl();
const res = await getIdUrl(certifyServiceId);
if(getCurrentUrl.data.content){
url = getCurrentUrl.data.content;
}else{
url = res.data.url;
}
if (url){
window.GMS.url = url;
const res1 = await getSso({
appId: res.data.id,
location: '',
params:''})
if (res1.data.success){
let num = res1.data.data.lastIndexOf('?');
let urlStr = res1.data.data.substring(num);
const { status, data:data1 } = await axios({
method: 'GET',
url: url + 'nvwa-login-sso/sso/login'+urlStr,
})
if (status === 200) {
if (data1.success) {
window.GMS.token = data1.token;
try {
let url = null;
const getCurrentUrl = await getCertifyServiceUrl();
const res = await getIdUrl(certifyServiceId);
if(getCurrentUrl.data.content){
url = getCurrentUrl.data.content;
}else{
url = res.data.url;
}
if (url){
window.GMS.url = url;
const res1 = await getSso({
appId: res.data.id,
location: '',
params:''})
if (res1.data.success){
let num = res1.data.data.lastIndexOf('?');
let urlStr = res1.data.data.substring(num);
const { status, data:data1 } = await axios({
method: 'GET',
url: url + 'nvwa-login-sso/sso/login'+urlStr,
})
if (status === 200) {
if (data1.success) {
window.GMS.token = data1.token;
}
}
}
}
} catch (e) {
console.log(e)
}
},
handleTag(name) {
......
......@@ -2,7 +2,7 @@
"name": "nvwa",
"index": {
"name": "@gms/gms-entry",
"version": "0.2.90-rbc"
"version": "latest"
},
"login": {
"name": "@rbc/rbc-login",
......
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