manage-client 3.2.88-1 → 3.2.88-2

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "manage-client",
3
- "version": "3.2.88-1",
3
+ "version": "3.2.88-2",
4
4
  "description": "经营管控模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "directories": {
@@ -1,257 +1,246 @@
1
- <template>
2
- <div class="flex">
3
- <div class="row" style="height: 5%">
4
- <div class="col-sm-10">
5
- <label class="font_normal_body">报表名称:</label>
6
- <v-select multiple
7
- :value.sync="modelinfo.f_report_name"
8
- class="select_list select"
9
- v-model="modelinfo.f_report_name"
10
- :options='reportNames' placeholder='请选择'
11
- @keyup.enter="chaxun()"
12
- ></v-select>
13
- </div>
14
- <div class="col-sm-2">
15
- <button class="button_search left" @click="chaxun()">查询</button>
16
- &nbsp;&nbsp;
17
- </div>
18
- </div>
19
- <partial-view v-ref:pv>
20
- <div class="span" v-show="!filtrate">
21
- <p class="bg-info text-center" style="padding: 8px;background: #5ac0d9;color: white;border-radius:10px 10px 0 0" >报表类型
22
- <button class="button_search-3 button_spacing border-right" v-if="this.$login.r.includes('报表配置权限')" @click="saveReport()">新增</button></p>
23
- <div style="height: 87%;overflow: auto;width: 104%">
24
- <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"
25
- @click="$dispatch('select-type',index, type),changecolor(index,type)"
26
- :id="'div-'+index">
27
- <div class="row auto"><img :src="type.f_image_path" alt="图片加载失败" class="img-rounded" style="width: 60px;">
28
- <div class="span" style = "float:right;">
29
- <button class="button_search button_spacing right" v-if="this.$login.r.includes('报表配置权限')" @click="Update()">修改</button>
30
- &nbsp;&nbsp;
31
- </div>
32
- </div>
33
- <div style="height:40px" class="row auto">{{index+1}}、{{type.f_report_name}}</div>
34
- </div>
35
- </div>
36
-
37
- </div>
38
- <div class="span" v-show="filtrate">
39
- <p class="bg-info text-center" style="padding: 8px;background: #5ac0d9;color: white;border-radius:10px 10px 0 0" @dblclick="filtrate=!filtrate">相关配置</p>
40
- <div style="height: 94%;overflow: auto;width: 104%">
41
- <div class="row text-primary" style="height: 3%">
42
- <!--新增-->
43
- <p class="bg-info text-center" style="padding: 8px;font-size: 20px" v-if="saveflag">新增页面</p>
44
- <!--修改-->
45
- <p class="bg-info text-center" style="padding: 8px;font-size: 20px" v-if="!saveflag">修改页面</p>
46
- </div>
47
- <table style="border-style: none;width: 95%;">
48
-
49
- <tr style="display:block;margin:15px 0;" v-for="(key,value) in infos">
50
- <td style="text-align: left;">
51
- <label class="font_normal_body" style="text-align: right;">{{key}}:</label>
52
- <input type="text" style="width: 70%;" class="input_search" v-model="value" v-bind:title="[key =='报表状态'?'1表示显示其他表示不显示':'']"/>
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="clear(true)">清空</button></td>
57
- <!--修改的保存-->
58
- <td style="text-align: right;width: 25%;" v-if="!saveflag"><button class="button_clear button_spacing" @click="saveOrUpdate(1)">保存</button></td>
59
- <!--新增的保存-->
60
- <td style="text-align: left;width: 25%;" v-if="saveflag"><button class="button_search button_spacing" @click="saveOrUpdate(2)">保存</button></td>
61
- <td style="text-align: left;width: 25%;"><button class="button_search button_spacing" @click="goback">返回</button></td>
62
- </tr>
63
- </table>
64
- </div>
65
-
66
- </div>
67
- </partial-view>
68
- </div>
69
- </template>
70
-
71
- <script>
72
- import {HttpResetClass} from "vue-client";
73
-
74
- export default {
75
- title: '报表选项',
76
- props: {
77
- inindex:{}
78
- },
79
- data () {
80
- return {
81
- saveflag: false,
82
- types: [],
83
- row:null,
84
- infos: {
85
- '报表名称': '',
86
- '连接页面': '',
87
- '报表类型': '',
88
- '图片路径': '',
89
- '添 加 人': '',
90
- '报表状态': ''
91
- },
92
- styles:this.$appdata.getSingleValue('报表样式')?this.$appdata.getSingleValue('报表样式'):'2',
93
- saveinfo:{},
94
- filtrate:false,
95
- modelinfo: {
96
- f_report_name: '',
97
- f_report_type: '',
98
- f_rank: '1'
99
- },
100
- config:{
101
- f_report_name: '报表名称',
102
- f_report_path: '连接页面',
103
- f_report_type: '报表类型',
104
- f_image_path: '图片路径',
105
- f_operator: '添 加 人',
106
- f_rank: '报表状态'
107
- },
108
- conditionStr:'1=1',
109
- reportNames: [],
110
- reportTypes: [],
111
- reportState : [{label: '全部', value: ''},{label: '显示', value: '1'},{label: '未显示', value: 'null'},],
112
- tablename: 't_report_type'
113
- }
114
- },
115
- ready (){
116
- // 获取所有报表类型
117
- this.getReportInfo(null,'1=1 and f_rank=1')
118
- this.getReportName()
119
- this.getReportType()
120
- },
121
- methods: {
122
- getReportInfo(tname,cond){
123
- this.$refs.pv.load('rs/sql/manageSingleTable', {
124
- data: {
125
- tablename: tname ? tname:this.tablename,
126
- condition: cond ? cond:this.conditionStr
127
- }
128
- }).then((res) => {
129
- console.log('sssss:',res.data)
130
- this.types = res.data
131
- }).catch((error) => {
132
-
133
- })
134
- },
135
- // 返回
136
- goback(){
137
- this.chaxun()
138
- },
139
- // 保存
140
- saveReport(){
141
- for (let key in this.infos) {
142
- this.infos[key] =''
143
- }
144
- this.saveflag = true
145
- this.filtrate = true
146
- },
147
- // 查询
148
- chaxun(){
149
- this.getReportInfo()
150
- this.filtrate = false
151
- },
152
- changecolor(index,type){
153
- this.row=index
154
- },
155
- async getReportName(){
156
- let HttpReset = new HttpResetClass()
157
- var data = await HttpReset.load('POST', 'rs/sql/singleTable_Final', {
158
- data: {
159
- condition: this.conditionStr,
160
- tablename: this.tablename,
161
- groupitem: 'f_report_name',
162
- orderitem: 'f_report_name',
163
- items: 'f_report_name'
164
- }
165
- }, {resolveMsg: null, rejectMsg: '获取报表名称失败!'})
166
- let nameArr = [{label: '全部', value: ''}]
167
- for (let row of data.data){
168
- nameArr.push({label: row.f_report_name, value: row.f_report_name})
169
- }
170
- this.reportNames = nameArr
171
- },
172
- clear(val){
173
- if(val){
174
- for (let key in this.infos) {
175
- this.infos[key] =''
176
- }
177
- }else{
178
- for (let key in this.modelinfo) {
179
- this.modelinfo[key] =[]
180
- }
181
- }
182
- },
183
- async getReportType(){
184
- let HttpReset = new HttpResetClass()
185
- var data = await HttpReset.load('POST', 'rs/sql/singleTable_Final', {
186
- data: {
187
- condition: this.conditionStr,
188
- tablename: this.tablename,
189
- groupitem: 'f_report_type',
190
- orderitem: 'f_report_type',
191
- items: 'f_report_type'
192
- }
193
- }, {resolveMsg: null, rejectMsg: '获取报表类型失败!'})
194
- let typeArr = [{label: '全部', value: ''}]
195
- for (let row of data.data){
196
- typeArr.push({label: row.f_report_type, value: row.f_report_type})
197
- }
198
- this.reportTypes = typeArr
199
- },
200
- Update(){
201
- this.saveflag = false
202
- if (this.$login.r.includes('报表配置权限')) {
203
- this.filtrate=!this.filtrate
204
- } else {
205
- this.$showMessage('您没有【报表配置权限】,若要进行报表配置,请联系管理员获取权限!')
206
- }
207
-
208
- },
209
- saveOrUpdate(val){
210
- // let sv={}
211
- for(let [key, value] of Object.entries(this.config)){
212
- let vl=this.infos[value]
213
- this.saveinfo[key]=vl
214
- }
215
- this.saveinfo['type']=val
216
-
217
- this.$resetpost('rs/logic/saveReport', this.saveinfo, {resolveMsg: '恭喜!提交成功!', rejectMsg: '提交错误!'}).then((res) => {
218
- this.$showAlert('保存成功', 'success', 3000)
219
- this.getReportInfo(null,'1=1 and f_rank=1')
220
- this.filtrate=!this.filtrate
221
- })
222
- console.log('this.saveinfo+++++',this.saveinfo)
223
- }
224
- },
225
- watch :{
226
- 'modelinfo': {
227
- deep: true,
228
- handler(val) {
229
- let c='1=1 '
230
- for (let [key, value] of Object.entries(val)) {
231
- if (value && value!='') {
232
- if(key=='f_rank' && value=='null'){
233
- c+='and '+ key + " is " + value +' or '+ key +" = ''"
234
- }else{
235
- c+='and '+ key + " in ('" + value.toString().replace(new RegExp(',','g'),"','") + "') "
236
- }
237
-
238
- }
239
- }
240
- this.conditionStr = c
241
- }
242
- },
243
- 'inindex' (val){
244
- this.infos={}
245
- this.saveinfo=this.types[val]
246
- let flag={}
247
- for(let [key, value] of Object.entries(this.saveinfo)){
248
- let name=this.config[key]
249
- if (name!=null){
250
- flag[name]=value
251
- }
252
- }
253
- this.infos=flag
254
- }
255
- }
256
- }
257
- </script>
1
+ <template>
2
+ <div class="flex">
3
+ <div class="row" style="height: 5%">
4
+ <div class="col-sm-10">
5
+ <label class="font_normal_body">报表名称:</label>
6
+ <v-select multiple
7
+ :value.sync="modelinfo.f_report_name"
8
+ class="select_list select"
9
+ v-model="modelinfo.f_report_name"
10
+ :options='reportNames' placeholder='请选择'
11
+ @keyup.enter="chaxun()"
12
+ ></v-select>
13
+ </div>
14
+ <div class="col-sm-2">
15
+ <button class="button_search left" @click="chaxun()">查询</button>
16
+ &nbsp;&nbsp;
17
+ </div>
18
+ </div>
19
+ <partial-view v-ref:pv>
20
+ <div class="span" v-show="!filtrate">
21
+ <p class="bg-info text-center" style="padding: 8px;background: #5ac0d9;color: white;border-radius:10px 10px 0 0" >报表类型
22
+ <button class="button_search-3 button_spacing border-right" v-if="this.$login.r.includes('报表配置权限')" @click="saveReport()">新增</button></p>
23
+ <div style="height: 87%;overflow: auto;width: 104%">
24
+ <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"
25
+ @click="$dispatch('select-type',index, type),changecolor(index,type,'0')"
26
+ :id="'div-'+index">
27
+ <div class="row auto"><img :src="type.f_image_path" alt="图片加载失败" class="img-rounded" style="width: 60px;"></div>
28
+ <div style="height:40px" class="row auto">{{index+1}}、
29
+ <span @click="changecolor(index,type,'1')" title="点击报表名称可对该报表配置进行修改!注:需要权限【报表配置权限】">{{type.f_report_name}}</span></div>
30
+ </div>
31
+ </div>
32
+
33
+ </div>
34
+ <div class="span" v-show="filtrate">
35
+ <p class="bg-info text-center" style="padding: 8px;background: #5ac0d9;color: white;border-radius:10px 10px 0 0">
36
+ <!--true新增,false修改-->
37
+ {{saveflag?'新增报表':'修改报表配置'}}
38
+ </p>
39
+ <div style="height: 94%;overflow: auto;width: 104%">
40
+ <table style="border-style: none;width: 95%;">
41
+
42
+ <tr style="display:block;margin:15px 0;" v-for="(key,value) in infos">
43
+ <td style="text-align: left;">
44
+ <label class="font_normal_body" style="text-align: right;">{{key}}:</label>
45
+ <input type="text" style="width: 70%;" class="input_search" v-model="value" v-bind:title="[key =='报表状态'?'1表示显示其他表示不显示':'']"/>
46
+ </td>
47
+ </tr>
48
+ <tr style="display:block;margin:15px 0;">
49
+ <td style="text-align: right;width: 50%;"><button class="button_clear button_spacing" @click="clear(true)">清空</button></td>
50
+ <!--修改的保存-->
51
+ <td style="text-align: right;width: 25%;" v-if="!saveflag"><button class="button_clear button_spacing" @click="saveOrUpdate(1)">保存</button></td>
52
+ <!--新增的保存-->
53
+ <td style="text-align: left;width: 25%;" v-if="saveflag"><button class="button_search button_spacing" @click="saveOrUpdate(2)">保存</button></td>
54
+ <td style="text-align: left;width: 25%;"><button class="button_search button_spacing" @click="goback">返回</button></td>
55
+ </tr>
56
+ </table>
57
+ </div>
58
+
59
+ </div>
60
+ </partial-view>
61
+ </div>
62
+ </template>
63
+
64
+ <script>
65
+ import {HttpResetClass} from "vue-client";
66
+
67
+ export default {
68
+ title: '报表选项',
69
+ props: {
70
+ inindex:{}
71
+ },
72
+ data () {
73
+ return {
74
+ saveflag: false,
75
+ types: [],
76
+ row:null,
77
+ infos: {
78
+ '报表名称': '',
79
+ '连接页面': '',
80
+ '报表类型': '',
81
+ '图片路径': '',
82
+ '添 加 人': '',
83
+ '报表状态': ''
84
+ },
85
+ styles:this.$appdata.getSingleValue('报表样式')?this.$appdata.getSingleValue('报表样式'):'2',
86
+ saveinfo:{},
87
+ filtrate:false,
88
+ modelinfo: {
89
+ f_report_name: '',
90
+ f_report_type: '',
91
+ f_rank: '1'
92
+ },
93
+ config:{
94
+ f_report_name: '报表名称',
95
+ f_report_path: '连接页面',
96
+ f_report_type: '报表类型',
97
+ f_image_path: '图片路径',
98
+ f_operator: '添 加 人',
99
+ f_rank: '报表状态'
100
+ },
101
+ conditionStr:'1=1',
102
+ reportNames: [],
103
+ reportTypes: [],
104
+ reportState : [{label: '全部', value: ''},{label: '显示', value: '1'},{label: '未显示', value: 'null'},],
105
+ tablename: 't_report_type'
106
+ }
107
+ },
108
+ ready (){
109
+ // 获取所有报表类型
110
+ this.getReportInfo(null,'1=1 and f_rank=1')
111
+ this.getReportName()
112
+ this.getReportType()
113
+ },
114
+ methods: {
115
+ getReportInfo(tname,cond){
116
+ this.$refs.pv.load('rs/sql/manageSingleTable', {
117
+ data: {
118
+ tablename: tname ? tname:this.tablename,
119
+ condition: cond ? cond:this.conditionStr
120
+ }
121
+ }).then((res) => {
122
+ console.log('sssss:',res.data)
123
+ this.types = res.data
124
+ }).catch((error) => {
125
+
126
+ })
127
+ },
128
+ // 返回
129
+ goback(){
130
+ this.chaxun()
131
+ },
132
+ // 保存
133
+ saveReport(){
134
+ for (let key in this.infos) {
135
+ this.infos[key] =''
136
+ }
137
+ this.saveflag = true
138
+ this.filtrate = true
139
+ },
140
+ // 查询
141
+ chaxun(){
142
+ this.getReportInfo()
143
+ this.filtrate = false
144
+ },
145
+ changecolor(index,type,int){
146
+ this.row=index
147
+
148
+ if (this.$login.r.includes('报表配置权限') && int === '1') {
149
+ this.saveflag = false
150
+ this.filtrate=!this.filtrate
151
+ }
152
+ },
153
+ async getReportName(){
154
+ let HttpReset = new HttpResetClass()
155
+ var data = await HttpReset.load('POST', 'rs/sql/singleTable_Final', {
156
+ data: {
157
+ condition: this.conditionStr,
158
+ tablename: this.tablename,
159
+ groupitem: 'f_report_name',
160
+ orderitem: 'f_report_name',
161
+ items: 'f_report_name'
162
+ }
163
+ }, {resolveMsg: null, rejectMsg: '获取报表名称失败!'})
164
+ let nameArr = [{label: '全部', value: ''}]
165
+ for (let row of data.data){
166
+ nameArr.push({label: row.f_report_name, value: row.f_report_name})
167
+ }
168
+ this.reportNames = nameArr
169
+ },
170
+ clear(val){
171
+ if(val){
172
+ for (let key in this.infos) {
173
+ this.infos[key] =''
174
+ }
175
+ }else{
176
+ for (let key in this.modelinfo) {
177
+ this.modelinfo[key] =[]
178
+ }
179
+ }
180
+ },
181
+ async getReportType(){
182
+ let HttpReset = new HttpResetClass()
183
+ var data = await HttpReset.load('POST', 'rs/sql/singleTable_Final', {
184
+ data: {
185
+ condition: this.conditionStr,
186
+ tablename: this.tablename,
187
+ groupitem: 'f_report_type',
188
+ orderitem: 'f_report_type',
189
+ items: 'f_report_type'
190
+ }
191
+ }, {resolveMsg: null, rejectMsg: '获取报表类型失败!'})
192
+ let typeArr = [{label: '全部', value: ''}]
193
+ for (let row of data.data){
194
+ typeArr.push({label: row.f_report_type, value: row.f_report_type})
195
+ }
196
+ this.reportTypes = typeArr
197
+ },
198
+ saveOrUpdate(val){
199
+ // let sv={}
200
+ for(let [key, value] of Object.entries(this.config)){
201
+ let vl=this.infos[value]
202
+ this.saveinfo[key]=vl
203
+ }
204
+ this.saveinfo['type']=val
205
+
206
+ this.$resetpost('rs/logic/saveReport', this.saveinfo, {resolveMsg: '恭喜!提交成功!', rejectMsg: '提交错误!'}).then((res) => {
207
+ this.$showAlert('保存成功', 'success', 3000)
208
+ this.getReportInfo(null,'1=1 and f_rank=1')
209
+ this.filtrate=!this.filtrate
210
+ })
211
+ console.log('this.saveinfo+++++',this.saveinfo)
212
+ }
213
+ },
214
+ watch :{
215
+ 'modelinfo': {
216
+ deep: true,
217
+ handler(val) {
218
+ let c='1=1 '
219
+ for (let [key, value] of Object.entries(val)) {
220
+ if (value && value!='') {
221
+ if(key=='f_rank' && value=='null'){
222
+ c+='and '+ key + " is " + value +' or '+ key +" = ''"
223
+ }else{
224
+ c+='and '+ key + " in ('" + value.toString().replace(new RegExp(',','g'),"','") + "') "
225
+ }
226
+
227
+ }
228
+ }
229
+ this.conditionStr = c
230
+ }
231
+ },
232
+ 'inindex' (val){
233
+ this.infos={}
234
+ this.saveinfo=this.types[val]
235
+ let flag={}
236
+ for(let [key, value] of Object.entries(this.saveinfo)){
237
+ let name=this.config[key]
238
+ if (name!=null){
239
+ flag[name]=value
240
+ }
241
+ }
242
+ this.infos=flag
243
+ }
244
+ }
245
+ }
246
+ </script>