@zscreate/zhxy-app-component 1.0.257 → 1.0.259

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.
@@ -4,15 +4,15 @@
4
4
  <custom-top :isBack="true">
5
5
  <block slot="backText"></block>
6
6
  </custom-top>
7
- <common_component v-if="name" :name="name" @ok="handleOk" />
7
+ <WorkFlowApp v-if="name === 'workflowApp'" @ok="handleOk" @cancel="handleCancel" />
8
8
  </view>
9
9
  </template>
10
10
  <script>
11
- import common_component from "./common_component.vue";
11
+ import WorkFlowApp from "../workFlowApp/workFlowApp.vue";
12
12
 
13
13
  export default {
14
14
  components: {
15
- common_component
15
+ WorkFlowApp,
16
16
  },
17
17
  name: "common",
18
18
  data() {
@@ -29,6 +29,11 @@ export default {
29
29
 
30
30
  },
31
31
  methods: {
32
+ handleCancel() {
33
+ uni.navigateBack({ //uni.navigateTo跳转的返回,默认1为返回上一级
34
+ delta: 1
35
+ })
36
+ },
32
37
  handleOk(data) {
33
38
  let pages = getCurrentPages(); //获取所有页面栈实例列表
34
39
  let nowPage = pages[pages.length - 1]; //当前页页面实例
@@ -1,6 +1,6 @@
1
1
  <template>
2
- <view style="height: 100%; padding: 0 10rpx">
3
- <view style="padding: 10rpx 0 ;display: flex">
2
+ <view style="height: 100%; padding: 0 10rpx; display: flex; flex-direction: column">
3
+ <view style="padding: 10rpx 0 ;display: flex; flex-shrink: 0">
4
4
  <view>
5
5
  <u-button size="mini" :ripple="true" ripple-bg-color="#4480E3" @click="isFilterShow = true">
6
6
  <u-icon name="search" color="#2979ff" size="28"></u-icon> 查询
@@ -15,7 +15,7 @@
15
15
  <u-popup v-model="isFilterShow" mode="bottom" z-index="200">
16
16
  <view class="filter_wrap" style="padding: 20rpx">
17
17
  <u-form :model="searchForm" ref="uForm">
18
- <u-form-item label="姓名"><u-input v-model="searchForm.user_name" /></u-form-item>
18
+ <u-form-item label="申请人"><u-input v-model="searchForm.user_name" /></u-form-item>
19
19
  <u-form-item label="状态">
20
20
  <u-input v-model="searchForm.business_status_str" type="select" @click="statusShow = true" />
21
21
  </u-form-item>
@@ -26,7 +26,7 @@
26
26
  </view>
27
27
  </u-popup>
28
28
  <u-picker mode="selector" v-model="statusShow" :range="statusRange" @confirm="selectStatus" range-key="label" />
29
- <view style="overflow: auto; height: calc(100vh - 340rpx)">
29
+ <view style="flex-shrink: 0; overflow: auto; flex: 1">
30
30
  <view class="grid-container" >
31
31
  <view v-for="(h, n) in header" :key='n' :class="{ 'grid-item': true }">
32
32
  <template v-if="h.columnName === '#'">
@@ -42,9 +42,13 @@
42
42
  <template v-for="(h, n) in header" >
43
43
  <view class="grid-item grid-item_data" >
44
44
  <template v-if="h.columnCode === 'check'">
45
- <u-checkbox-group @change="e => checkboxChange(e, t)">
46
- <u-checkbox class="custom_checkbox" v-model="t.checked" :name="t.id"></u-checkbox>
47
- </u-checkbox-group>
45
+ <u-radio-group :value="seletedData.map(item => item.id)" @change="e => radioChange(e, t)">
46
+ <u-radio class="custom_checkbox" :name="t.id"></u-radio>
47
+ </u-radio-group>
48
+
49
+ <!-- <u-checkbox-group @change="e => checkboxChange(e, t)">-->
50
+ <!-- <u-checkbox class="custom_checkbox" v-model="t.checked" :name="t.id"></u-checkbox>-->
51
+ <!-- </u-checkbox-group>-->
48
52
  </template>
49
53
  <template v-else-if="h.columnCode === 'action'">
50
54
  <button class="uni-button" size="mini" type="primary" @click="selectItem(t)">选择</button>
@@ -83,7 +87,7 @@
83
87
 
84
88
  <view style="display: flex; justify-content: center; padding: 10rpx" >
85
89
  <button class="uni-button" size="mini" type="primary" @click="handleOk">确认</button>
86
- <button class="uni-button" size="mini" type="primary" style="background-color: red" @click="show = false">取消</button>
90
+ <button class="uni-button" size="mini" type="primary" style="background-color: red" @click="handleCancel">取消</button>
87
91
  </view>
88
92
  </view>
89
93
  </template>
@@ -240,6 +244,13 @@ export default {
240
244
  handleOk() {
241
245
  return this.$emit('ok', this.seletedData)
242
246
  },
247
+ handleCancel() {
248
+ return this.$emit('cancel')
249
+ },
250
+ // 单选
251
+ radioChange(e, t) {
252
+ this.seletedData = [t]
253
+ },
243
254
  // 单选
244
255
  checkboxChange(e, t) {
245
256
  const isCheck = Boolean(Array.isArray(e) ? e[0] : e)
@@ -289,7 +300,7 @@ export default {
289
300
  <style lang="less">
290
301
  .custom_checkbox {
291
302
  display: initial;
292
- .u-checkbox__label {
303
+ .u-checkbox__label, .u-radio__label {
293
304
  display: none !important;
294
305
  }
295
306
  .u-icon {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zscreate/zhxy-app-component",
3
- "version": "1.0.257",
3
+ "version": "1.0.259",
4
4
  "private": false,
5
5
  "description": "zhxy-app-component",
6
6
  "main": "index.js",
@@ -1,51 +0,0 @@
1
-
2
- <template>
3
- <view >
4
- 123
5
- 123
6
- 123
7
- 123
8
- 123
9
- 123
10
- 123
11
- 123
12
- 123
13
- 123
14
- 123
15
- 123
16
- 123
17
- 123
18
- 123
19
- 123
20
- 123
21
- 123
22
- 123
23
- 123
24
- <!-- <WorkFlowApp v-if="name === 'workflowApp'" @ok="handleOk" />-->
25
- </view>
26
- </template>
27
-
28
- <script>
29
- // import WorkFlowApp from "../workFlowApp/workFlowApp.vue";
30
-
31
- export default {
32
- name: "commonComponent",
33
- // components: {WorkFlowApp},
34
- props: {
35
- name: String,
36
- },
37
- created() {
38
- console.log(this.name)
39
- },
40
- methods: {
41
- handleOk(...args) {
42
- this.$emit('ok', ...args)
43
- }
44
- }
45
- }
46
- </script>
47
-
48
-
49
- <style scoped lang="scss">
50
-
51
- </style>
@@ -1,31 +0,0 @@
1
-
2
- <template>
3
- <view style="width: 100%; height: 100%">
4
- <WorkFlowApp v-if="name === 'workflowApp'" @ok="handleOk" />
5
- </view>
6
- </template>
7
-
8
- <script>
9
- import WorkFlowApp from "../workFlowApp/workFlowApp.vue";
10
-
11
- export default {
12
- name: "commonComponent",
13
- components: {WorkFlowApp},
14
- props: {
15
- name: String,
16
- },
17
- created() {
18
- console.log(this.name)
19
- },
20
- methods: {
21
- handleOk(...args) {
22
- this.$emit('ok', ...args)
23
- }
24
- }
25
- }
26
- </script>
27
-
28
-
29
- <style scoped lang="scss">
30
-
31
- </style>
@@ -1,29 +0,0 @@
1
- <script>
2
- import WorkFlowApp from "../workFlowApp/workFlowApp.vue";
3
-
4
- export default {
5
- name: "commonComponent",
6
- components: {WorkFlowApp},
7
- props: {
8
- name: String,
9
- },
10
- created() {
11
- debugger
12
- },
13
- methods: {
14
- handleOk(...args) {
15
- this.$emit('ok', ...args)
16
- }
17
- }
18
- }
19
- </script>
20
-
21
- <template>
22
- <view style="width: 100%; height: 100%">
23
- <WorkFlowApp v-if="name === 'workflowApp'" @ok="handleOk" />
24
- </view>
25
- </template>
26
-
27
- <style scoped lang="scss">
28
-
29
- </style>