@newview/file-ui 1.1.16 → 1.1.18
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/dist/file-ui.js +177 -177
- package/dist/file-ui.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/types/index.d.ts +3 -3
- /package/types/{DicSelect.d.ts → NvDicSelect.d.ts} +0 -0
- /package/types/{StructureSelect.d.ts → NvStructureSelect.d.ts} +0 -0
- /package/types/{StructureTypeSelect.d.ts → NvStructureTypeSelect.d.ts} +0 -0
package/dist/file-ui.js
CHANGED
|
@@ -5,7 +5,7 @@ var __publicField = (obj, key, value) => {
|
|
|
5
5
|
return value;
|
|
6
6
|
};
|
|
7
7
|
import { BaseInstance } from "@newview/base-vue";
|
|
8
|
-
import { defineComponent, ref, watch, resolveComponent, openBlock, createElementBlock, Fragment, createVNode, withCtx, createElementVNode, reactive, renderList, createBlock, createSlots, normalizeClass, withModifiers, createCommentVNode, toDisplayString, createTextVNode, pushScopeId, popScopeId, onMounted, onBeforeUnmount, nextTick, h, watchEffect,
|
|
8
|
+
import { defineComponent, ref, watch, resolveComponent, openBlock, createElementBlock, Fragment, createVNode, withCtx, createElementVNode, reactive, renderList, createBlock, createSlots, normalizeClass, withModifiers, createCommentVNode, toDisplayString, createTextVNode, pushScopeId, popScopeId, onMounted, onBeforeUnmount, nextTick, h, watchEffect, withDirectives, vShow, normalizeStyle, vModelText } from "vue";
|
|
9
9
|
import { QueryWrapper, storageInfo } from "@newview/infrastructure";
|
|
10
10
|
import { OSSFileApi, FileApi, UploadApi, FileInfoApi } from "@newview/fileservice-api";
|
|
11
11
|
import { DictionaryDetailApi, DataStructureApi, StructureInstanceApi } from "@newview/basics-api";
|
|
@@ -15310,163 +15310,6 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
15310
15310
|
], 2);
|
|
15311
15311
|
}
|
|
15312
15312
|
const TextEditor2 = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$4], ["__scopeId", "data-v-5812cc0f"]]);
|
|
15313
|
-
const propDefine$3 = {
|
|
15314
|
-
onlyView: {
|
|
15315
|
-
// 是否只读
|
|
15316
|
-
type: Boolean,
|
|
15317
|
-
default: false
|
|
15318
|
-
},
|
|
15319
|
-
formItems: {
|
|
15320
|
-
// 表单项
|
|
15321
|
-
type: Array,
|
|
15322
|
-
default: () => []
|
|
15323
|
-
},
|
|
15324
|
-
formModel: {
|
|
15325
|
-
// 表单数据
|
|
15326
|
-
type: Object,
|
|
15327
|
-
default: () => {
|
|
15328
|
-
}
|
|
15329
|
-
}
|
|
15330
|
-
};
|
|
15331
|
-
const _sfc_main$3 = defineComponent({
|
|
15332
|
-
name: "NvComFormUp",
|
|
15333
|
-
components: { UploadFile, TextEditor: TextEditor2, NvDicSelect, NvStructureTypeSelect, NvStructureSelect },
|
|
15334
|
-
emits: ["textChange", "TokenChange"],
|
|
15335
|
-
props: propDefine$3,
|
|
15336
|
-
setup(props, ctx) {
|
|
15337
|
-
return new ComFormInstance(props, ctx);
|
|
15338
|
-
}
|
|
15339
|
-
});
|
|
15340
|
-
class ComFormInstance extends BaseInstance {
|
|
15341
|
-
// API实例化
|
|
15342
|
-
// 全局属性
|
|
15343
|
-
constructor(props, ctx) {
|
|
15344
|
-
super();
|
|
15345
|
-
__publicField(this, "props");
|
|
15346
|
-
__publicField(this, "ctx");
|
|
15347
|
-
//#region 文本输入框
|
|
15348
|
-
// 私有属性 | private
|
|
15349
|
-
// 响应属性 | ref、reactive、computed、watch
|
|
15350
|
-
__publicField(this, "textEditorRef", ref());
|
|
15351
|
-
// 私有方法 | private 方法名() {}
|
|
15352
|
-
// 响应式方法 | xxx = () => {}
|
|
15353
|
-
/**
|
|
15354
|
-
* @description 保存文本数据
|
|
15355
|
-
*/
|
|
15356
|
-
__publicField(this, "saveTextData", async () => {
|
|
15357
|
-
this.textEditorRef.value.saveTextData();
|
|
15358
|
-
});
|
|
15359
|
-
/**
|
|
15360
|
-
* 清空长文本
|
|
15361
|
-
*/
|
|
15362
|
-
__publicField(this, "clearTextData", async () => {
|
|
15363
|
-
this.textEditorRef.value.clearTextData();
|
|
15364
|
-
});
|
|
15365
|
-
/**删除长文本 */
|
|
15366
|
-
__publicField(this, "deleteTextData", async () => {
|
|
15367
|
-
this.textEditorRef.value.deleteTextData();
|
|
15368
|
-
});
|
|
15369
|
-
/**
|
|
15370
|
-
* 删除长文本
|
|
15371
|
-
* @param Token
|
|
15372
|
-
*/
|
|
15373
|
-
__publicField(this, "deleteTextDataByToken", async (Token) => {
|
|
15374
|
-
this.textEditorRef.value.deleteTextDataByToken(Token);
|
|
15375
|
-
});
|
|
15376
|
-
/**
|
|
15377
|
-
* 获取长文本
|
|
15378
|
-
*/
|
|
15379
|
-
__publicField(this, "getText", () => {
|
|
15380
|
-
return this.textEditorRef.value.getText();
|
|
15381
|
-
});
|
|
15382
|
-
/**
|
|
15383
|
-
* 附件校验
|
|
15384
|
-
* @param Token
|
|
15385
|
-
*/
|
|
15386
|
-
__publicField(this, "tokenList", (data, item) => {
|
|
15387
|
-
this.ctx.emit("TokenChange", data);
|
|
15388
|
-
if (data.list.length > 0) {
|
|
15389
|
-
this.props.formModel[item.model] = data.token;
|
|
15390
|
-
} else {
|
|
15391
|
-
this.props.formModel[item.model] = "";
|
|
15392
|
-
}
|
|
15393
|
-
});
|
|
15394
|
-
/**
|
|
15395
|
-
* 文本改变
|
|
15396
|
-
* @param data
|
|
15397
|
-
*/
|
|
15398
|
-
__publicField(this, "textChange", (data) => {
|
|
15399
|
-
this.ctx.emit("textChange", data);
|
|
15400
|
-
});
|
|
15401
|
-
//#endregion 文本输入框 END
|
|
15402
|
-
/**
|
|
15403
|
-
* 构件选择值发生改变
|
|
15404
|
-
* @param item
|
|
15405
|
-
* @param data
|
|
15406
|
-
*/
|
|
15407
|
-
__publicField(this, "StructureOnChange", (item, data) => {
|
|
15408
|
-
this.props.formModel[item.model] = data;
|
|
15409
|
-
});
|
|
15410
|
-
this.props = props;
|
|
15411
|
-
this.ctx = ctx;
|
|
15412
|
-
}
|
|
15413
|
-
}
|
|
15414
|
-
function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
15415
|
-
const _component_UploadFile = resolveComponent("UploadFile");
|
|
15416
|
-
const _component_TextEditor = resolveComponent("TextEditor");
|
|
15417
|
-
const _component_NvDicSelect = resolveComponent("NvDicSelect");
|
|
15418
|
-
const _component_NvStructureTypeSelect = resolveComponent("NvStructureTypeSelect");
|
|
15419
|
-
const _component_NvStructureSelect = resolveComponent("NvStructureSelect");
|
|
15420
|
-
const _component_NvComForm = resolveComponent("NvComForm");
|
|
15421
|
-
return openBlock(), createBlock(_component_NvComForm, {
|
|
15422
|
-
onlyView: _ctx.onlyView,
|
|
15423
|
-
formItems: _ctx.formItems,
|
|
15424
|
-
formModel: _ctx.formModel
|
|
15425
|
-
}, {
|
|
15426
|
-
extend: withCtx(({ item }) => [
|
|
15427
|
-
item.type === "UploadFile" ? (openBlock(), createBlock(_component_UploadFile, {
|
|
15428
|
-
key: 0,
|
|
15429
|
-
readonly: _ctx.onlyView,
|
|
15430
|
-
onReturnFileList: ($event) => _ctx.tokenList($event, item),
|
|
15431
|
-
token: _ctx.formModel[item.model]
|
|
15432
|
-
}, null, 8, ["readonly", "onReturnFileList", "token"])) : createCommentVNode("", true),
|
|
15433
|
-
item.type === "TextEditor" ? (openBlock(), createBlock(_component_TextEditor, {
|
|
15434
|
-
key: 1,
|
|
15435
|
-
ref: "textEditorRef",
|
|
15436
|
-
readonly: _ctx.onlyView,
|
|
15437
|
-
style: normalizeStyle({ height: `${item.textHeight == void 0 ? "300" : item.textHeight}px` }),
|
|
15438
|
-
token: _ctx.formModel[item.model],
|
|
15439
|
-
border: item.textBorder,
|
|
15440
|
-
onTextChange: _ctx.textChange
|
|
15441
|
-
}, null, 8, ["readonly", "style", "token", "border", "onTextChange"])) : createCommentVNode("", true),
|
|
15442
|
-
item.type === "DicSelect" ? (openBlock(), createBlock(_component_NvDicSelect, {
|
|
15443
|
-
key: 2,
|
|
15444
|
-
readonly: _ctx.onlyView,
|
|
15445
|
-
code: item.dicCode,
|
|
15446
|
-
platformId: item.dicPId,
|
|
15447
|
-
modelValue: _ctx.formModel[item.model],
|
|
15448
|
-
"onUpdate:modelValue": ($event) => _ctx.formModel[item.model] = $event
|
|
15449
|
-
}, null, 8, ["readonly", "code", "platformId", "modelValue", "onUpdate:modelValue"])) : createCommentVNode("", true),
|
|
15450
|
-
item.type === "StructureType" ? (openBlock(), createBlock(_component_NvStructureTypeSelect, {
|
|
15451
|
-
key: 3,
|
|
15452
|
-
readonly: _ctx.onlyView,
|
|
15453
|
-
dataValue: _ctx.formModel[item.model],
|
|
15454
|
-
multiple: item.multiple,
|
|
15455
|
-
onOnChange: ($event) => _ctx.StructureOnChange(item, $event)
|
|
15456
|
-
}, null, 8, ["readonly", "dataValue", "multiple", "onOnChange"])) : createCommentVNode("", true),
|
|
15457
|
-
item.type === "Structure" ? (openBlock(), createBlock(_component_NvStructureSelect, {
|
|
15458
|
-
key: 4,
|
|
15459
|
-
readonly: _ctx.onlyView,
|
|
15460
|
-
dataValue: _ctx.formModel[item.model],
|
|
15461
|
-
multiple: item.multiple,
|
|
15462
|
-
selType: item.selType,
|
|
15463
|
-
onOnChange: ($event) => _ctx.StructureOnChange(item, $event)
|
|
15464
|
-
}, null, 8, ["readonly", "dataValue", "multiple", "selType", "onOnChange"])) : createCommentVNode("", true)
|
|
15465
|
-
]),
|
|
15466
|
-
_: 1
|
|
15467
|
-
}, 8, ["onlyView", "formItems", "formModel"]);
|
|
15468
|
-
}
|
|
15469
|
-
const ComFormUp = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3]]);
|
|
15470
15313
|
const dictionaryDetailApi = new DictionaryDetailApi();
|
|
15471
15314
|
const loadDictionaryData = async (optionCode, source, iViewOptions, platformId) => {
|
|
15472
15315
|
if (!source) {
|
|
@@ -15482,7 +15325,7 @@ const loadDictionaryData = async (optionCode, source, iViewOptions, platformId)
|
|
|
15482
15325
|
}
|
|
15483
15326
|
return res;
|
|
15484
15327
|
};
|
|
15485
|
-
const propDefine$
|
|
15328
|
+
const propDefine$3 = {
|
|
15486
15329
|
code: {
|
|
15487
15330
|
// 字典码
|
|
15488
15331
|
type: String,
|
|
@@ -15504,12 +15347,12 @@ const propDefine$2 = {
|
|
|
15504
15347
|
default: false
|
|
15505
15348
|
}
|
|
15506
15349
|
};
|
|
15507
|
-
const _sfc_main$
|
|
15350
|
+
const _sfc_main$3 = defineComponent({
|
|
15508
15351
|
name: "NvDicSelect",
|
|
15509
15352
|
components: {},
|
|
15510
15353
|
emits: ["input", "change"],
|
|
15511
15354
|
// 例如: ['clearRadioRow', 'change', 'delete', 'addchild']
|
|
15512
|
-
props: propDefine$
|
|
15355
|
+
props: propDefine$3,
|
|
15513
15356
|
setup(props, ctx) {
|
|
15514
15357
|
return new DicSelectInstance(props, ctx);
|
|
15515
15358
|
}
|
|
@@ -15534,7 +15377,7 @@ class DicSelectInstance extends BaseInstance {
|
|
|
15534
15377
|
this.dicOptions.value = await loadDictionaryData(this.props.code, [], true, this.props.platformId);
|
|
15535
15378
|
}
|
|
15536
15379
|
}
|
|
15537
|
-
function _sfc_render$
|
|
15380
|
+
function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
15538
15381
|
const _component_Option = resolveComponent("Option");
|
|
15539
15382
|
const _component_Select = resolveComponent("Select");
|
|
15540
15383
|
return openBlock(), createBlock(_component_Select, {
|
|
@@ -15560,7 +15403,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
15560
15403
|
_: 1
|
|
15561
15404
|
}, 8, ["disabled", "modelValue", "onOnChange"]);
|
|
15562
15405
|
}
|
|
15563
|
-
const NvDicSelect = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
15406
|
+
const NvDicSelect = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3]]);
|
|
15564
15407
|
var Functions = {
|
|
15565
15408
|
Identity: function(x) {
|
|
15566
15409
|
return x;
|
|
@@ -18218,7 +18061,7 @@ var Grouping = function(groupKey, elements) {
|
|
|
18218
18061
|
ArrayEnumerable.call(this, elements);
|
|
18219
18062
|
};
|
|
18220
18063
|
Grouping.prototype = new ArrayEnumerable();
|
|
18221
|
-
const propDefine$
|
|
18064
|
+
const propDefine$2 = {
|
|
18222
18065
|
// modelValue:{
|
|
18223
18066
|
// // 平台Id
|
|
18224
18067
|
// type: Array,
|
|
@@ -18240,12 +18083,12 @@ const propDefine$1 = {
|
|
|
18240
18083
|
default: true
|
|
18241
18084
|
}
|
|
18242
18085
|
};
|
|
18243
|
-
const _sfc_main$
|
|
18086
|
+
const _sfc_main$2 = defineComponent({
|
|
18244
18087
|
name: "NvStructureTypeSelect",
|
|
18245
18088
|
components: {},
|
|
18246
18089
|
emits: ["update", "on-change"],
|
|
18247
18090
|
// 例如: ['clearRadioRow', 'change', 'delete', 'addchild']
|
|
18248
|
-
props: propDefine$
|
|
18091
|
+
props: propDefine$2,
|
|
18249
18092
|
setup(props, ctx) {
|
|
18250
18093
|
return new StructureTypeSelectInstance(props, ctx);
|
|
18251
18094
|
}
|
|
@@ -18489,8 +18332,8 @@ class StructureTypeSelectInstance extends BaseInstance {
|
|
|
18489
18332
|
});
|
|
18490
18333
|
}
|
|
18491
18334
|
}
|
|
18492
|
-
const
|
|
18493
|
-
const
|
|
18335
|
+
const NvStructureTypeSelect_vue_vue_type_style_index_0_scoped_ef373745_lang = "";
|
|
18336
|
+
const NvStructureTypeSelect_vue_vue_type_style_index_1_lang = "";
|
|
18494
18337
|
const _hoisted_1$1 = { key: 0 };
|
|
18495
18338
|
const _hoisted_2$1 = {
|
|
18496
18339
|
key: 0,
|
|
@@ -18524,7 +18367,7 @@ const _hoisted_12$1 = {
|
|
|
18524
18367
|
class: "nv-text-r",
|
|
18525
18368
|
style: { "padding-right": "10px" }
|
|
18526
18369
|
};
|
|
18527
|
-
function _sfc_render$
|
|
18370
|
+
function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
18528
18371
|
const _component_Tag = resolveComponent("Tag");
|
|
18529
18372
|
const _component_Checkbox = resolveComponent("Checkbox");
|
|
18530
18373
|
const _component_Icon = resolveComponent("Icon");
|
|
@@ -18670,8 +18513,8 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
18670
18513
|
}, 8, ["width", "disabled", "onOnPopperHide"])
|
|
18671
18514
|
]);
|
|
18672
18515
|
}
|
|
18673
|
-
const NvStructureTypeSelect = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
18674
|
-
const propDefine = {
|
|
18516
|
+
const NvStructureTypeSelect = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2], ["__scopeId", "data-v-ef373745"]]);
|
|
18517
|
+
const propDefine$1 = {
|
|
18675
18518
|
readonly: {
|
|
18676
18519
|
// 只读
|
|
18677
18520
|
type: Boolean,
|
|
@@ -18693,12 +18536,12 @@ const propDefine = {
|
|
|
18693
18536
|
default: true
|
|
18694
18537
|
}
|
|
18695
18538
|
};
|
|
18696
|
-
const _sfc_main = defineComponent({
|
|
18539
|
+
const _sfc_main$1 = defineComponent({
|
|
18697
18540
|
name: "NvStructureSelect",
|
|
18698
18541
|
components: {},
|
|
18699
18542
|
emits: ["update", "on-change"],
|
|
18700
18543
|
// 例如: ['clearRadioRow', 'change', 'delete', 'addchild']
|
|
18701
|
-
props: propDefine,
|
|
18544
|
+
props: propDefine$1,
|
|
18702
18545
|
setup(props, ctx) {
|
|
18703
18546
|
return new StructureSelectInstance(props, ctx);
|
|
18704
18547
|
}
|
|
@@ -18878,8 +18721,8 @@ class StructureSelectInstance extends BaseInstance {
|
|
|
18878
18721
|
}
|
|
18879
18722
|
}
|
|
18880
18723
|
}
|
|
18881
|
-
const
|
|
18882
|
-
const _withScopeId = (n) => (pushScopeId("data-v-
|
|
18724
|
+
const NvStructureSelect_vue_vue_type_style_index_0_scoped_fbbaca53_lang = "";
|
|
18725
|
+
const _withScopeId = (n) => (pushScopeId("data-v-fbbaca53"), n = n(), popScopeId(), n);
|
|
18883
18726
|
const _hoisted_1 = { key: 1 };
|
|
18884
18727
|
const _hoisted_2 = { class: "nv-pos-r" };
|
|
18885
18728
|
const _hoisted_3 = { class: "nv-c-p structure-sel-box" };
|
|
@@ -18913,7 +18756,7 @@ const _hoisted_16 = {
|
|
|
18913
18756
|
};
|
|
18914
18757
|
const _hoisted_17 = { key: 0 };
|
|
18915
18758
|
const _hoisted_18 = { key: 1 };
|
|
18916
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
18759
|
+
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
18917
18760
|
const _component_Option = resolveComponent("Option");
|
|
18918
18761
|
const _component_OptionGroup = resolveComponent("OptionGroup");
|
|
18919
18762
|
const _component_Select = resolveComponent("Select");
|
|
@@ -19063,7 +18906,164 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
19063
18906
|
])) : createCommentVNode("", true)
|
|
19064
18907
|
]));
|
|
19065
18908
|
}
|
|
19066
|
-
const NvStructureSelect = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
18909
|
+
const NvStructureSelect = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-fbbaca53"]]);
|
|
18910
|
+
const propDefine = {
|
|
18911
|
+
onlyView: {
|
|
18912
|
+
// 是否只读
|
|
18913
|
+
type: Boolean,
|
|
18914
|
+
default: false
|
|
18915
|
+
},
|
|
18916
|
+
formItems: {
|
|
18917
|
+
// 表单项
|
|
18918
|
+
type: Array,
|
|
18919
|
+
default: () => []
|
|
18920
|
+
},
|
|
18921
|
+
formModel: {
|
|
18922
|
+
// 表单数据
|
|
18923
|
+
type: Object,
|
|
18924
|
+
default: () => {
|
|
18925
|
+
}
|
|
18926
|
+
}
|
|
18927
|
+
};
|
|
18928
|
+
const _sfc_main = defineComponent({
|
|
18929
|
+
name: "NvComFormUp",
|
|
18930
|
+
components: { UploadFile, TextEditor: TextEditor2, NvDicSelect, NvStructureTypeSelect, NvStructureSelect },
|
|
18931
|
+
emits: ["textChange", "TokenChange"],
|
|
18932
|
+
props: propDefine,
|
|
18933
|
+
setup(props, ctx) {
|
|
18934
|
+
return new ComFormInstance(props, ctx);
|
|
18935
|
+
}
|
|
18936
|
+
});
|
|
18937
|
+
class ComFormInstance extends BaseInstance {
|
|
18938
|
+
// API实例化
|
|
18939
|
+
// 全局属性
|
|
18940
|
+
constructor(props, ctx) {
|
|
18941
|
+
super();
|
|
18942
|
+
__publicField(this, "props");
|
|
18943
|
+
__publicField(this, "ctx");
|
|
18944
|
+
//#region 文本输入框
|
|
18945
|
+
// 私有属性 | private
|
|
18946
|
+
// 响应属性 | ref、reactive、computed、watch
|
|
18947
|
+
__publicField(this, "textEditorRef", ref());
|
|
18948
|
+
// 私有方法 | private 方法名() {}
|
|
18949
|
+
// 响应式方法 | xxx = () => {}
|
|
18950
|
+
/**
|
|
18951
|
+
* @description 保存文本数据
|
|
18952
|
+
*/
|
|
18953
|
+
__publicField(this, "saveTextData", async () => {
|
|
18954
|
+
this.textEditorRef.value.saveTextData();
|
|
18955
|
+
});
|
|
18956
|
+
/**
|
|
18957
|
+
* 清空长文本
|
|
18958
|
+
*/
|
|
18959
|
+
__publicField(this, "clearTextData", async () => {
|
|
18960
|
+
this.textEditorRef.value.clearTextData();
|
|
18961
|
+
});
|
|
18962
|
+
/**删除长文本 */
|
|
18963
|
+
__publicField(this, "deleteTextData", async () => {
|
|
18964
|
+
this.textEditorRef.value.deleteTextData();
|
|
18965
|
+
});
|
|
18966
|
+
/**
|
|
18967
|
+
* 删除长文本
|
|
18968
|
+
* @param Token
|
|
18969
|
+
*/
|
|
18970
|
+
__publicField(this, "deleteTextDataByToken", async (Token) => {
|
|
18971
|
+
this.textEditorRef.value.deleteTextDataByToken(Token);
|
|
18972
|
+
});
|
|
18973
|
+
/**
|
|
18974
|
+
* 获取长文本
|
|
18975
|
+
*/
|
|
18976
|
+
__publicField(this, "getText", () => {
|
|
18977
|
+
return this.textEditorRef.value.getText();
|
|
18978
|
+
});
|
|
18979
|
+
/**
|
|
18980
|
+
* 附件校验
|
|
18981
|
+
* @param Token
|
|
18982
|
+
*/
|
|
18983
|
+
__publicField(this, "tokenList", (data, item) => {
|
|
18984
|
+
this.ctx.emit("TokenChange", data);
|
|
18985
|
+
if (data.list.length > 0) {
|
|
18986
|
+
this.props.formModel[item.model] = data.token;
|
|
18987
|
+
} else {
|
|
18988
|
+
this.props.formModel[item.model] = "";
|
|
18989
|
+
}
|
|
18990
|
+
});
|
|
18991
|
+
/**
|
|
18992
|
+
* 文本改变
|
|
18993
|
+
* @param data
|
|
18994
|
+
*/
|
|
18995
|
+
__publicField(this, "textChange", (data) => {
|
|
18996
|
+
this.ctx.emit("textChange", data);
|
|
18997
|
+
});
|
|
18998
|
+
//#endregion 文本输入框 END
|
|
18999
|
+
/**
|
|
19000
|
+
* 构件选择值发生改变
|
|
19001
|
+
* @param item
|
|
19002
|
+
* @param data
|
|
19003
|
+
*/
|
|
19004
|
+
__publicField(this, "StructureOnChange", (item, data) => {
|
|
19005
|
+
this.props.formModel[item.model] = data;
|
|
19006
|
+
});
|
|
19007
|
+
this.props = props;
|
|
19008
|
+
this.ctx = ctx;
|
|
19009
|
+
}
|
|
19010
|
+
}
|
|
19011
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
19012
|
+
const _component_UploadFile = resolveComponent("UploadFile");
|
|
19013
|
+
const _component_TextEditor = resolveComponent("TextEditor");
|
|
19014
|
+
const _component_NvDicSelect = resolveComponent("NvDicSelect");
|
|
19015
|
+
const _component_NvStructureTypeSelect = resolveComponent("NvStructureTypeSelect");
|
|
19016
|
+
const _component_NvStructureSelect = resolveComponent("NvStructureSelect");
|
|
19017
|
+
const _component_NvComForm = resolveComponent("NvComForm");
|
|
19018
|
+
return openBlock(), createBlock(_component_NvComForm, {
|
|
19019
|
+
onlyView: _ctx.onlyView,
|
|
19020
|
+
formItems: _ctx.formItems,
|
|
19021
|
+
formModel: _ctx.formModel
|
|
19022
|
+
}, {
|
|
19023
|
+
extend: withCtx(({ item }) => [
|
|
19024
|
+
item.type === "UploadFile" ? (openBlock(), createBlock(_component_UploadFile, {
|
|
19025
|
+
key: 0,
|
|
19026
|
+
readonly: _ctx.onlyView,
|
|
19027
|
+
onReturnFileList: ($event) => _ctx.tokenList($event, item),
|
|
19028
|
+
token: _ctx.formModel[item.model]
|
|
19029
|
+
}, null, 8, ["readonly", "onReturnFileList", "token"])) : createCommentVNode("", true),
|
|
19030
|
+
item.type === "TextEditor" ? (openBlock(), createBlock(_component_TextEditor, {
|
|
19031
|
+
key: 1,
|
|
19032
|
+
ref: "textEditorRef",
|
|
19033
|
+
readonly: _ctx.onlyView,
|
|
19034
|
+
style: normalizeStyle({ height: `${item.textHeight == void 0 ? "300" : item.textHeight}px` }),
|
|
19035
|
+
token: _ctx.formModel[item.model],
|
|
19036
|
+
border: item.textBorder,
|
|
19037
|
+
onTextChange: _ctx.textChange
|
|
19038
|
+
}, null, 8, ["readonly", "style", "token", "border", "onTextChange"])) : createCommentVNode("", true),
|
|
19039
|
+
item.type === "DicSelect" ? (openBlock(), createBlock(_component_NvDicSelect, {
|
|
19040
|
+
key: 2,
|
|
19041
|
+
readonly: _ctx.onlyView,
|
|
19042
|
+
code: item.dicCode,
|
|
19043
|
+
platformId: item.dicPId,
|
|
19044
|
+
modelValue: _ctx.formModel[item.model],
|
|
19045
|
+
"onUpdate:modelValue": ($event) => _ctx.formModel[item.model] = $event
|
|
19046
|
+
}, null, 8, ["readonly", "code", "platformId", "modelValue", "onUpdate:modelValue"])) : createCommentVNode("", true),
|
|
19047
|
+
item.type === "StructureType" ? (openBlock(), createBlock(_component_NvStructureTypeSelect, {
|
|
19048
|
+
key: 3,
|
|
19049
|
+
readonly: _ctx.onlyView,
|
|
19050
|
+
dataValue: _ctx.formModel[item.model],
|
|
19051
|
+
multiple: item.multiple,
|
|
19052
|
+
onOnChange: ($event) => _ctx.StructureOnChange(item, $event)
|
|
19053
|
+
}, null, 8, ["readonly", "dataValue", "multiple", "onOnChange"])) : createCommentVNode("", true),
|
|
19054
|
+
item.type === "Structure" ? (openBlock(), createBlock(_component_NvStructureSelect, {
|
|
19055
|
+
key: 4,
|
|
19056
|
+
readonly: _ctx.onlyView,
|
|
19057
|
+
dataValue: _ctx.formModel[item.model],
|
|
19058
|
+
multiple: item.multiple,
|
|
19059
|
+
selType: item.selType,
|
|
19060
|
+
onOnChange: ($event) => _ctx.StructureOnChange(item, $event)
|
|
19061
|
+
}, null, 8, ["readonly", "dataValue", "multiple", "selType", "onOnChange"])) : createCommentVNode("", true)
|
|
19062
|
+
]),
|
|
19063
|
+
_: 1
|
|
19064
|
+
}, 8, ["onlyView", "formItems", "formModel"]);
|
|
19065
|
+
}
|
|
19066
|
+
const ComFormUp = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
19067
19067
|
export {
|
|
19068
19068
|
filePreview as FilePreview,
|
|
19069
19069
|
ComFormUp as NvComFormUp,
|