@wg-npm/survey-creator 0.3.4062 → 0.3.4107
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.
|
@@ -3162,7 +3162,10 @@ var script$d = Vue.extend({
|
|
|
3162
3162
|
operators: ["<=", "<"],
|
|
3163
3163
|
};
|
|
3164
3164
|
},
|
|
3165
|
-
created() {
|
|
3165
|
+
created() {
|
|
3166
|
+
this.value.leftOperator = _.unescape(this.value.leftOperator);
|
|
3167
|
+
this.value.rightOperator = _.unescape(this.value.rightOperator);
|
|
3168
|
+
},
|
|
3166
3169
|
computed: {
|
|
3167
3170
|
totalScore() {
|
|
3168
3171
|
return this.$rootComponent.currentSurvey.statistics.maxScore;
|
|
@@ -3241,13 +3244,12 @@ var script$d = Vue.extend({
|
|
|
3241
3244
|
if (this.checkValueInOtherRange(value)) {
|
|
3242
3245
|
return true;
|
|
3243
3246
|
}
|
|
3244
|
-
let
|
|
3245
|
-
let
|
|
3246
|
-
|
|
3247
|
-
if (type == "left" && value >= currentMax) {
|
|
3247
|
+
let leftScore = _.get(this.value, "minScore", 0);
|
|
3248
|
+
let rightScore = _.get(this.value, "maxScore", this.totalScore);
|
|
3249
|
+
if (leftScore != null && type == "left" && value >= rightScore) {
|
|
3248
3250
|
return true;
|
|
3249
3251
|
}
|
|
3250
|
-
if (type == "right" && value <=
|
|
3252
|
+
if (type == "right" && value <= leftScore) {
|
|
3251
3253
|
return true;
|
|
3252
3254
|
}
|
|
3253
3255
|
},
|
|
@@ -3279,11 +3281,11 @@ var __vue_render__$d = function () {var _vm=this;var _h=_vm.$createElement;var _
|
|
|
3279
3281
|
type: 'number',
|
|
3280
3282
|
trigger: 'change',
|
|
3281
3283
|
message: _vm.t('survey_creator.question.scoreRequiredTip'),
|
|
3282
|
-
}}},[_c('Select',{attrs:{"placeholder":_vm.t('survey_creator.question.selectScore')},model:{value:(_vm.value.minScore),callback:function ($$v) {_vm.$set(_vm.value, "minScore", $$v);},expression:"value.minScore"}},_vm._l((_vm.scores),function(score){return _c('Option',{key:score,attrs:{"value":score,"disabled":_vm.disabledScoreOption(score, 'left')}},[_vm._v("\n "+_vm._s(score)+"\n ")])}),1)],1)],1),_vm._v(" "),_c('Col',{staticClass:"label",attrs:{"span":1}},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.scores"))+"\n ")]),_vm._v(" "),_c('Col',{attrs:{"span":
|
|
3284
|
+
}}},[_c('Select',{attrs:{"placeholder":_vm.t('survey_creator.question.selectScore')},model:{value:(_vm.value.minScore),callback:function ($$v) {_vm.$set(_vm.value, "minScore", $$v);},expression:"value.minScore"}},_vm._l((_vm.scores),function(score){return _c('Option',{key:score,attrs:{"value":score,"disabled":_vm.disabledScoreOption(score, 'left')}},[_vm._v("\n "+_vm._s(score)+"\n ")])}),1)],1)],1),_vm._v(" "),_c('Col',{staticClass:"label",attrs:{"span":1}},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.scores"))+"\n ")]),_vm._v(" "),_c('Col',{attrs:{"span":3}},[_c('FormItem',{attrs:{"prop":("evaluationItems[" + _vm.itemIndex + "].conditions[" + _vm.index + "].payload.leftOperator"),"rules":{
|
|
3283
3285
|
required: true,
|
|
3284
3286
|
trigger: 'change',
|
|
3285
3287
|
message: _vm.t('survey_creator.question.notEmpty'),
|
|
3286
|
-
}}},[_c('Select',{attrs:{"placeholder":_vm.t('survey_creator.question.evaluation.condition.operator')},model:{value:(_vm.value.leftOperator),callback:function ($$v) {_vm.$set(_vm.value, "leftOperator", $$v);},expression:"value.leftOperator"}},_vm._l((_vm.operators),function(operator,index){return _c('Option',{key:index,attrs:{"value":operator}},[_vm._v("\n "+_vm._s(operator)+"\n ")])}),1)],1)],1),_vm._v(" "),_c('Col',{staticClass:"label"},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.totalScores"))+"\n ")]),_vm._v(" "),_c('Col',{attrs:{"span":
|
|
3288
|
+
}}},[_c('Select',{attrs:{"placeholder":_vm.t('survey_creator.question.evaluation.condition.operator')},model:{value:(_vm.value.leftOperator),callback:function ($$v) {_vm.$set(_vm.value, "leftOperator", $$v);},expression:"value.leftOperator"}},_vm._l((_vm.operators),function(operator,index){return _c('Option',{key:index,attrs:{"value":operator}},[_vm._v("\n "+_vm._s(operator)+"\n ")])}),1)],1)],1),_vm._v(" "),_c('Col',{staticClass:"label"},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.totalScores"))+"\n ")]),_vm._v(" "),_c('Col',{attrs:{"span":3}},[_c('FormItem',{attrs:{"prop":("evaluationItems[" + _vm.itemIndex + "].conditions[" + _vm.index + "].payload.rightOperator"),"rules":{
|
|
3287
3289
|
required: true,
|
|
3288
3290
|
trigger: 'change',
|
|
3289
3291
|
message: _vm.t('survey_creator.question.notEmpty'),
|
|
@@ -3298,11 +3300,11 @@ var __vue_staticRenderFns__$d = [];
|
|
|
3298
3300
|
/* style */
|
|
3299
3301
|
const __vue_inject_styles__$d = function (inject) {
|
|
3300
3302
|
if (!inject) return
|
|
3301
|
-
inject("data-v-
|
|
3303
|
+
inject("data-v-0dd6faab_0", { source: ".label[data-v-0dd6faab]{text-align:right;margin-bottom:24px}", map: undefined, media: undefined });
|
|
3302
3304
|
|
|
3303
3305
|
};
|
|
3304
3306
|
/* scoped */
|
|
3305
|
-
const __vue_scope_id__$d = "data-v-
|
|
3307
|
+
const __vue_scope_id__$d = "data-v-0dd6faab";
|
|
3306
3308
|
/* module identifier */
|
|
3307
3309
|
const __vue_module_identifier__$d = undefined;
|
|
3308
3310
|
/* functional template */
|
|
@@ -4524,7 +4526,7 @@ var script = Vue.extend({
|
|
|
4524
4526
|
components: { Card, Row, Col, Button, Toolbar, SurveyInternalPreviewer },
|
|
4525
4527
|
provide() {
|
|
4526
4528
|
return {
|
|
4527
|
-
$rootComponent: this
|
|
4529
|
+
$rootComponent: this.$rootComponent
|
|
4528
4530
|
};
|
|
4529
4531
|
},
|
|
4530
4532
|
props: {
|
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.4107",
|
|
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.4107",
|
|
16
|
+
"@wg-npm/survey-service-api": "0.3.4107",
|
|
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.4107",
|
|
42
|
+
"@wg-npm/survey-service-api": "0.3.4107",
|
|
43
43
|
"acorn": "^7.3.1",
|
|
44
44
|
"axios": "^0.19.2",
|
|
45
45
|
"babelrc-rollup": "^3.0.0",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
<Col class="label" :span="1">
|
|
34
34
|
{{ t("survey_creator.question.scores") }}
|
|
35
35
|
</Col>
|
|
36
|
-
<Col :span="
|
|
36
|
+
<Col :span="3">
|
|
37
37
|
<FormItem
|
|
38
38
|
:prop="`evaluationItems[${itemIndex}].conditions[${index}].payload.leftOperator`"
|
|
39
39
|
:rules="{
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
<Col class="label">
|
|
62
62
|
{{ t("survey_creator.question.totalScores") }}
|
|
63
63
|
</Col>
|
|
64
|
-
<Col :span="
|
|
64
|
+
<Col :span="3">
|
|
65
65
|
<FormItem
|
|
66
66
|
:prop="`evaluationItems[${itemIndex}].conditions[${index}].payload.rightOperator`"
|
|
67
67
|
:rules="{
|
|
@@ -150,7 +150,10 @@ export default Vue.extend({
|
|
|
150
150
|
operators: ["<=", "<"],
|
|
151
151
|
};
|
|
152
152
|
},
|
|
153
|
-
created() {
|
|
153
|
+
created() {
|
|
154
|
+
this.value.leftOperator = _.unescape(this.value.leftOperator);
|
|
155
|
+
this.value.rightOperator = _.unescape(this.value.rightOperator);
|
|
156
|
+
},
|
|
154
157
|
computed: {
|
|
155
158
|
totalScore() {
|
|
156
159
|
return this.$rootComponent.currentSurvey.statistics.maxScore;
|
|
@@ -234,13 +237,12 @@ export default Vue.extend({
|
|
|
234
237
|
if (this.checkValueInOtherRange(value)) {
|
|
235
238
|
return true;
|
|
236
239
|
}
|
|
237
|
-
let
|
|
238
|
-
let
|
|
239
|
-
|
|
240
|
-
if (type == "left" && value >= currentMax) {
|
|
240
|
+
let leftScore = _.get(this.value, "minScore", 0);
|
|
241
|
+
let rightScore = _.get(this.value, "maxScore", this.totalScore);
|
|
242
|
+
if (leftScore != null && type == "left" && value >= rightScore) {
|
|
241
243
|
return true;
|
|
242
244
|
}
|
|
243
|
-
if (type == "right" && value <=
|
|
245
|
+
if (type == "right" && value <= leftScore) {
|
|
244
246
|
return true;
|
|
245
247
|
}
|
|
246
248
|
},
|