centaline-data-driven-v3 0.0.60 → 0.0.61

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": "centaline-data-driven-v3",
3
- "version": "0.0.60",
3
+ "version": "0.0.61",
4
4
  "private": false,
5
5
  "description": "centaline-data-driven-v3",
6
6
  "main": "dist/centaline-data-driven-v3.umd.js",
@@ -273,7 +273,8 @@ function saveRow(row, index, isCancel) {
273
273
  if (k !== '$sourceIndex') {
274
274
  row[k].code1 = data[k].code1;
275
275
  row[k].code2 = data[k].code2;
276
- row[k].text = data[k].text;
276
+ row[k].name1 = data[k].name1;
277
+ row[k].name2 = data[k].name2;
277
278
  }
278
279
  };
279
280
  if (model.value.currentRow.isNew) {
@@ -2,8 +2,9 @@
2
2
  <div v-loading="loading" style="width: 100%;height: 100%;">
3
3
  <div style="width: 100%;height: 100%;position: relative;" class="ct-photoSelectList" v-if="FlagPhoto">
4
4
  <div style="padding: 10px 0 0 20px" v-if="paramName">
5
- <el-select-v2 v-model="mediaLabelID" :props="optionAttrs" :options="options" :placeholder="common.LocalizedString('类别','類別')"
6
- style="width: 150px;" @change="change" clearable />
5
+ <el-select-v2 v-model="mediaLabelID" :props="optionAttrs" :options="options"
6
+ :placeholder="common.LocalizedString('类别', '類別')" style="width: 150px;" @change="change"
7
+ clearable />
7
8
  </div>
8
9
  <el-main :style="paramName ? 'top: 40px' : 'top: 10px'"
9
10
  style="position: absolute; bottom: 50PX;left: 10px;right: 0;padding:0px">
@@ -11,7 +12,9 @@
11
12
  <template v-if="imageList.length > 0">
12
13
  <template v-if="layout">
13
14
  <div style="display: flex;" v-for="(item, index) in imageList" :key="index">
14
- <el-checkbox style="margin: 0 5px;" @change="choose(item, true)"
15
+ <el-radio v-if="selectedMode == 1" style="margin: 0 5px;height: auto;"
16
+ @change="chooseRadio(item)" v-model="item.ischeck" :label="true">&nbsp;</el-radio>
17
+ <el-checkbox v-else style="margin: 0 5px;" @change="choose(item, true)"
15
18
  v-model="item.ischeck"></el-checkbox>
16
19
  <ct-layout :vmodel="item" :cellLayout="layout" :rowindex="index" :flagMediaSelect="true"
17
20
  @rolRouterclick="rolRouterCellClickHandler">
@@ -53,14 +56,15 @@
53
56
  </template>
54
57
  </template>
55
58
  <template v-else>
56
- <el-empty :description="common.LocalizedString('没有数据','沒有數據')" />
59
+ <el-empty :description="common.LocalizedString('没有数据', '沒有數據')" />
57
60
  </template>
58
61
  </el-main>
59
62
 
60
63
  <div style="width:100%;text-align:center">
61
- <el-checkbox style="position:absolute;bottom:10px;left: 15px;" @change="allchoose"
62
- v-model="allcheck">{{common.LocalizedString('全选','全選')}}</el-checkbox>
63
- <el-button type="primary" style="position:absolute;bottom:10px;" @click="handleClick()">{{common.LocalizedString('确定','確認')}}</el-button>
64
+ <el-checkbox v-if="selectedMode != 1" style="position:absolute;bottom:10px;left: 15px;"
65
+ @change="allchoose" v-model="allcheck">{{ common.LocalizedString('全选', '全選') }}</el-checkbox>
66
+ <el-button type="primary" style="position:absolute;bottom:10px;" @click="handleClick()">{{
67
+ common.LocalizedString('确定', '確認') }}</el-button>
64
68
  </div>
65
69
  </div>
66
70
  </div>
@@ -91,6 +95,7 @@ const allcheck = ref(false)
91
95
  const options = ref([])
92
96
  const mediaLabelID = ref('')
93
97
  const loading = ref(true)
98
+ const selectedMode = ref(2)
94
99
  const optionAttrs = {
95
100
  label: 'name',
96
101
  value: 'code',
@@ -121,6 +126,9 @@ function load(data) {
121
126
  layout.value = data.source.content.layout;
122
127
  paramName.value = data.source.content.paramName;
123
128
  sourceRows = common.deepClone(data.source.content.mediaList);
129
+ if (data.source.content.selectedMode) {
130
+ selectedMode.value = data.source.content.selectedMode
131
+ }
124
132
  }
125
133
  else {
126
134
  sourceRows = common.deepClone(data.source.content);
@@ -192,6 +200,16 @@ function choose(item, flagCheckbox) {
192
200
  item.ischeck = false;
193
201
  }
194
202
 
203
+ }
204
+ function chooseRadio(item) {
205
+ let chooseItem = common.deepClone(item);
206
+ chooseList.value = [];
207
+ imageList.value.forEach((v) => {
208
+ v.ischeck = false;
209
+ });
210
+ item.ischeck = true;
211
+ chooseList.value.push(chooseItem);
212
+
195
213
  }
196
214
  function allchoose() {
197
215
  chooseList.value = [];
@@ -838,7 +838,7 @@ function requiredHandle(item, model) {
838
838
  //清除关联当前组件的组件值
839
839
  function clearRelatedHandle(field, fields) {
840
840
  var f = fields.filter((v) => {
841
- return v.parentField && v.parentField.indexOf(field.fieldName1) > -1;
841
+ return v.parentField && field.fieldName1 && (','+v.parentField+',').indexOf(','+field.fieldName1+',') > -1;
842
842
  });
843
843
  f.forEach((v) => {
844
844
  if (v.reset) {
@@ -1098,10 +1098,10 @@ function changeHandler(field, model) {
1098
1098
  }
1099
1099
  if (field.onAfterChanged && field.controlType !== Enum.ControlType.NumericTextBox) {
1100
1100
  var router = model.actionRouters.find((v) => {
1101
- return v.id === field.onAfterChanged;
1101
+ return v.key === field.onAfterChanged;
1102
1102
  });
1103
1103
  if (router) {
1104
- clickHandler(router);
1104
+ model.$vue.clickHandler(router);
1105
1105
  }
1106
1106
  else {
1107
1107
  if (model.scripts) {
@@ -1106,7 +1106,7 @@ function doAction(response, model) {
1106
1106
  model.dataDictionary = response.content;
1107
1107
 
1108
1108
  model.source.page.rows = model.source.page.rows + response.content.length;
1109
- model.setRow(rtn.listData);
1109
+ model.setRow(model.listData);
1110
1110
  if (!common.flagApp()) {
1111
1111
  model.$vue.calculatingRowHeight();
1112
1112
  model.$vue.emit("searchComplate");
@@ -1125,10 +1125,10 @@ function doAction(response, model) {
1125
1125
  if (response.content && Array.isArray(response.content)) {
1126
1126
  response.content.forEach((row) => {
1127
1127
  for (var vkey in row) {
1128
- model.dataDictionary[row[model.primaryKey]][vkey] = row[vkey];
1128
+ model.dataDictionary[row[model.primaryFieldName]][vkey] = row[vkey];
1129
1129
  }
1130
1130
  });
1131
- model.setRow(rtn.listData);
1131
+ model.setRow(model.listData);
1132
1132
  }
1133
1133
  else {
1134
1134
  model.$vue.updateCurrentRow({ flagFreshCurrentRow: true }, { responseData: response });
@@ -1154,7 +1154,7 @@ function doAction(response, model) {
1154
1154
 
1155
1155
  case Enum.ActionType.Replace: //替换
1156
1156
  if (response.content && Array.isArray(response.content)) {
1157
- delete model.dataDictionary[rtn.listData[model.selectIndex][model.primaryKey]];
1157
+ delete model.dataDictionary[model.listData[model.selectIndex][model.primaryFieldName]];
1158
1158
  response.content.forEach((row) => {
1159
1159
  model.listData.splice(model.selectIndex, 1, row);
1160
1160
  });
package/src/main.js CHANGED
@@ -64,7 +64,7 @@ app.use(centaline, {
64
64
  //authObject: '{token:"aplus eyJhbGciOiJIUzI1NiIsInppcCI6IkRFRiJ9.eNrEjjsOwjAQBe-ydVay1xvvOl3sJA2HiPIxElSIJBIIcXdAQEfPFK-YZt4Nlm2EChqtDafOYWqpRG6kxLoTxZhUTSRxHLUPH_DHfOmt5SDWt1gHScieHapNiol94q5pXYoNFJAvJ6isGHWmNMYVcBjWtyCr_iW2JZ93-fqPc8f18MwGIqFRCIO1GXmWGYd9npCZJ6N5JjYZ7g8AAAD__w.HgtNKtHWooj8c9Hy_vB8CfKq-qOeHMp0irnW0DfXtHo"}',
65
65
  //oldToken: 'd92d4a3b-2274-42e8-96f0-100ffb579b6e',
66
66
  //authObject: '{token:"1-7acf3f06-c2ea-471c-a5fa-07e1c2a81728"}',
67
- authObject: '{EmpID:"Token_5f3cda7e-a0b5-4899-8231-f6a4aaae661b",MachineCode:"7a216b39-84af-43bb-842b-07604ac37a10",SSO_Token:"SSOToken_5f3cda7e-a0b5-4899-8231-f6a4aaae661b",Platform:"WEB"}',
67
+ authObject: '{EmpID:"Token_0f977713-7a8d-420b-9536-967f8c8183c7",MachineCode:"7a216b39-84af-43bb-842b-07604ac37a10",SSO_Token:"SSOToken_0f977713-7a8d-420b-9536-967f8c8183c7",Platform:"WEB"}',
68
68
  };
69
69
  },
70
70
  // 请求完成事件,可判断是否登录过期执行响应操作
@@ -125,6 +125,7 @@ function validExcuteMessage(validtemp, model) {
125
125
 
126
126
  //路由操作事件
127
127
  export function RouterClickHandler(field, submitData, action, model, source, callBack) {
128
+ debugger
128
129
  if (source == 'form') {
129
130
  model.scripts.$fd = field.id;
130
131
  model.scripts.$result = [];
@@ -1,6 +0,0 @@
1
- <template>
2
-
3
- </template>
4
- <script setup lang="ts">
5
-
6
- </script>