ci-plus 1.8.5 → 1.8.7

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/README.md CHANGED
@@ -1,6 +1,11 @@
1
1
  ## 历史更新
2
2
 
3
3
  ```js
4
+ 1.8.7
5
+ 1、删除旧标识卡用到的两个函数导出
6
+ 2、添加表头设置表单的翻译
7
+ 1.8.6
8
+ 1、修改 ciuploadV4 组件中的一个bug
4
9
  1.8.5
5
10
  1、新增 ciuploadV4 组件
6
11
  2、一些导出小优化
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ci-plus",
3
- "version": "1.8.5",
3
+ "version": "1.8.7",
4
4
  "description": "ci组件库",
5
5
  "main": "./index.ts",
6
6
  "scripts": {
@@ -167,7 +167,7 @@ interface Props {
167
167
  url?: string // 上传和下载模板的接口(当需要将附件传递回父组件时不需要传递此属性)
168
168
  uploadUrl?: string // 上传附件的接口
169
169
  parameter?: Object // 模板下载的时候请求需要携带的参数:{state: 1}
170
- data?: Object //上传携带的其他数据对象:{userId: 1, userName: '张三'}
170
+ data?: any //上传携带的其他数据对象:{userId: 1, userName: '张三'}
171
171
  title?: string // 上传按钮的名称
172
172
  multiple?: boolean // 是否支持多文件
173
173
  limit?: number // 最大文件数量
@@ -409,7 +409,11 @@ const formwork = () => {
409
409
  onMounted(async () => {
410
410
  if (props.url) {
411
411
  affiliationOptions.value = await getAffiliationOptions()
412
- warehouseOptions.value = await getWarehouseList()
412
+ if (props.data) {
413
+ warehouseOptions.value = await getWarehouseList({
414
+ storage_type: props.data?.storage_type || 'CAILIAO'
415
+ })
416
+ }
413
417
  } else {
414
418
  affiliationOptions.value = []
415
419
  warehouseOptions.value = []
@@ -2,24 +2,22 @@
2
2
  <el-dialog v-model="state" v-bind="config" draggable>
3
3
  <div class="container">
4
4
  <b>
5
- 按住
5
+ {{t('sortableTable.sortableTableDialog.holdDown')}}
6
6
  <el-icon><Rank /></el-icon>
7
- 进行移动,点击表头名字进行隐藏, 点击确定进行保存,点击
8
- <!-- <Star style="width: 1em; height: 1em; margin-right: 8px" /> -->
7
+ {{t('sortableTable.sortableTableDialog.clickName')}}
9
8
  <svg-icon name="regular-center" size="14"></svg-icon>
10
- 固定,点击
11
- <!-- <StarFilled style="width: 1em; height: 1em; margin-right: 8px" /> -->
9
+ {{t('sortableTable.sortableTableDialog.fixed')}}
12
10
  <svg-icon name="regular-left" size="14" color="#2C93FF"></svg-icon>
13
-
11
+ {{t('sortableTable.sortableTableDialog.or')}}
14
12
  <svg-icon name="regular-right" size="14" color="#2C93FF"></svg-icon>
15
- 取消固定
13
+ {{t('sortableTable.sortableTableDialog.cancelTheFixation')}}
16
14
 
17
15
  <el-popover
18
16
  placement="bottom-start"
19
- title="提示"
17
+ :title="t('sortableTable.sortableTableDialog.prompt')"
20
18
  :width="200"
21
19
  trigger="hover"
22
- content="点击保存会将本表头的配置存储到数据库,下次登录还是你保存的配置,不保存的话,只在本次配置有效"
20
+ :content="t('sortableTable.sortableTableDialog.promptVal')"
23
21
  >
24
22
  <template #reference>
25
23
  <el-icon style="font-size: 14px"><QuestionFilled /></el-icon>
@@ -33,13 +31,13 @@
33
31
  show-pin
34
32
  />
35
33
 
36
- <el-tooltip content="将表头配置保存到数据库" placement="top-end">
34
+ <el-tooltip :content="t('sortableTable.sortableTableDialog.saveDatabase')" placement="top-end">
37
35
  <el-button
38
36
  type="primary"
39
37
  style="width: 100%; margin-top: 10px"
40
38
  @click="$emit('submit', modelValue)"
41
39
  >
42
- 保存
40
+ {{t('public.save')}}
43
41
  </el-button>
44
42
  </el-tooltip>
45
43
  </div>
@@ -53,7 +51,7 @@ import sortableTableDragItem from './utils/sortableTableDragItem.vue'
53
51
  import { Rank } from '@element-plus/icons-vue'
54
52
  import SvgIcon from '../svgIcon/svgicon.vue'
55
53
  import { ElDialog,ElButton,ElTooltip,ElIcon,ElPopover } from 'element-plus'
56
-
54
+ import t from '../utils/lang/index'
57
55
  const emits = defineEmits(['update:modelValue', 'update:data', 'submit'])
58
56
  const state = ref(false)
59
57
  const props = defineProps<SortableTableDialog>()
@@ -33,11 +33,11 @@
33
33
  </div>
34
34
  <div class="ifshow">
35
35
  <el-button :type="element.hide ? 'primary' : ''" @click="handleShow(element)" size="small">
36
- {{ element.hide ? '显示' : '隐藏' }}
36
+ {{ element.hide ? t('sortableTable.sortableTableDialog.show') : t('sortableTable.sortableTableDialog.hide') }}
37
37
  </el-button>
38
38
  </div>
39
39
  <div class="widths">
40
- 宽度:
40
+ {{t('sortableTable.sortableTableDialog.width')}}:
41
41
  <el-input class="w-50 m-2" v-model="element.col.width" size="small" width="50"></el-input>
42
42
  </div>
43
43
  <sortable-table-drag-item v-if="element.children" v-model="element.children" />
@@ -48,7 +48,7 @@
48
48
  import SvgIcon from '../../svgIcon/index'
49
49
  import { computed } from 'vue'
50
50
  import { ElInput, ElButton , ElIcon} from 'element-plus'
51
- // import draggable from 'vuedraggable'
51
+ import t from '../utils/lang/index'
52
52
  import { VueDraggable } from 'vue-draggable-plus'
53
53
  import { SortColumn, SortableTableIns } from './interface'
54
54
  import { Rank } from '@element-plus/icons-vue'
@@ -2,7 +2,6 @@ import apis from './baseApi'
2
2
  import axios from 'axios'
3
3
  const { produceModule } = apis
4
4
 
5
-
6
5
  export interface User {
7
6
  user_code: string // 登录名:'148128'
8
7
  user_name: string // 用户名:'方卿'
@@ -20,12 +19,12 @@ let users = {
20
19
  user_code: UserData.loginName,
21
20
  user_name: UserData.name,
22
21
  dept_id: UserData.deptId,
23
- dept_name: UserData.deptName,
22
+ dept_name: UserData.deptName
24
23
  }
25
24
  let user = JSON.parse(JSON.stringify(users))
26
25
 
27
26
  const cardPrintAxios = axios.create({
28
- withCredentials: true,
27
+ withCredentials: true
29
28
  })
30
29
 
31
30
  cardPrintAxios.interceptors.request.use(
@@ -44,7 +43,7 @@ cardPrintAxios.interceptors.request.use(
44
43
  }
45
44
  return config
46
45
  },
47
- (error) => Promise.reject(error),
46
+ (error) => Promise.reject(error)
48
47
  )
49
48
 
50
49
  interface AffiliationRES {
@@ -75,7 +74,7 @@ interface AffiliationRES {
75
74
  const getAffiliationOptions = async (
76
75
  list?: any[],
77
76
  keys: string[] = ['label', 'value'],
78
- val: string[] = ['name', 'id'],
77
+ val: string[] = ['name', 'id']
79
78
  ) => {
80
79
  let url = produceModule + 'company_optional_scope_get/'
81
80
  let options: { [key: string]: any }[] = []
@@ -83,8 +82,8 @@ const getAffiliationOptions = async (
83
82
  const res = await cardPrintAxios.get(url, {
84
83
  params: {
85
84
  page: 1,
86
- pageSize: 100000,
87
- },
85
+ pageSize: 100000
86
+ }
88
87
  })
89
88
  console.log('%c Line:360 🍊🍤 res666', 'color:#7f2b82', res)
90
89
 
@@ -116,13 +115,21 @@ const getAffiliationOptions = async (
116
115
  }
117
116
 
118
117
  // 获取仓库列表数据 warehouse_get
119
- const getWarehouseList = async (
120
- list?: any[],
121
- keys: string[] = ['label', 'value'],
122
- val: string[] = ['name', 'id'],
123
- storage_type: string = 'CAILIAO', // 仓库类型
124
- search?: string, // 搜索条件,
125
- ) => {
118
+ const getWarehouseList = async (par: {
119
+ list?: any[]
120
+ keys?: string[]
121
+ val?: string[]
122
+ storage_type?: string // 仓库类型
123
+ search?: string // 搜索条件,
124
+ }) => {
125
+ let {
126
+ list = [], // 存储接口返回的源数据
127
+ keys = ['label', 'value'],
128
+ val = ['name', 'id'],
129
+ storage_type = 'CAILIAO',
130
+ search // 搜索参数
131
+ } = par
132
+
126
133
  let url = produceModule + 'warehouse_get/'
127
134
  let options: { [key: string]: any }[] = []
128
135
  try {
@@ -131,8 +138,8 @@ const getWarehouseList = async (
131
138
  page: 1,
132
139
  pageSize: 100000,
133
140
  warehouse_type_codes: storage_type,
134
- name: search,
135
- },
141
+ name: search
142
+ }
136
143
  })
137
144
  console.log('%c Line:360 🍊 res', 'color:#7f2b82', res)
138
145
  if (
@@ -141,6 +148,7 @@ const getWarehouseList = async (
141
148
  Array.isArray(res.data?.data) &&
142
149
  res.data.data.length > 0
143
150
  ) {
151
+ list = res.data.data
144
152
  res.data.data.forEach((item: AffiliationRES) => {
145
153
  const obj: { [key: string]: any } = {}
146
154
  keys.forEach((key, index) => {
@@ -151,14 +159,15 @@ const getWarehouseList = async (
151
159
  })
152
160
  } else {
153
161
  console.error('请求失败:', res.data.msg)
162
+ list = []
154
163
  options = []
155
164
  }
156
165
  } catch (error) {
157
166
  console.error('请求失败:', error)
167
+ list = []
158
168
  options = []
159
169
  }
160
170
  console.log('%c Line:1338 🥝 result', 'color:#ea7e5c', options)
161
- list = options
162
171
  return options
163
172
  }
164
173
 
@@ -3,7 +3,7 @@ export { default as withInstall } from './withinstall/index'
3
3
  // export { default as setCardList } from './cardPrint'; // 导入默认的导出
4
4
  // export * from './cardPrint'; // 导入所有导出(不包含默认导出)
5
5
  import withInstall from './withinstall/index'
6
- import { cardPrint, setCardList } from './cardPrint'
6
+ // import { cardPrint, setCardList } from './cardPrint'
7
7
  import apis from './baseApi'
8
8
  import { dayjs, setDate, setDateTime } from './Dayjs'
9
9
  import ajaxBox from './ajaxBox' // 处理文件下载方法
@@ -17,8 +17,8 @@ import cardPrintAxios, {
17
17
  import { setId, getSend, sort } from '../sortableTable/utils/dataOpt'
18
18
 
19
19
  let func = {
20
- cardPrint,
21
- setCardList,
20
+ // cardPrint,
21
+ // setCardList,
22
22
  withInstall,
23
23
  setDate,
24
24
  setDateTime,
@@ -19,6 +19,19 @@ const en = {
19
19
  aweekAgo: 'A week ago', // 前一周
20
20
  lastMonth: 'Last Month', // 前一月,
21
21
  last3Month: 'Last 3 Month' // 最近3个月
22
+ },
23
+ sortableTableDialog:{
24
+ holdDown:'hold down',
25
+ clickName:'Move, click on the header name to hide, click OK to save, click',
26
+ fixed:'Fixed, click',
27
+ or:' Or ',
28
+ cancelTheFixation:'cancel the fixation',
29
+ prompt:'Prompt:',
30
+ promptVal:'Clicking "Save" will save the configuration of this header to the database. The configuration you saved will remain the same for the next login. If not saved, it will only be valid for this configuration',
31
+ saveDatabase:'Save header configuration to database',
32
+ show:'Show',
33
+ hide:'Hide',
34
+ width:'Width'
22
35
  }
23
36
  },
24
37
  fileRelated:{
@@ -19,6 +19,19 @@ const zh = {
19
19
  aweekAgo: '一周前',
20
20
  lastMonth: '前一月',
21
21
  last3Month: '最近3个月'
22
+ },
23
+ sortableTableDialog:{
24
+ holdDown:'按住',
25
+ clickName:'进行移动,点击表头名字进行隐藏, 点击确定进行保存,点击',
26
+ fixed:'固定,点击',
27
+ or:' 或 ',
28
+ cancelTheFixation:'取消固定',
29
+ prompt:'提示:',
30
+ promptVal:'点击保存会将本表头的配置存储到数据库,下次登录还是你保存的配置,不保存的话,只在本次配置有效',
31
+ saveDatabase:'将表头配置保存到数据库',
32
+ show:'显示',
33
+ hide:'隐藏',
34
+ width:'宽度'
22
35
  }
23
36
  },
24
37
  fileRelated:{