manage-client 3.1.19 → 3.1.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,174 +1,174 @@
1
- var express = require('express')
2
- var webpack = require('webpack')
3
- var config = require('./webpack.dev.conf')
4
- var proxyMiddleware = require('http-proxy-middleware')
5
- // var httpProxy = require('http-proxy')
6
-
7
- var app = express()
8
- var compiler = webpack(config)
9
- // var proxy = httpProxy.createProxyServer()
10
-
11
- // Define HTTP proxies to your custom API backend
12
- // https://github.com/chimurai/http-proxy-middleware
13
- // var bendi = 'http://127.0.0.1:8089/manage', fuwu = 'http://36.103.224.217:6300/'
14
- var shaoguan='http://119.146.1.106:8300/'
15
- var qtx='http://36.103.222.144:6300/'
16
- var bendi = 'http://127.0.0.1:7857', fuwu_login = 'http://192.168.50.4:8400'
17
- var fuwu = 'http://192.168.50.4:8400'
18
- var system = 'http://192.168.50.4:8400'
19
- //192.168.
20
- // var str = 'http://127.0.0.1:8080/manage', str2 = 'http://192.168.50.199:8300'
21
- // var str = 'http://192.168.10.233:8300', str2 = 'http://192.168.10.14:8300'
22
- var proxyTable = {
23
- '/rs/logic/exportfile': {
24
- target: fuwu
25
- },
26
- '/files': {
27
- target: fuwu
28
- },
29
- // 查找资源服务数据
30
- '/rs/search': {
31
- target: fuwu
32
- },
33
- // 查找资源服务数据
34
- '/rs/logic/getLogin': {
35
- target: fuwu
36
- },
37
- // 查找资源服务数据
38
- '/rs/logic/getInitData': {
39
- target: fuwu
40
- },
41
- '/rs/logic/getSaleInitData':{
42
- target: fuwu
43
- },
44
- // 用户登录服务地址
45
- '/rs/user': {
46
- target: fuwu
47
- },
48
- '/rs/path/getParams': {
49
- target: fuwu
50
- },
51
- '/rs/data': {
52
- target: fuwu
53
- },
54
- '/rs/license': {
55
- target: fuwu
56
- },
57
- '/rs/db': {
58
- target: fuwu
59
- },
60
- '/excel': {
61
- target: fuwu
62
- },
63
- '/rs/config': {
64
- target: fuwu
65
- },
66
- '/rs/sql/getLicenseById': {
67
- target: fuwu
68
- },
69
- '/rs/report': {
70
- target: fuwu
71
- },
72
- '/rs/vue': {
73
- target: fuwu
74
- },
75
- '/rs/file': {
76
- target: fuwu
77
- },
78
- '/rs/logic/SumSettleFileImport': {
79
- target: 'http://127.0.0.1:8080'
80
- },
81
- '/rs': {
82
- target: bendi
83
- }
84
- }
85
-
86
- var devMiddleware = require('webpack-dev-middleware')(compiler, {
87
- publicPath: config.output.publicPath,
88
- stats: {
89
- colors: true,
90
- chunks: false
91
- }
92
- })
93
-
94
- var hotMiddleware = require('webpack-hot-middleware')(compiler)
95
- // force page reload when html-webpack-plugin template changes
96
- compiler.plugin('compilation', function (compilation) {
97
- compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
98
- hotMiddleware.publish({action: 'reload'})
99
- cb()
100
- })
101
- })
102
-
103
- // proxy api requests
104
- Object.keys(proxyTable).forEach(function (context) {
105
- var options = proxyTable[context]
106
- if (typeof options === 'string') {
107
- options = {target: options}
108
- }
109
- app.use(proxyMiddleware(context, options))
110
- })
111
-
112
- // handle fallback for HTML5 history API
113
- app.use(require('connect-history-api-fallback')())
114
- // app.use(function (req, res, next) {
115
- // res.header('Access-Control-Allow-Origin', '*')
116
- // res.header('Access-Control-Allow-Headers', 'X-Requested-With')
117
- // res.header('Access-Control-Allow-Methods', 'PUT, POST, GET,DELETE, OPTIONS')
118
- // res.header('X-Powered-By', '3,2,1')
119
- // res.header('Access-Control-Allow-Credentials', 'true')
120
- // res.header('Content-Type', 'application/json;charset=utf-8')
121
- // next()
122
- // })
123
-
124
- // serve webpack bundle output
125
- app.use(devMiddleware)
126
-
127
- // enable hot-reload and state-preserving
128
- // compilation error display
129
- app.use(hotMiddleware)
130
-
131
- // serve pure static assets
132
- app.use('/static', express.static('./static'))
133
-
134
- // app.all('/rs/*', function (req, res) {
135
- // proxy.web(req, res, {
136
- // target: 'http://127.0.0.1:8081/reports'
137
- // })
138
- // })
139
-
140
- // app.all('/rs/*', function (req, res) {
141
- // proxy.web(req, res, {
142
- // target: 'http://127.0.0.1:8081/ldap'
143
- // })
144
- // })
145
- // app.all('/excel/*', function (req, res) {
146
- // proxy.web(req, res, {
147
- // target: 'http://127.0.0.1:8081/charge'
148
- // })
149
- // })
150
-
151
- // app.all('/rs/*', function (req, res) {
152
- // proxy.web(req, res, {
153
- // target: 'http://127.0.0.1:82/charge'
154
- // })u
155
- // })
156
-
157
- // app.all('/*', function (req, res) {
158
- // proxy.web(req, res, {
159
- // target: 'http://127.0.0.1:82'
160
- // })
161
- // })
162
- // app.all('/rs/user', function (req, res) {
163
- // proxy.web(req, res, {
164
- // target: 'http://127.0.0.1:82'
165
- // })
166
- // })
167
-
168
- module.exports = app.listen(8085, function (err) {
169
- if (err) {
170
- console.log(err)
171
- return
172
- }
173
- console.log('Listening at http://localhost:8085')
174
- })
1
+ var express = require('express')
2
+ var webpack = require('webpack')
3
+ var config = require('./webpack.dev.conf')
4
+ var proxyMiddleware = require('http-proxy-middleware')
5
+ // var httpProxy = require('http-proxy')
6
+
7
+ var app = express()
8
+ var compiler = webpack(config)
9
+ // var proxy = httpProxy.createProxyServer()
10
+
11
+ // Define HTTP proxies to your custom API backend
12
+ // https://github.com/chimurai/http-proxy-middleware
13
+ // var bendi = 'http://127.0.0.1:8089/manage', fuwu = 'http://36.103.224.217:6300/'
14
+ var shaoguan='http://119.146.1.106:8300/'
15
+ var qtx='http://36.103.222.144:6300/'
16
+ var bendi = 'http://127.0.0.1:8084/', fuwu_login = 'http://192.168.50.4:8400'
17
+ var fuwu = 'http://192.168.50.4:8400'
18
+ var system = 'http://192.168.50.4:8400'
19
+ //192.168.
20
+ // var str = 'http://127.0.0.1:8080/manage', str2 = 'http://192.168.50.199:8300'
21
+ // var str = 'http://192.168.10.233:8300', str2 = 'http://192.168.10.14:8300'
22
+ var proxyTable = {
23
+ '/rs/logic/exportfile': {
24
+ target: fuwu
25
+ },
26
+ '/files': {
27
+ target: fuwu
28
+ },
29
+ // 查找资源服务数据
30
+ '/rs/search': {
31
+ target: fuwu
32
+ },
33
+ // 查找资源服务数据
34
+ '/rs/logic/getLogin': {
35
+ target: fuwu
36
+ },
37
+ // 查找资源服务数据
38
+ '/rs/logic/getInitData': {
39
+ target: fuwu
40
+ },
41
+ '/rs/logic/getSaleInitData':{
42
+ target: fuwu
43
+ },
44
+ // 用户登录服务地址
45
+ '/rs/user': {
46
+ target: fuwu
47
+ },
48
+ '/rs/path/getParams': {
49
+ target: fuwu
50
+ },
51
+ '/rs/data': {
52
+ target: fuwu
53
+ },
54
+ '/rs/license': {
55
+ target: fuwu
56
+ },
57
+ '/rs/db': {
58
+ target: fuwu
59
+ },
60
+ '/excel': {
61
+ target: fuwu
62
+ },
63
+ '/rs/config': {
64
+ target: fuwu
65
+ },
66
+ '/rs/sql/getLicenseById': {
67
+ target: fuwu
68
+ },
69
+ '/rs/report': {
70
+ target: fuwu
71
+ },
72
+ '/rs/vue': {
73
+ target: fuwu
74
+ },
75
+ '/rs/file': {
76
+ target: fuwu
77
+ },
78
+ '/rs/logic/SumSettleFileImport': {
79
+ target: 'http://127.0.0.1:8080'
80
+ },
81
+ '/rs': {
82
+ target: bendi
83
+ }
84
+ }
85
+
86
+ var devMiddleware = require('webpack-dev-middleware')(compiler, {
87
+ publicPath: config.output.publicPath,
88
+ stats: {
89
+ colors: true,
90
+ chunks: false
91
+ }
92
+ })
93
+
94
+ var hotMiddleware = require('webpack-hot-middleware')(compiler)
95
+ // force page reload when html-webpack-plugin template changes
96
+ compiler.plugin('compilation', function (compilation) {
97
+ compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
98
+ hotMiddleware.publish({action: 'reload'})
99
+ cb()
100
+ })
101
+ })
102
+
103
+ // proxy api requests
104
+ Object.keys(proxyTable).forEach(function (context) {
105
+ var options = proxyTable[context]
106
+ if (typeof options === 'string') {
107
+ options = {target: options}
108
+ }
109
+ app.use(proxyMiddleware(context, options))
110
+ })
111
+
112
+ // handle fallback for HTML5 history API
113
+ app.use(require('connect-history-api-fallback')())
114
+ // app.use(function (req, res, next) {
115
+ // res.header('Access-Control-Allow-Origin', '*')
116
+ // res.header('Access-Control-Allow-Headers', 'X-Requested-With')
117
+ // res.header('Access-Control-Allow-Methods', 'PUT, POST, GET,DELETE, OPTIONS')
118
+ // res.header('X-Powered-By', '3,2,1')
119
+ // res.header('Access-Control-Allow-Credentials', 'true')
120
+ // res.header('Content-Type', 'application/json;charset=utf-8')
121
+ // next()
122
+ // })
123
+
124
+ // serve webpack bundle output
125
+ app.use(devMiddleware)
126
+
127
+ // enable hot-reload and state-preserving
128
+ // compilation error display
129
+ app.use(hotMiddleware)
130
+
131
+ // serve pure static assets
132
+ app.use('/static', express.static('./static'))
133
+
134
+ // app.all('/rs/*', function (req, res) {
135
+ // proxy.web(req, res, {
136
+ // target: 'http://127.0.0.1:8081/reports'
137
+ // })
138
+ // })
139
+
140
+ // app.all('/rs/*', function (req, res) {
141
+ // proxy.web(req, res, {
142
+ // target: 'http://127.0.0.1:8081/ldap'
143
+ // })
144
+ // })
145
+ // app.all('/excel/*', function (req, res) {
146
+ // proxy.web(req, res, {
147
+ // target: 'http://127.0.0.1:8081/charge'
148
+ // })
149
+ // })
150
+
151
+ // app.all('/rs/*', function (req, res) {
152
+ // proxy.web(req, res, {
153
+ // target: 'http://127.0.0.1:82/charge'
154
+ // })
155
+ // })
156
+
157
+ // app.all('/*', function (req, res) {
158
+ // proxy.web(req, res, {
159
+ // target: 'http://127.0.0.1:82'
160
+ // })
161
+ // })
162
+ // app.all('/rs/user', function (req, res) {
163
+ // proxy.web(req, res, {
164
+ // target: 'http://127.0.0.1:82'
165
+ // })
166
+ // })
167
+
168
+ module.exports = app.listen(8085, function (err) {
169
+ if (err) {
170
+ console.log(err)
171
+ return
172
+ }
173
+ console.log('Listening at http://localhost:8085')
174
+ })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "manage-client",
3
- "version": "3.1.19",
3
+ "version": "3.1.20",
4
4
  "description": "经营管控模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "directories": {
@@ -1,241 +1,241 @@
1
- <template>
2
- <div class="flex">
3
- <partial-view v-ref:pv>
4
- <div class="span" v-show="!filtrate">
5
- <p class="bg-info text-center" style="padding: 8px;background: #5ac0d9;color: white;border-radius:10px 10px 0 0" title="选中报表后双击查看报表的配置信息" @dblclick="filtrate=!filtrate">报表类型</p>
6
- <div style="height: 94%;overflow: auto;width: 104%">
7
- <div style="padding:3px" :style="{background: index===row ? '#dfedfb' : 'white'}" :class="styles=='2'?'col-sm-6 auto':'col-sm-12 auto'" v-for="(index,type) in types"
8
- @click="$dispatch('select-type',index, type),changecolor(index,type)"
9
- :id="'div-'+index">
10
- <div class="row auto"><img :src="type.f_image_path" alt="图片加载失败" class="img-rounded" style="width: 60px;"></div>
11
- <div style="height:40px" class="row auto">{{index+1}}、{{type.f_report_name}}</div>
12
- </div>
13
- </div>
14
-
15
- </div>
16
- <div class="span" v-show="filtrate">
17
- <p class="bg-info text-center" style="padding: 8px;" @dblclick="filtrate=!filtrate">相关配置</p>
18
- <div style="height: 94%;overflow: auto;width: 104%">
19
- <table style="border-style: none;width: 95%;">
20
- <tr style="display:block;margin:15px 0;">
21
- <td style="text-align: left">
22
- <label class="font_normal_body">报表名称:</label>
23
- <v-select multiple
24
- :value.sync="modelinfo.f_report_name"
25
- class="select_list select"
26
- v-model="modelinfo.f_report_name"
27
- :options='reportNames' placeholder='请选择'
28
- close-on-select></v-select>
29
- </td>
30
- </tr>
31
- <tr style="display:block;margin:15px 0;">
32
- <td style="text-align: left">
33
- <label class="font_normal_body">报表类型:</label>
34
- <v-select
35
- :value.sync="modelinfo.f_report_type"
36
- :search="false"
37
- class="select_list select"
38
- v-model="modelinfo.f_report_type"
39
- :options='reportTypes' placeholder='请选择'
40
- close-on-select></v-select>
41
- </td>
42
- </tr>
43
- <tr style="display:block;margin:15px 0;">
44
- <td style="text-align: left">
45
- <label class="font_normal_body">报表状态:</label>
46
- <v-select
47
- :value.sync="modelinfo.f_rank"
48
- :search="false"
49
- class="select_list select"
50
- v-model="modelinfo.f_rank"
51
- :options='reportState' placeholder='请选择'
52
- close-on-select></v-select>
53
- </td>
54
- </tr>
55
- <tr style="display:block;margin:15px 0;">
56
- <td style="text-align: right;width: 50%;"><button class="button_clear button_spacing" @click="filtrate=!filtrate">返回</button></td>
57
- <td style="text-align: right;width: 25%;"><button class="button_clear button_spacing" @click="clear()">清空</button></td>
58
- <td style="text-align: left;width: 25%;"><button class="button_search button_spacing" @click="chaxun()">查询</button></td>
59
- </tr>
60
- <tr style="display:block;margin:15px 0;" v-for="(key,value) in infos">
61
- <td style="text-align: left;">
62
- <label class="font_normal_body" style="text-align: right;">{{key}}:</label>
63
- <input type="text" style="width: 70%;" class="input_search" v-model="value" v-bind:title="[key =='报表状态'?'1表示显示其他表示不显示':'']"/>
64
- </td>
65
- </tr>
66
- <tr style="display:block;margin:15px 0;">
67
- <td style="text-align: right;width: 50%;"><button class="button_clear button_spacing" @click="saveOrUpdate(1)">修改</button></td>
68
- <td style="text-align: right;width: 25%;"><button class="button_clear button_spacing" @click="clear(true)">清空</button></td>
69
- <td style="text-align: left;width: 25%;"><button class="button_search button_spacing" @click="saveOrUpdate(2)">保存</button></td>
70
- </tr>
71
- </table>
72
- </div>
73
-
74
- </div>
75
- </partial-view>
76
- </div>
77
- </template>
78
-
79
- <script>
80
- import {HttpResetClass} from "vue-client";
81
-
82
- export default {
83
- title: '报表选项',
84
- props: {
85
- inindex:{}
86
- },
87
- data () {
88
- return {
89
- types: [],
90
- row:null,
91
- infos: {
92
- '报表名称': '',
93
- '连接页面': '',
94
- '报表类型': '',
95
- '图片路径': '',
96
- '添 加 人': '',
97
- '报表状态': ''
98
- },
99
- styles:this.$appdata.getSingleValue('报表样式')?this.$appdata.getSingleValue('报表样式'):'2',
100
- saveinfo:{},
101
- filtrate:false,
102
- modelinfo: {
103
- f_report_name: '',
104
- f_report_type: '',
105
- f_rank: '1'
106
- },
107
- config:{
108
- f_report_name: '报表名称',
109
- f_report_path: '连接页面',
110
- f_report_type: '报表类型',
111
- f_image_path: '图片路径',
112
- f_operator: '添 加 人',
113
- f_rank: '报表状态'
114
- },
115
- conditionStr:'1=1',
116
- reportNames: [],
117
- reportTypes: [],
118
- reportState : [{label: '全部', value: ''},{label: '显示', value: '1'},{label: '未显示', value: 'null'},],
119
- tablename: 't_report_type'
120
- }
121
- },
122
- ready (){
123
- // 获取所有报表类型
124
- this.getReportInfo(null,'1=1 and f_rank=1')
125
- this.getReportName()
126
- this.getReportType()
127
- },
128
- methods: {
129
- getReportInfo(tname,cond){
130
- this.$refs.pv.load('rs/sql/manageSingleTable', {
131
- data: {
132
- tablename: tname ? tname:this.tablename,
133
- condition: cond ? cond:this.conditionStr
134
- }
135
- }).then((res) => {
136
- this.types = res.data
137
- }).catch((error) => {
138
-
139
- })
140
- },
141
- chaxun(){
142
- this.getReportInfo()
143
- this.filtrate = !this.filtrate
144
- },
145
- changecolor(index,type){
146
- this.row=index
147
- },
148
- async getReportName(){
149
- let HttpReset = new HttpResetClass()
150
- var data = await HttpReset.load('POST', 'rs/sql/singleTable_Final', {
151
- data: {
152
- condition: this.conditionStr,
153
- tablename: this.tablename,
154
- groupitem: 'f_report_name',
155
- orderitem: 'f_report_name',
156
- items: 'f_report_name'
157
- }
158
- }, {resolveMsg: null, rejectMsg: '获取报表名称失败!'})
159
- let nameArr = [{label: '全部', value: ''}]
160
- for (let row of data.data){
161
- nameArr.push({label: row.f_report_name, value: row.f_report_name})
162
- }
163
- this.reportNames = nameArr
164
- },
165
- clear(val){
166
- if(val){
167
- for (let key in this.infos) {
168
- this.infos[key] =''
169
- }
170
- }else{
171
- for (let key in this.modelinfo) {
172
- this.modelinfo[key] =[]
173
- }
174
- }
175
- },
176
- async getReportType(){
177
- let HttpReset = new HttpResetClass()
178
- var data = await HttpReset.load('POST', 'rs/sql/singleTable_Final', {
179
- data: {
180
- condition: this.conditionStr,
181
- tablename: this.tablename,
182
- groupitem: 'f_report_type',
183
- orderitem: 'f_report_type',
184
- items: 'f_report_type'
185
- }
186
- }, {resolveMsg: null, rejectMsg: '获取报表类型失败!'})
187
- let typeArr = [{label: '全部', value: ''}]
188
- for (let row of data.data){
189
- typeArr.push({label: row.f_report_type, value: row.f_report_type})
190
- }
191
- this.reportTypes = typeArr
192
- },
193
- saveOrUpdate(val){
194
- // let sv={}
195
- for(let [key, value] of Object.entries(this.config)){
196
- let vl=this.infos[value]
197
- this.saveinfo[key]=vl
198
- }
199
- this.saveinfo['type']=val
200
-
201
- this.$resetpost('rs/logic/saveReport', this.saveinfo, {resolveMsg: '恭喜!提交成功!', rejectMsg: '提交错误!'}).then((res) => {
202
- this.$showAlert('保存成功', 'success', 3000)
203
- this.getReportInfo(null,'1=1 and f_rank=1')
204
- this.filtrate=!this.filtrate
205
- })
206
- console.log('this.saveinfo+++++',this.saveinfo)
207
- }
208
- },
209
- watch :{
210
- 'modelinfo': {
211
- deep: true,
212
- handler(val) {
213
- let c='1=1 '
214
- for (let [key, value] of Object.entries(val)) {
215
- if (value && value!='') {
216
- if(key=='f_rank' && value=='null'){
217
- c+='and '+ key + " is " + value +' or '+ key +" = ''"
218
- }else{
219
- c+='and '+ key + " in ('" + value.toString().replace(new RegExp(',','g'),"','") + "') "
220
- }
221
-
222
- }
223
- }
224
- this.conditionStr = c
225
- }
226
- },
227
- 'inindex' (val){
228
- this.infos={}
229
- this.saveinfo=this.types[val]
230
- let flag={}
231
- for(let [key, value] of Object.entries(this.saveinfo)){
232
- let name=this.config[key]
233
- if (name!=null){
234
- flag[name]=value
235
- }
236
- }
237
- this.infos=flag
238
- }
239
- }
240
- }
241
- </script>
1
+ <template>
2
+ <div class="flex">
3
+ <partial-view v-ref:pv>
4
+ <div class="span" v-show="!filtrate">
5
+ <p class="bg-info text-center" style="padding: 8px;background: #5ac0d9;color: white;border-radius:10px 10px 0 0" title="选中报表后双击查看报表的配置信息" @dblclick="filtrate=!filtrate">报表类型</p>
6
+ <div style="height: 94%;overflow: auto;width: 104%">
7
+ <div style="padding:3px" :style="{background: index===row ? '#dfedfb' : 'white'}" :class="styles=='2'?'col-sm-6 auto':'col-sm-12 auto'" v-for="(index,type) in types"
8
+ @click="$dispatch('select-type',index, type),changecolor(index,type)"
9
+ :id="'div-'+index">
10
+ <div class="row auto"><img :src="type.f_image_path" alt="图片加载失败" class="img-rounded" style="width: 60px;"></div>
11
+ <div style="height:40px" class="row auto">{{index+1}}、{{type.f_report_name}}</div>
12
+ </div>
13
+ </div>
14
+
15
+ </div>
16
+ <div class="span" v-show="filtrate">
17
+ <p class="bg-info text-center" style="padding: 8px;" @dblclick="filtrate=!filtrate">相关配置</p>
18
+ <div style="height: 94%;overflow: auto;width: 104%">
19
+ <table style="border-style: none;width: 95%;">
20
+ <tr style="display:block;margin:15px 0;">
21
+ <td style="text-align: left">
22
+ <label class="font_normal_body">报表名称:</label>
23
+ <v-select multiple
24
+ :value.sync="modelinfo.f_report_name"
25
+ class="select_list select"
26
+ v-model="modelinfo.f_report_name"
27
+ :options='reportNames' placeholder='请选择'
28
+ close-on-select></v-select>
29
+ </td>
30
+ </tr>
31
+ <tr style="display:block;margin:15px 0;">
32
+ <td style="text-align: left">
33
+ <label class="font_normal_body">报表类型:</label>
34
+ <v-select
35
+ :value.sync="modelinfo.f_report_type"
36
+ :search="false"
37
+ class="select_list select"
38
+ v-model="modelinfo.f_report_type"
39
+ :options='reportTypes' placeholder='请选择'
40
+ close-on-select></v-select>
41
+ </td>
42
+ </tr>
43
+ <tr style="display:block;margin:15px 0;">
44
+ <td style="text-align: left">
45
+ <label class="font_normal_body">报表状态:</label>
46
+ <v-select
47
+ :value.sync="modelinfo.f_rank"
48
+ :search="false"
49
+ class="select_list select"
50
+ v-model="modelinfo.f_rank"
51
+ :options='reportState' placeholder='请选择'
52
+ close-on-select></v-select>
53
+ </td>
54
+ </tr>
55
+ <tr style="display:block;margin:15px 0;">
56
+ <td style="text-align: right;width: 50%;"><button class="button_clear button_spacing" @click="filtrate=!filtrate">返回</button></td>
57
+ <td style="text-align: right;width: 25%;"><button class="button_clear button_spacing" @click="clear()">清空</button></td>
58
+ <td style="text-align: left;width: 25%;"><button class="button_search button_spacing" @click="chaxun()">查询</button></td>
59
+ </tr>
60
+ <tr style="display:block;margin:15px 0;" v-for="(key,value) in infos">
61
+ <td style="text-align: left;">
62
+ <label class="font_normal_body" style="text-align: right;">{{key}}:</label>
63
+ <input type="text" style="width: 70%;" class="input_search" v-model="value" v-bind:title="[key =='报表状态'?'1表示显示其他表示不显示':'']"/>
64
+ </td>
65
+ </tr>
66
+ <tr style="display:block;margin:15px 0;">
67
+ <td style="text-align: right;width: 50%;"><button class="button_clear button_spacing" @click="saveOrUpdate(1)">修改</button></td>
68
+ <td style="text-align: right;width: 25%;"><button class="button_clear button_spacing" @click="clear(true)">清空</button></td>
69
+ <td style="text-align: left;width: 25%;"><button class="button_search button_spacing" @click="saveOrUpdate(2)">保存</button></td>
70
+ </tr>
71
+ </table>
72
+ </div>
73
+
74
+ </div>
75
+ </partial-view>
76
+ </div>
77
+ </template>
78
+
79
+ <script>
80
+ import {HttpResetClass} from "vue-client";
81
+
82
+ export default {
83
+ title: '报表选项',
84
+ props: {
85
+ inindex:{}
86
+ },
87
+ data () {
88
+ return {
89
+ types: [],
90
+ row:null,
91
+ infos: {
92
+ '报表名称': '',
93
+ '连接页面': '',
94
+ '报表类型': '',
95
+ '图片路径': '',
96
+ '添 加 人': '',
97
+ '报表状态': ''
98
+ },
99
+ styles:this.$appdata.getSingleValue('报表样式')?this.$appdata.getSingleValue('报表样式'):'2',
100
+ saveinfo:{},
101
+ filtrate:false,
102
+ modelinfo: {
103
+ f_report_name: '',
104
+ f_report_type: '',
105
+ f_rank: '1'
106
+ },
107
+ config:{
108
+ f_report_name: '报表名称',
109
+ f_report_path: '连接页面',
110
+ f_report_type: '报表类型',
111
+ f_image_path: '图片路径',
112
+ f_operator: '添 加 人',
113
+ f_rank: '报表状态'
114
+ },
115
+ conditionStr:'1=1',
116
+ reportNames: [],
117
+ reportTypes: [],
118
+ reportState : [{label: '全部', value: ''},{label: '显示', value: '1'},{label: '未显示', value: 'null'},],
119
+ tablename: 't_report_type'
120
+ }
121
+ },
122
+ ready (){
123
+ // 获取所有报表类型
124
+ this.getReportInfo(null,'1=1 and f_rank=1')
125
+ this.getReportName()
126
+ this.getReportType()
127
+ },
128
+ methods: {
129
+ getReportInfo(tname,cond){
130
+ this.$refs.pv.load('rs/sql/manageSingleTable', {
131
+ data: {
132
+ tablename: tname ? tname:this.tablename,
133
+ condition: cond ? cond:this.conditionStr
134
+ }
135
+ }).then((res) => {
136
+ this.types = res.data
137
+ }).catch((error) => {
138
+
139
+ })
140
+ },
141
+ chaxun(){
142
+ this.getReportInfo()
143
+ this.filtrate = !this.filtrate
144
+ },
145
+ changecolor(index,type){
146
+ this.row=index
147
+ },
148
+ async getReportName(){
149
+ let HttpReset = new HttpResetClass()
150
+ var data = await HttpReset.load('POST', 'rs/sql/singleTable_Final', {
151
+ data: {
152
+ condition: this.conditionStr,
153
+ tablename: this.tablename,
154
+ groupitem: 'f_report_name',
155
+ orderitem: 'f_report_name',
156
+ items: 'f_report_name'
157
+ }
158
+ }, {resolveMsg: null, rejectMsg: '获取报表名称失败!'})
159
+ let nameArr = [{label: '全部', value: ''}]
160
+ for (let row of data.data){
161
+ nameArr.push({label: row.f_report_name, value: row.f_report_name})
162
+ }
163
+ this.reportNames = nameArr
164
+ },
165
+ clear(val){
166
+ if(val){
167
+ for (let key in this.infos) {
168
+ this.infos[key] =''
169
+ }
170
+ }else{
171
+ for (let key in this.modelinfo) {
172
+ this.modelinfo[key] =[]
173
+ }
174
+ }
175
+ },
176
+ async getReportType(){
177
+ let HttpReset = new HttpResetClass()
178
+ var data = await HttpReset.load('POST', 'rs/sql/singleTable_Final', {
179
+ data: {
180
+ condition: this.conditionStr,
181
+ tablename: this.tablename,
182
+ groupitem: 'f_report_type',
183
+ orderitem: 'f_report_type',
184
+ items: 'f_report_type'
185
+ }
186
+ }, {resolveMsg: null, rejectMsg: '获取报表类型失败!'})
187
+ let typeArr = [{label: '全部', value: ''}]
188
+ for (let row of data.data){
189
+ typeArr.push({label: row.f_report_type, value: row.f_report_type})
190
+ }
191
+ this.reportTypes = typeArr
192
+ },
193
+ saveOrUpdate(val){
194
+ // let sv={}
195
+ for(let [key, value] of Object.entries(this.config)){
196
+ let vl=this.infos[value]
197
+ this.saveinfo[key]=vl
198
+ }
199
+ this.saveinfo['type']=val
200
+
201
+ this.$resetpost('rs/logic/saveReport', this.saveinfo, {resolveMsg: '恭喜!提交成功!', rejectMsg: '提交错误!'}).then((res) => {
202
+ this.$showAlert('保存成功', 'success', 3000)
203
+ this.getReportInfo(null,'1=1 and f_rank=1')
204
+ this.filtrate=!this.filtrate
205
+ })
206
+ console.log('this.saveinfo+++++',this.saveinfo)
207
+ }
208
+ },
209
+ watch :{
210
+ 'modelinfo': {
211
+ deep: true,
212
+ handler(val) {
213
+ let c='1=1 '
214
+ for (let [key, value] of Object.entries(val)) {
215
+ if (value && value!='') {
216
+ if(key=='f_rank' && value=='null'){
217
+ c+='and '+ key + " is " + value +' or '+ key +" = ''"
218
+ }else{
219
+ c+='and '+ key + " in ('" + value.toString().replace(new RegExp(',','g'),"','") + "') "
220
+ }
221
+
222
+ }
223
+ }
224
+ this.conditionStr = c
225
+ }
226
+ },
227
+ 'inindex' (val){
228
+ this.infos={}
229
+ this.saveinfo=this.types[val]
230
+ let flag={}
231
+ for(let [key, value] of Object.entries(this.saveinfo)){
232
+ let name=this.config[key]
233
+ if (name!=null){
234
+ flag[name]=value
235
+ }
236
+ }
237
+ this.infos=flag
238
+ }
239
+ }
240
+ }
241
+ </script>
File without changes
File without changes
package/.npmignore DELETED
@@ -1,10 +0,0 @@
1
- src/bootstrap
2
- .idea/
3
- .DS_Store
4
- node_modules/
5
- dist/static/*.map
6
- npm-debug.log
7
- selenium-debug.log
8
- test/unit/coverage
9
- test/e2e/reports
10
- yarn.lock
package/build/.npmignore DELETED
@@ -1 +0,0 @@
1
-
package/node_modules.zip DELETED
Binary file