@wg-npm/survey-creator 0.3.7746 → 0.3.7756
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.
|
@@ -3230,7 +3230,7 @@ var script$d = Vue.extend({
|
|
|
3230
3230
|
};
|
|
3231
3231
|
});
|
|
3232
3232
|
},
|
|
3233
|
-
resetScoreOptions(options
|
|
3233
|
+
resetScoreOptions(options) {
|
|
3234
3234
|
debugger;
|
|
3235
3235
|
let otherRange = _.map(this.otherConditions, (item) => {
|
|
3236
3236
|
return {
|
|
@@ -3238,16 +3238,21 @@ var script$d = Vue.extend({
|
|
|
3238
3238
|
max: _.get(item, "payload.maxScore", 0),
|
|
3239
3239
|
};
|
|
3240
3240
|
});
|
|
3241
|
-
let
|
|
3242
|
-
let
|
|
3241
|
+
let currentMinScore = this.value.minScore == null ? 0 : this.value.minScore;
|
|
3242
|
+
let currentMaxScore = this.value.maxScore == null ? this.totalScore : this.value.maxScore;
|
|
3243
3243
|
_.forEach(options, function (o) {
|
|
3244
3244
|
o.disabled = _.some(otherRange, function (or) {
|
|
3245
|
-
let condition_a = o >= or.min && o <= or.max;
|
|
3246
|
-
let condition_b =
|
|
3245
|
+
let condition_a = o.value >= or.min && o.value <= or.max;
|
|
3246
|
+
let condition_b = o.value >= currentMinScore && o.value <= currentMaxScore;
|
|
3247
3247
|
return condition_a && condition_b;
|
|
3248
3248
|
});
|
|
3249
3249
|
});
|
|
3250
3250
|
},
|
|
3251
|
+
generateExpr() {
|
|
3252
|
+
let minScore = this.value.minScore;
|
|
3253
|
+
let maxScore = this.value.maxScore;
|
|
3254
|
+
return `${minScore} ${this.value.leftOperator} score and score ${this.value.rightOperator} ${maxScore}`;
|
|
3255
|
+
}
|
|
3251
3256
|
},
|
|
3252
3257
|
});
|
|
3253
3258
|
|
|
@@ -3260,7 +3265,7 @@ var __vue_render__$d = function () {var _vm=this;var _h=_vm.$createElement;var _
|
|
|
3260
3265
|
type: 'number',
|
|
3261
3266
|
trigger: 'change',
|
|
3262
3267
|
message: _vm.t('survey_creator.question.scoreRequiredTip'),
|
|
3263
|
-
}}},[_c('Select',{attrs:{"placeholder":_vm.t('survey_creator.question.selectScore')},on:{"on-open-change":function($event){return _vm.resetScoreOptions(_vm.leftScores
|
|
3268
|
+
}}},[_c('Select',{attrs:{"placeholder":_vm.t('survey_creator.question.selectScore')},on:{"on-open-change":function($event){return _vm.resetScoreOptions(_vm.leftScores)}},model:{value:(_vm.value.minScore),callback:function ($$v) {_vm.$set(_vm.value, "minScore", $$v);},expression:"value.minScore"}},_vm._l((_vm.leftScores),function(score){return _c('Option',{key:score.value,attrs:{"value":score.value,"disabled":score.disabled}},[_vm._v("\n "+_vm._s(score.value)+"\n ")])}),1)],1)],1),_vm._v(" "),_c('Col',{attrs:{"span":3}},[_c('FormItem',{attrs:{"prop":("evaluationItems[" + _vm.itemIndex + "].conditions[" + _vm.index + "].payload.leftOperator"),"rules":{
|
|
3264
3269
|
required: true,
|
|
3265
3270
|
trigger: 'change',
|
|
3266
3271
|
message: _vm.t('survey_creator.question.notEmpty'),
|
|
@@ -3273,17 +3278,17 @@ var __vue_render__$d = function () {var _vm=this;var _h=_vm.$createElement;var _
|
|
|
3273
3278
|
type: 'number',
|
|
3274
3279
|
trigger: 'change',
|
|
3275
3280
|
message: _vm.t('survey_creator.question.scoreRequiredTip'),
|
|
3276
|
-
}}},[_c('Select',{attrs:{"placeholder":_vm.t('survey_creator.question.selectScore')},on:{"on-open-change":function($event){return _vm.resetScoreOptions(_vm.rightScores
|
|
3281
|
+
}}},[_c('Select',{attrs:{"placeholder":_vm.t('survey_creator.question.selectScore')},on:{"on-open-change":function($event){return _vm.resetScoreOptions(_vm.rightScores)}},model:{value:(_vm.value.maxScore),callback:function ($$v) {_vm.$set(_vm.value, "maxScore", $$v);},expression:"value.maxScore"}},_vm._l((_vm.rightScores),function(score){return _c('Option',{key:score.value,attrs:{"value":score.value,"disabled":score.disabled}},[_vm._v("\n "+_vm._s(score.value)+"\n ")])}),1)],1)],1)],1)};
|
|
3277
3282
|
var __vue_staticRenderFns__$d = [];
|
|
3278
3283
|
|
|
3279
3284
|
/* style */
|
|
3280
3285
|
const __vue_inject_styles__$d = function (inject) {
|
|
3281
3286
|
if (!inject) return
|
|
3282
|
-
inject("data-v-
|
|
3287
|
+
inject("data-v-ee28d22c_0", { source: ".label[data-v-ee28d22c]{text-align:right;margin-bottom:24px}[data-v-ee28d22c] .operator .ivu-select-selected-value{height:28px;line-height:28px}", map: undefined, media: undefined });
|
|
3283
3288
|
|
|
3284
3289
|
};
|
|
3285
3290
|
/* scoped */
|
|
3286
|
-
const __vue_scope_id__$d = "data-v-
|
|
3291
|
+
const __vue_scope_id__$d = "data-v-ee28d22c";
|
|
3287
3292
|
/* module identifier */
|
|
3288
3293
|
const __vue_module_identifier__$d = undefined;
|
|
3289
3294
|
/* functional template */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wg-npm/survey-creator",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.7756",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"scripts": {
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"lint-fix": "eslint \"**/*.ts\" \"**/*.vue\" --fix --no-error-on-unmatched-pattern"
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"@wg-npm/survey-core": "0.3.
|
|
16
|
-
"@wg-npm/survey-service-api": "0.3.
|
|
15
|
+
"@wg-npm/survey-core": "0.3.7756",
|
|
16
|
+
"@wg-npm/survey-service-api": "0.3.7756",
|
|
17
17
|
"axios": "^0.19.2",
|
|
18
18
|
"camelcase": "^6.0.0",
|
|
19
19
|
"deepmerge": "^4.2.2",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"@typescript-eslint/eslint-plugin": "^3.6.0",
|
|
39
39
|
"@typescript-eslint/parser": "^3.6.0",
|
|
40
40
|
"@vue/eslint-config-prettier": "^6.0.0",
|
|
41
|
-
"@wg-npm/survey-core": "0.3.
|
|
42
|
-
"@wg-npm/survey-service-api": "0.3.
|
|
41
|
+
"@wg-npm/survey-core": "0.3.7756",
|
|
42
|
+
"@wg-npm/survey-service-api": "0.3.7756",
|
|
43
43
|
"acorn": "^7.3.1",
|
|
44
44
|
"axios": "^0.19.2",
|
|
45
45
|
"babelrc-rollup": "^3.0.0",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
<Select
|
|
19
19
|
v-model="value.minScore"
|
|
20
20
|
:placeholder="t('survey_creator.question.selectScore')"
|
|
21
|
-
@on-open-change="resetScoreOptions(leftScores
|
|
21
|
+
@on-open-change="resetScoreOptions(leftScores)"
|
|
22
22
|
>
|
|
23
23
|
<Option
|
|
24
24
|
v-for="score in leftScores"
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
<Select
|
|
100
100
|
v-model="value.maxScore"
|
|
101
101
|
:placeholder="t('survey_creator.question.selectScore')"
|
|
102
|
-
@on-open-change="resetScoreOptions(rightScores
|
|
102
|
+
@on-open-change="resetScoreOptions(rightScores)"
|
|
103
103
|
>
|
|
104
104
|
<Option
|
|
105
105
|
v-for="score in rightScores"
|
|
@@ -202,7 +202,7 @@
|
|
|
202
202
|
}
|
|
203
203
|
})
|
|
204
204
|
},
|
|
205
|
-
resetScoreOptions(options
|
|
205
|
+
resetScoreOptions(options) {
|
|
206
206
|
debugger
|
|
207
207
|
let otherRange = _.map(this.otherConditions, (item) => {
|
|
208
208
|
return {
|
|
@@ -211,17 +211,23 @@
|
|
|
211
211
|
};
|
|
212
212
|
});
|
|
213
213
|
|
|
214
|
-
let
|
|
215
|
-
let
|
|
214
|
+
let currentMinScore = this.value.minScore == null ? 0 : this.value.minScore;
|
|
215
|
+
let currentMaxScore = this.value.maxScore == null ? this.totalScore : this.value.maxScore;
|
|
216
216
|
|
|
217
217
|
_.forEach(options, function (o) {
|
|
218
218
|
o.disabled = _.some(otherRange, function (or) {
|
|
219
|
-
let condition_a = o >= or.min && o <= or.max;
|
|
220
|
-
let condition_b =
|
|
219
|
+
let condition_a = o.value >= or.min && o.value <= or.max;
|
|
220
|
+
let condition_b = o.value >= currentMinScore && o.value <= currentMaxScore;
|
|
221
|
+
|
|
221
222
|
return condition_a && condition_b;
|
|
222
223
|
})
|
|
223
224
|
})
|
|
224
225
|
},
|
|
226
|
+
generateExpr() {
|
|
227
|
+
let minScore = this.value.minScore;
|
|
228
|
+
let maxScore = this.value.maxScore;
|
|
229
|
+
return `${minScore} ${this.value.leftOperator} score and score ${this.value.rightOperator} ${maxScore}`;
|
|
230
|
+
}
|
|
225
231
|
},
|
|
226
232
|
});
|
|
227
233
|
</script>
|