@cmstops/pro-compo 0.1.88 → 0.1.90

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,4 +1,4 @@
1
- import { defineComponent, ref, watch, computed, onMounted, openBlock, createElementBlock, createElementVNode, renderSlot, createVNode, unref, withCtx, Fragment, renderList, createBlock, withDirectives, createTextVNode, vShow, createCommentVNode, normalizeClass, toDisplayString } from "vue";
1
+ import { defineComponent, ref, watch, computed, onMounted, openBlock, createElementBlock, createElementVNode, renderSlot, createVNode, unref, createBlock, withCtx, Fragment, renderList, createCommentVNode, withDirectives, createTextVNode, vShow, normalizeClass, toDisplayString } from "vue";
2
2
  import { Input, RangePicker, Select, Option, Button } from "@arco-design/web-vue";
3
3
  import { IconRefresh, IconUpload } from "@arco-design/web-vue/es/icon";
4
4
  import { rateOptions, keywordsSelection } from "../../../script/filter.js";
@@ -124,7 +124,8 @@ const _sfc_main = defineComponent({
124
124
  "default-value": ["00:00:00", "23:59:59"],
125
125
  onClear: clearDatePicker
126
126
  }, null, 8, ["modelValue"]),
127
- createVNode(unref(Select), {
127
+ _ctx.activeMediaType === "all" ? (openBlock(), createBlock(unref(Select), {
128
+ key: 0,
128
129
  modelValue: filter.value.upload_by,
129
130
  "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => filter.value.upload_by = $event),
130
131
  label: filter.value.upload_by === "\u5168\u90E8\u4EBA\u5458" ? "" : filter.value.upload_by,
@@ -147,7 +148,7 @@ const _sfc_main = defineComponent({
147
148
  }), 128))
148
149
  ]),
149
150
  _: 1
150
- }, 8, ["modelValue", "label"]),
151
+ }, 8, ["modelValue", "label"])) : createCommentVNode("v-if", true),
151
152
  createVNode(unref(Select), {
152
153
  modelValue: filter.value.wh_rate,
153
154
  "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => filter.value.wh_rate = $event),
@@ -2,6 +2,7 @@ import { defineComponent, inject, ref, onMounted, computed, openBlock, createEle
2
2
  import { Tabs, TabPane, Button, Breadcrumb, BreadcrumbItem } from "@arco-design/web-vue";
3
3
  import { IconArrowLeft } from "@arco-design/web-vue/es/icon";
4
4
  import { getAttachmentsAll, getAttachmentsMy, getDirectories } from "../../script/api.js";
5
+ import { getUserInfo } from "../../../userAvater/script/api.js";
5
6
  import _sfc_main$1 from "./DocAiMediaSelected/index.js";
6
7
  import _sfc_main$2 from "./SystemResourceSelected/index.js";
7
8
  import _sfc_main$3 from "./ToolbarSearch/index.js";
@@ -71,6 +72,7 @@ const _sfc_main = defineComponent({
71
72
  if (props.catalogProps && props.catalogProps !== "all") {
72
73
  getFilesQueryParam.value.catalog = props.catalogProps;
73
74
  }
75
+ loadUserInfo();
74
76
  loadData();
75
77
  });
76
78
  const resourcesHeight = computed(() => {
@@ -126,6 +128,13 @@ const _sfc_main = defineComponent({
126
128
  resetQuery(breadCrumbs.value);
127
129
  loadData({ goBack: true });
128
130
  };
131
+ const defaultUploadBy = ref(1);
132
+ const loadUserInfo = async () => {
133
+ const res = await getUserInfo(props.BASE_API);
134
+ if (res.code !== 0)
135
+ return;
136
+ defaultUploadBy.value = res.message.id;
137
+ };
129
138
  const loadData = (params) => {
130
139
  isOver.value = false;
131
140
  const API = activeMediaType.value === "all" ? api.value.getAttachmentsAll : api.value.getAttachmentsMy;
@@ -134,6 +143,9 @@ const _sfc_main = defineComponent({
134
143
  query = Object.assign(query, filter.value);
135
144
  folderList.value = [];
136
145
  }
146
+ if (activeMediaType.value === "my") {
147
+ query.upload_by = defaultUploadBy.value;
148
+ }
137
149
  const promise = filter.value ? [API(baseApi, query)] : [
138
150
  API(baseApi, query),
139
151
  getDirectories(baseApi, { parent_id: query.directory_id })
@@ -33,7 +33,9 @@ const _sfc_main = defineComponent({
33
33
  return item.uid ? item.alias : `\u89D2\u8272\uFF1A${item.alias}`;
34
34
  };
35
35
  const getUserAlias = (user) => {
36
- const alias2 = user.alias || user.title || user.name;
36
+ if (!user)
37
+ return "--";
38
+ const alias2 = user.alias || user.title || user.name || "\u672A\u77E5";
37
39
  return alias2.length > 1 ? `${alias2.slice(0, 1)}` : alias2;
38
40
  };
39
41
  const addUser = () => {
@@ -125,7 +125,8 @@ const _sfc_main = vue.defineComponent({
125
125
  "default-value": ["00:00:00", "23:59:59"],
126
126
  onClear: clearDatePicker
127
127
  }, null, 8, ["modelValue"]),
128
- vue.createVNode(vue.unref(webVue.Select), {
128
+ _ctx.activeMediaType === "all" ? (vue.openBlock(), vue.createBlock(vue.unref(webVue.Select), {
129
+ key: 0,
129
130
  modelValue: filter$1.value.upload_by,
130
131
  "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => filter$1.value.upload_by = $event),
131
132
  label: filter$1.value.upload_by === "\u5168\u90E8\u4EBA\u5458" ? "" : filter$1.value.upload_by,
@@ -148,7 +149,7 @@ const _sfc_main = vue.defineComponent({
148
149
  }), 128))
149
150
  ]),
150
151
  _: 1
151
- }, 8, ["modelValue", "label"]),
152
+ }, 8, ["modelValue", "label"])) : vue.createCommentVNode("v-if", true),
152
153
  vue.createVNode(vue.unref(webVue.Select), {
153
154
  modelValue: filter$1.value.wh_rate,
154
155
  "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => filter$1.value.wh_rate = $event),
@@ -3,6 +3,7 @@ var vue = require("vue");
3
3
  var webVue = require("@arco-design/web-vue");
4
4
  var icon = require("@arco-design/web-vue/es/icon");
5
5
  var api = require("../../script/api.js");
6
+ var api$1 = require("../../../userAvater/script/api.js");
6
7
  var index = require("./DocAiMediaSelected/index.js");
7
8
  var index$1 = require("./SystemResourceSelected/index.js");
8
9
  var index$2 = require("./ToolbarSearch/index.js");
@@ -55,7 +56,7 @@ const _sfc_main = vue.defineComponent({
55
56
  const activeMediaType = vue.ref(
56
57
  props.ai_static_covers && props.ai_static_covers.length ? "ai" : mediaUseType ? "system" : "all"
57
58
  );
58
- const api$1 = vue.ref({ getAttachmentsAll: api.getAttachmentsAll, getAttachmentsMy: api.getAttachmentsMy });
59
+ const api$2 = vue.ref({ getAttachmentsAll: api.getAttachmentsAll, getAttachmentsMy: api.getAttachmentsMy });
59
60
  const currentDirectory = vue.ref({
60
61
  directory_id: 0,
61
62
  alias: ""
@@ -72,6 +73,7 @@ const _sfc_main = vue.defineComponent({
72
73
  if (props.catalogProps && props.catalogProps !== "all") {
73
74
  getFilesQueryParam.value.catalog = props.catalogProps;
74
75
  }
76
+ loadUserInfo();
75
77
  loadData();
76
78
  });
77
79
  const resourcesHeight = vue.computed(() => {
@@ -127,14 +129,24 @@ const _sfc_main = vue.defineComponent({
127
129
  resetQuery(breadCrumbs.value);
128
130
  loadData({ goBack: true });
129
131
  };
132
+ const defaultUploadBy = vue.ref(1);
133
+ const loadUserInfo = async () => {
134
+ const res = await api$1.getUserInfo(props.BASE_API);
135
+ if (res.code !== 0)
136
+ return;
137
+ defaultUploadBy.value = res.message.id;
138
+ };
130
139
  const loadData = (params) => {
131
140
  isOver.value = false;
132
- const API = activeMediaType.value === "all" ? api$1.value.getAttachmentsAll : api$1.value.getAttachmentsMy;
141
+ const API = activeMediaType.value === "all" ? api$2.value.getAttachmentsAll : api$2.value.getAttachmentsMy;
133
142
  let query = { ...getFilesQueryParam.value };
134
143
  if (filter.value) {
135
144
  query = Object.assign(query, filter.value);
136
145
  folderList.value = [];
137
146
  }
147
+ if (activeMediaType.value === "my") {
148
+ query.upload_by = defaultUploadBy.value;
149
+ }
138
150
  const promise = filter.value ? [API(baseApi, query)] : [
139
151
  API(baseApi, query),
140
152
  api.getDirectories(baseApi, { parent_id: query.directory_id })
@@ -34,7 +34,9 @@ const _sfc_main = vue.defineComponent({
34
34
  return item.uid ? item.alias : `\u89D2\u8272\uFF1A${item.alias}`;
35
35
  };
36
36
  const getUserAlias = (user) => {
37
- const alias2 = user.alias || user.title || user.name;
37
+ if (!user)
38
+ return "--";
39
+ const alias2 = user.alias || user.title || user.name || "\u672A\u77E5";
38
40
  return alias2.length > 1 ? `${alias2.slice(0, 1)}` : alias2;
39
41
  };
40
42
  const addUser = () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cmstops/pro-compo",
3
- "version": "0.1.88",
3
+ "version": "0.1.90",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "vue",