@wg-npm/survey-creator 1.78.4031900 → 1.78.4151600
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/survey-creator.esm.js +81 -23
- package/package.json +6 -6
- package/src/components/editor/forms/matrix-form.vue +34 -0
- package/src/components/editor/forms/multi-selection-form.vue +32 -2
- package/src/components/editor/forms/scoring-form.vue +31 -1
- package/src/components/editor/forms/short-answer-form.vue +30 -1
- package/src/components/editor/forms/single-selection-form.vue +32 -2
- package/src/components/editor/forms/title-form.vue +41 -1
- package/src/locale/lang/en-US.ts +5 -0
- package/src/locale/lang/zh-CN.ts +5 -0
|
@@ -136,6 +136,11 @@ var defaultLang = {
|
|
|
136
136
|
starMinCountSuffix: "项及以上时计星",
|
|
137
137
|
maxScore: "最高分值:",
|
|
138
138
|
enableMultiSelect: "可复选",
|
|
139
|
+
evaluation_tag: {
|
|
140
|
+
label: "评价标签",
|
|
141
|
+
TEACHER: "评教师",
|
|
142
|
+
COURSE: "评课程",
|
|
143
|
+
},
|
|
139
144
|
evaluation: {
|
|
140
145
|
level: {
|
|
141
146
|
"1": "好",
|
|
@@ -18993,6 +18998,8 @@ var script$p = Vue.extend({
|
|
|
18993
18998
|
Button,
|
|
18994
18999
|
Input: Input$1,
|
|
18995
19000
|
Checkbox,
|
|
19001
|
+
Radio,
|
|
19002
|
+
RadioGroup,
|
|
18996
19003
|
Row,
|
|
18997
19004
|
Col,
|
|
18998
19005
|
Icon,
|
|
@@ -19012,13 +19019,18 @@ var script$p = Vue.extend({
|
|
|
19012
19019
|
layoutOptions: ["HORIZONTAL", "VERTICAL"],
|
|
19013
19020
|
enabledInputChoice: false,
|
|
19014
19021
|
enabledRichText: false,
|
|
19015
|
-
enabledSpeciallyQuestions: true
|
|
19022
|
+
enabledSpeciallyQuestions: true,
|
|
19023
|
+
enabledEvaluationTag: false,
|
|
19016
19024
|
};
|
|
19017
19025
|
},
|
|
19018
19026
|
created() {
|
|
19019
19027
|
this.enabledInputChoice = _$1.get(this.$rootComponent, "options.enabledInputChoice", false);
|
|
19020
19028
|
this.enabledRichText = _$1.get(this.$rootComponent, "options.enabledPlanSurveyTeacherSetting", false);
|
|
19021
19029
|
this.enabledSpeciallyQuestions = _$1.get(this.$rootComponent, "options.enabledSpeciallyQuestions", true);
|
|
19030
|
+
this.enabledEvaluationTag = _$1.get(this.$rootComponent, "options.enabledEvaluationTag", false);
|
|
19031
|
+
if (this.enabledEvaluationTag && !this.editQuestion.options.evaluationTag) {
|
|
19032
|
+
this.$set(this.editQuestion.options, "evaluationTag", "COURSE");
|
|
19033
|
+
}
|
|
19022
19034
|
this.editQuestion.options.richTextEnabled = this.enabledRichText;
|
|
19023
19035
|
},
|
|
19024
19036
|
methods: {
|
|
@@ -19123,7 +19135,7 @@ var script$p = Vue.extend({
|
|
|
19123
19135
|
const __vue_script__$p = script$p;
|
|
19124
19136
|
|
|
19125
19137
|
/* template */
|
|
19126
|
-
var __vue_render__$o = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('Form',{ref:"questionForm",attrs:{"model":_vm.editQuestion,"label-colon":false},on:{"on-validate":_vm.onValidate}},[_c('div',{staticClass:"options-container",style:(_vm.enabledSpeciallyQuestions||_vm.enabledInputChoice?'grid-template-columns: 50% 50%':'grid-template-columns: 100%')},[_c('div',{staticClass:"options-row"},[_c('div',{staticClass:"options"},[_c('Checkbox',{model:{value:(_vm.editQuestion.options.required),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "required", $$v);},expression:"editQuestion.options.required"}},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.questionRequired"))+"\n ")]),_vm._v(" "),_c('Checkbox',{staticClass:"option",on:{"on-change":_vm.scoringEnabledChange},model:{value:(_vm.editQuestion.options.scoringEnabled),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "scoringEnabled", $$v);},expression:"editQuestion.options.scoringEnabled"}},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.scoringEnabled"))+"\n ")])],1)]),_vm._v(" "),_c('div',{staticClass:"options-row before-border"},[(_vm.enabledSpeciallyQuestions)?_c('div',{staticClass:"options"},[_c('Checkbox',{on:{"on-change":_vm.starEnabledChange},model:{value:(_vm.editQuestion.options.starEnabled),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "starEnabled", $$v);},expression:"editQuestion.options.starEnabled"}},[_c('span',[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.starEnabled"))+"\n "),_c('Icon',{attrs:{"type":"md-star","color":"orange","size":16}})],1)]),_vm._v(" "),(_vm.enabledInputChoice)?_c('div',[_c('Checkbox',{staticClass:"option",on:{"on-change":_vm.inputEnabledChange},model:{value:(_vm.editQuestion.options.inputtedEnabled),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "inputtedEnabled", $$v);},expression:"editQuestion.options.inputtedEnabled"}},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.inputted_enabled"))+"\n ")]),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.inputtedEnabled),expression:"editQuestion.options.inputtedEnabled"}],staticClass:"option-expand"},[_c('span',[_vm._v(_vm._s(_vm.t("survey_creator.question.inputted_enabled_prefix")))]),_vm._v(" "),_c('InputNumber',{staticClass:"inputing",attrs:{"max":999,"min":1,"precision":0},model:{value:(_vm.editQuestion.options.inputMinLength),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "inputMinLength", $$v);},expression:"editQuestion.options.inputMinLength"}}),_vm._v(" "),_c('span',[_vm._v(_vm._s(_vm.t("survey_creator.question.inputted_enabled_suffix")))])],1)],1):_vm._e()],1):_c('div',{staticClass:"options"},[(_vm.enabledInputChoice)?_c('div',[_c('Checkbox',{staticClass:"option",staticStyle:{"margin-top":"0px"},on:{"on-change":_vm.inputEnabledChange},model:{value:(_vm.editQuestion.options.inputtedEnabled),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "inputtedEnabled", $$v);},expression:"editQuestion.options.inputtedEnabled"}},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.inputted_enabled"))+"\n ")]),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.inputtedEnabled),expression:"editQuestion.options.inputtedEnabled"}],staticClass:"option-expand"},[_c('span',[_vm._v(_vm._s(_vm.t("survey_creator.question.inputted_enabled_prefix")))]),_vm._v(" "),_c('InputNumber',{staticClass:"inputing",attrs:{"max":999,"min":1,"precision":0},model:{value:(_vm.editQuestion.options.inputMinLength),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "inputMinLength", $$v);},expression:"editQuestion.options.inputMinLength"}}),_vm._v(" "),_c('span',[_vm._v(_vm._s(_vm.t("survey_creator.question.inputted_enabled_suffix")))])],1)],1):_vm._e()])])]),_vm._v(" "),(_vm.enabledRichText)?_c('Alert',{attrs:{"show-icon":""}},[_vm._v(_vm._s(_vm.t("survey_creator.question.rich_text.alert"))+"\n ")]):_vm._e(),_vm._v(" "),_c('Row',[_c('Form-item',{attrs:{"label-width":80,"label":_vm.t('survey_creator.page.question'),"prop":'header.text.' + _vm.primaryLanguage,"rules":{
|
|
19138
|
+
var __vue_render__$o = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('Form',{ref:"questionForm",attrs:{"model":_vm.editQuestion,"label-colon":false},on:{"on-validate":_vm.onValidate}},[_c('div',{staticClass:"options-container",style:(_vm.enabledSpeciallyQuestions||_vm.enabledInputChoice?'grid-template-columns: 50% 50%':'grid-template-columns: 100%')},[_c('div',{staticClass:"options-row"},[_c('div',{staticClass:"options"},[_c('Checkbox',{model:{value:(_vm.editQuestion.options.required),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "required", $$v);},expression:"editQuestion.options.required"}},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.questionRequired"))+"\n ")]),_vm._v(" "),_c('Checkbox',{staticClass:"option",on:{"on-change":_vm.scoringEnabledChange},model:{value:(_vm.editQuestion.options.scoringEnabled),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "scoringEnabled", $$v);},expression:"editQuestion.options.scoringEnabled"}},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.scoringEnabled"))+"\n ")])],1)]),_vm._v(" "),_c('div',{staticClass:"options-row before-border"},[(_vm.enabledSpeciallyQuestions)?_c('div',{staticClass:"options"},[_c('Checkbox',{on:{"on-change":_vm.starEnabledChange},model:{value:(_vm.editQuestion.options.starEnabled),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "starEnabled", $$v);},expression:"editQuestion.options.starEnabled"}},[_c('span',[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.starEnabled"))+"\n "),_c('Icon',{attrs:{"type":"md-star","color":"orange","size":16}})],1)]),_vm._v(" "),(_vm.enabledInputChoice)?_c('div',[_c('Checkbox',{staticClass:"option",on:{"on-change":_vm.inputEnabledChange},model:{value:(_vm.editQuestion.options.inputtedEnabled),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "inputtedEnabled", $$v);},expression:"editQuestion.options.inputtedEnabled"}},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.inputted_enabled"))+"\n ")]),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.inputtedEnabled),expression:"editQuestion.options.inputtedEnabled"}],staticClass:"option-expand"},[_c('span',[_vm._v(_vm._s(_vm.t("survey_creator.question.inputted_enabled_prefix")))]),_vm._v(" "),_c('InputNumber',{staticClass:"inputing",attrs:{"max":999,"min":1,"precision":0},model:{value:(_vm.editQuestion.options.inputMinLength),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "inputMinLength", $$v);},expression:"editQuestion.options.inputMinLength"}}),_vm._v(" "),_c('span',[_vm._v(_vm._s(_vm.t("survey_creator.question.inputted_enabled_suffix")))])],1)],1):_vm._e()],1):_c('div',{staticClass:"options"},[(_vm.enabledInputChoice)?_c('div',[_c('Checkbox',{staticClass:"option",staticStyle:{"margin-top":"0px"},on:{"on-change":_vm.inputEnabledChange},model:{value:(_vm.editQuestion.options.inputtedEnabled),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "inputtedEnabled", $$v);},expression:"editQuestion.options.inputtedEnabled"}},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.inputted_enabled"))+"\n ")]),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.inputtedEnabled),expression:"editQuestion.options.inputtedEnabled"}],staticClass:"option-expand"},[_c('span',[_vm._v(_vm._s(_vm.t("survey_creator.question.inputted_enabled_prefix")))]),_vm._v(" "),_c('InputNumber',{staticClass:"inputing",attrs:{"max":999,"min":1,"precision":0},model:{value:(_vm.editQuestion.options.inputMinLength),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "inputMinLength", $$v);},expression:"editQuestion.options.inputMinLength"}}),_vm._v(" "),_c('span',[_vm._v(_vm._s(_vm.t("survey_creator.question.inputted_enabled_suffix")))])],1)],1):_vm._e()])])]),_vm._v(" "),(_vm.enabledEvaluationTag)?_c('div',{staticClass:"evaluation-tag-row"},[_c('span',{staticClass:"evaluation-tag-label"},[_vm._v(_vm._s(_vm.t("survey_creator.question.evaluation_tag.label"))+":")]),_vm._v(" "),_c('RadioGroup',{model:{value:(_vm.editQuestion.options.evaluationTag),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "evaluationTag", $$v);},expression:"editQuestion.options.evaluationTag"}},[_c('Radio',{attrs:{"label":"TEACHER"}},[_vm._v(_vm._s(_vm.t("survey_creator.question.evaluation_tag.TEACHER")))]),_vm._v(" "),_c('Radio',{attrs:{"label":"COURSE"}},[_vm._v(_vm._s(_vm.t("survey_creator.question.evaluation_tag.COURSE")))])],1)],1):_vm._e(),_vm._v(" "),(_vm.enabledRichText)?_c('Alert',{attrs:{"show-icon":""}},[_vm._v(_vm._s(_vm.t("survey_creator.question.rich_text.alert"))+"\n ")]):_vm._e(),_vm._v(" "),_c('Row',[_c('Form-item',{attrs:{"label-width":80,"label":_vm.t('survey_creator.page.question'),"prop":'header.text.' + _vm.primaryLanguage,"rules":{
|
|
19127
19139
|
required: true,
|
|
19128
19140
|
message: _vm.t('survey_creator.question.titleRequiredTip'),
|
|
19129
19141
|
}}},[_c('Row',[_c('Col',{attrs:{"span":"24"}},[(_vm.enabledRichText)?_c('rich-text',{ref:"richText",attrs:{"placeholder":_vm.t('survey_creator.question.titleRequiredTip')},on:{"input":_vm.onRichTextInput},model:{value:(_vm.editQuestion.header.text[_vm.primaryLanguage]),callback:function ($$v) {_vm.$set(_vm.editQuestion.header.text, _vm.primaryLanguage, $$v);},expression:"editQuestion.header.text[primaryLanguage]"}}):_c('Input',{attrs:{"maxlength":500,"placeholder":_vm.t('survey_creator.question.titleRequiredTip')},model:{value:(_vm.editQuestion.header.text[_vm.primaryLanguage]),callback:function ($$v) {_vm.$set(_vm.editQuestion.header.text, _vm.primaryLanguage, $$v);},expression:"editQuestion.header.text[primaryLanguage]"}})],1)],1)],1)],1),_vm._v(" "),_c('div',{staticClass:"option-header"},[_c('div',{staticClass:"choice"},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.option_header_choice"))+"\n ")]),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.scoringEnabled),expression:"editQuestion.options.scoringEnabled"}],staticClass:"scoring"},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.option_header_scoring"))+"\n ")]),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.inputtedEnabled),expression:"editQuestion.options.inputtedEnabled"}],staticClass:"inputing"},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.option_header_inputing"))+"\n ")]),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.starEnabled),expression:"editQuestion.options.starEnabled"}],staticClass:"inputing"},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.starEnabled"))+"\n ")])]),_vm._v(" "),_c('draggable',{staticClass:"question-choices-wrapper",attrs:{"draggable":".question-choice"},on:{"start":function($event){_vm.drag = true;},"end":function($event){_vm.drag = false;}},model:{value:(_vm.editQuestion.choices),callback:function ($$v) {_vm.$set(_vm.editQuestion, "choices", $$v);},expression:"editQuestion.choices"}},_vm._l((_vm.editQuestion.choices),function(option,index){return _c('div',{key:index},[_c('FormItem',{attrs:{"label-width":80,"label":_vm.t('survey_creator.question.optional'),"prop":'choices.' + index + '.text.' + _vm.primaryLanguage,"rules":{
|
|
@@ -19152,11 +19164,11 @@ var __vue_staticRenderFns__$o = [];
|
|
|
19152
19164
|
/* style */
|
|
19153
19165
|
const __vue_inject_styles__$p = function (inject) {
|
|
19154
19166
|
if (!inject) return
|
|
19155
|
-
inject("data-v-
|
|
19167
|
+
inject("data-v-4214b994_0", { source: ".options-container[data-v-4214b994]{margin:0 8px 16px;border-bottom:1px solid #e8eaec;display:grid}.options-container .options-row[data-v-4214b994]{display:flex;flex-direction:row;margin-bottom:16px}.options-container .options-row .options[data-v-4214b994]{display:flex;flex-direction:column}.options-container .options-row .options .option[data-v-4214b994]{margin-top:24px}.options-container .options-row .options .option-expand[data-v-4214b994]{display:flex;align-items:center;margin-top:10px;padding:8px;border-radius:4px;background:#f7f7f7}.options-container .options-row .options .option-expand .inputing[data-v-4214b994]{width:64px}.options-container .before-border[data-v-4214b994]{border-left:1px solid #e8eaec;padding-left:16px}.evaluation-tag-row[data-v-4214b994]{display:flex;align-items:center;padding:8px 8px 12px;border-bottom:1px solid #e8eaec;margin-bottom:16px}.evaluation-tag-row .evaluation-tag-label[data-v-4214b994]{margin-right:8px;font-size:14px;color:#262833;white-space:nowrap}.option-header[data-v-4214b994]{background:#f0f1f3;border-radius:4px;width:100%;height:32px;margin-bottom:24px;display:flex;flex-direction:row;color:#70748c;align-items:center;padding:0 8px 0 16px}.option-header .choice[data-v-4214b994]{width:100%}.option-header .scoring[data-v-4214b994]{width:100px;display:flex;justify-content:center}.option-header .inputing[data-v-4214b994]{width:145px;min-width:42px;display:flex;justify-content:center}.question-choice[data-v-4214b994]{display:flex;flex-direction:row;align-items:center;padding-right:8px}.question-choice .choice[data-v-4214b994]{display:flex;flex-direction:row;width:100%;margin-right:8px}.question-choice .choice .button[data-v-4214b994]{margin-left:8px}.question-choice .scoring[data-v-4214b994]{width:85px}.question-choice .inputing[data-v-4214b994]{width:145px;text-align:center}.question-choice .inputing .ivu-checkbox-wrapper[data-v-4214b994]{margin-right:0}[data-v-4214b994] .ivu-form-item{width:100%}.option-input[data-v-4214b994]{margin:0 50px 30px 80px}[data-v-4214b994] .ivu-form-item-error-tip{min-width:170px}", map: undefined, media: undefined });
|
|
19156
19168
|
|
|
19157
19169
|
};
|
|
19158
19170
|
/* scoped */
|
|
19159
|
-
const __vue_scope_id__$p = "data-v-
|
|
19171
|
+
const __vue_scope_id__$p = "data-v-4214b994";
|
|
19160
19172
|
/* module identifier */
|
|
19161
19173
|
const __vue_module_identifier__$p = undefined;
|
|
19162
19174
|
/* functional template */
|
|
@@ -19189,6 +19201,8 @@ var script$q = Vue.extend({
|
|
|
19189
19201
|
Button,
|
|
19190
19202
|
Input: Input$1,
|
|
19191
19203
|
Checkbox,
|
|
19204
|
+
Radio,
|
|
19205
|
+
RadioGroup,
|
|
19192
19206
|
Row,
|
|
19193
19207
|
Col,
|
|
19194
19208
|
Icon,
|
|
@@ -19212,7 +19226,8 @@ var script$q = Vue.extend({
|
|
|
19212
19226
|
enabledExclusiveChoice: false,
|
|
19213
19227
|
enabledInputChoice: false,
|
|
19214
19228
|
enabledRichText: false,
|
|
19215
|
-
enabledSpeciallyQuestions: true
|
|
19229
|
+
enabledSpeciallyQuestions: true,
|
|
19230
|
+
enabledEvaluationTag: false,
|
|
19216
19231
|
};
|
|
19217
19232
|
},
|
|
19218
19233
|
created() {
|
|
@@ -19222,6 +19237,10 @@ var script$q = Vue.extend({
|
|
|
19222
19237
|
this.enabledRichText = _$1.get(this.$rootComponent, "options.enabledPlanSurveyTeacherSetting", false);
|
|
19223
19238
|
this.editQuestion.options.richTextEnabled = this.enabledRichText;
|
|
19224
19239
|
this.enabledSpeciallyQuestions = _$1.get(this.$rootComponent, "options.enabledSpeciallyQuestions", true);
|
|
19240
|
+
this.enabledEvaluationTag = _$1.get(this.$rootComponent, "options.enabledEvaluationTag", false);
|
|
19241
|
+
if (this.enabledEvaluationTag && !this.editQuestion.options.evaluationTag) {
|
|
19242
|
+
this.$set(this.editQuestion.options, "evaluationTag", "COURSE");
|
|
19243
|
+
}
|
|
19225
19244
|
},
|
|
19226
19245
|
computed: {
|
|
19227
19246
|
gridTemplateColumns() {
|
|
@@ -19341,7 +19360,7 @@ var script$q = Vue.extend({
|
|
|
19341
19360
|
const __vue_script__$q = script$q;
|
|
19342
19361
|
|
|
19343
19362
|
/* template */
|
|
19344
|
-
var __vue_render__$p = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('Form',{ref:"questionForm",staticClass:"multi-selection-form",attrs:{"model":_vm.editQuestion,"label-colon":false},on:{"on-validate":_vm.onValidate}},[_c('div',{staticClass:"options-container",style:(_vm.gridTemplateColumns>2?'grid-template-columns: 30% 40% 30%':'grid-template-columns: 50% 50%')},[_c('div',{staticClass:"options-row"},[_c('div',{staticClass:"options"},[_c('Checkbox',{model:{value:(_vm.editQuestion.options.required),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "required", $$v);},expression:"editQuestion.options.required"}},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.questionRequired"))+"\n ")]),_vm._v(" "),_c('Checkbox',{staticClass:"option",on:{"on-change":_vm.scoringEnabledChange},model:{value:(_vm.editQuestion.options.scoringEnabled),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "scoringEnabled", $$v);},expression:"editQuestion.options.scoringEnabled"}},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.scoringEnabled"))+"\n ")])],1)]),_vm._v(" "),(_vm.gridTemplateColumns>0)?_c('div',{staticClass:"options-row before-border"},[(_vm.enabledSpeciallyQuestions)?_c('div',{staticClass:"options"},[_c('Checkbox',{on:{"on-change":_vm.starEnabledChange},model:{value:(_vm.editQuestion.options.starEnabled),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "starEnabled", $$v);},expression:"editQuestion.options.starEnabled"}},[_c('span',[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.starEnabled"))+"\n "),_c('Icon',{attrs:{"type":"md-star","color":"orange","size":16}})],1)]),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.starEnabled),expression:"editQuestion.options.starEnabled"}],staticClass:"option-expand"},[_c('span',[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.starMinCountPrefix"))+"\n ")]),_vm._v(" "),_c('Select',{staticStyle:{"width":"50px"},attrs:{"size":"small"},model:{value:(_vm.editQuestion.options.starMinCount),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "starMinCount", $$v);},expression:"editQuestion.options.starMinCount"}},_vm._l((_vm.selectStarList),function(item){return _c('Option',{key:item.value,attrs:{"value":item.value}},[_vm._v(_vm._s(item.label)+"\n ")])}),1),_vm._v(" "),_c('span',[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.starMinCountSuffix"))+"\n ")])],1),_vm._v(" "),(_vm.enabledInputChoice)?_c('div',[_c('Checkbox',{staticClass:"option",on:{"on-change":_vm.inputEnabledChange},model:{value:(_vm.editQuestion.options.inputtedEnabled),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "inputtedEnabled", $$v);},expression:"editQuestion.options.inputtedEnabled"}},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.inputted_enabled"))+"\n ")]),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.inputtedEnabled),expression:"editQuestion.options.inputtedEnabled"}],staticClass:"option-expand"},[_c('span',[_vm._v(_vm._s(_vm.t("survey_creator.question.inputted_enabled_prefix")))]),_vm._v(" "),_c('InputNumber',{staticClass:"inputing",attrs:{"max":999,"min":1,"precision":0},model:{value:(_vm.editQuestion.options.inputMinLength),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "inputMinLength", $$v);},expression:"editQuestion.options.inputMinLength"}}),_vm._v(" "),_c('span',[_vm._v(_vm._s(_vm.t("survey_creator.question.inputted_enabled_suffix")))])],1)],1):_vm._e(),_vm._v(" "),(_vm.enabledExclusiveChoice&&!_vm.enabledInputChoice)?_c('div',{staticClass:"options"},[_c('Checkbox',{staticClass:"option",on:{"on-change":_vm.exclusiveEnabledChange},model:{value:(_vm.editQuestion.options.exclusiveEnabled),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "exclusiveEnabled", $$v);},expression:"editQuestion.options.exclusiveEnabled"}},[_c('span',[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.exclusive_enabled"))+"\n "),_c('Tooltip',{attrs:{"max-width":"200","content":_vm.t('survey_creator.question.exclusive_option_tooltip'),"placement":"bottom"}},[_c('Icon',{attrs:{"custom":"i-icon icon-exclamation-mark-outline","size":"16"}})],1)],1)])],1):_vm._e()],1):_c('div',{staticClass:"options"},[(_vm.enabledInputChoice)?_c('div',[_c('Checkbox',{staticClass:"option",staticStyle:{"margin-top":"0px"},on:{"on-change":_vm.inputEnabledChange},model:{value:(_vm.editQuestion.options.inputtedEnabled),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "inputtedEnabled", $$v);},expression:"editQuestion.options.inputtedEnabled"}},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.inputted_enabled"))+"\n ")]),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.inputtedEnabled),expression:"editQuestion.options.inputtedEnabled"}],staticClass:"option-expand"},[_c('span',[_vm._v(_vm._s(_vm.t("survey_creator.question.inputted_enabled_prefix")))]),_vm._v(" "),_c('InputNumber',{staticClass:"inputing",attrs:{"max":999,"min":1,"precision":0},model:{value:(_vm.editQuestion.options.inputMinLength),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "inputMinLength", $$v);},expression:"editQuestion.options.inputMinLength"}}),_vm._v(" "),_c('span',[_vm._v(_vm._s(_vm.t("survey_creator.question.inputted_enabled_suffix")))])],1)],1):_vm._e(),_vm._v(" "),(_vm.enabledExclusiveChoice)?_c('Checkbox',{staticClass:"option",style:(_vm.enabledInputChoice?'margin-top: 24px':'margin-top: 0px'),on:{"on-change":_vm.exclusiveEnabledChange},model:{value:(_vm.editQuestion.options.exclusiveEnabled),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "exclusiveEnabled", $$v);},expression:"editQuestion.options.exclusiveEnabled"}},[_c('span',[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.exclusive_enabled"))+"\n "),_c('Tooltip',{attrs:{"max-width":"200","content":_vm.t('survey_creator.question.exclusive_option_tooltip'),"placement":"bottom"}},[_c('Icon',{attrs:{"custom":"i-icon icon-exclamation-mark-outline","size":"16"}})],1)],1)]):_vm._e()],1)]):_vm._e(),_vm._v(" "),(_vm.gridTemplateColumns>2)?_c('div',{staticClass:"options-row before-border"},[_c('div',{staticClass:"options"},[_c('Checkbox',{on:{"on-change":_vm.exclusiveEnabledChange},model:{value:(_vm.editQuestion.options.exclusiveEnabled),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "exclusiveEnabled", $$v);},expression:"editQuestion.options.exclusiveEnabled"}},[_c('span',[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.exclusive_enabled"))+"\n "),_c('Tooltip',{attrs:{"max-width":"200","content":_vm.t('survey_creator.question.exclusive_option_tooltip'),"placement":"bottom"}},[_c('Icon',{attrs:{"custom":"i-icon icon-exclamation-mark-outline","size":"16"}})],1)],1)])],1)]):_vm._e()]),_vm._v(" "),(_vm.enabledRichText)?_c('Alert',{attrs:{"show-icon":""}},[_vm._v(_vm._s(_vm.t("survey_creator.question.rich_text.alert"))+"\n ")]):_vm._e(),_vm._v(" "),_c('Row',[_c('Form-item',{attrs:{"label-width":60,"label":_vm.t('survey_creator.page.question'),"prop":'header.text.' + _vm.primaryLanguage,"rules":{
|
|
19363
|
+
var __vue_render__$p = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('Form',{ref:"questionForm",staticClass:"multi-selection-form",attrs:{"model":_vm.editQuestion,"label-colon":false},on:{"on-validate":_vm.onValidate}},[_c('div',{staticClass:"options-container",style:(_vm.gridTemplateColumns>2?'grid-template-columns: 30% 40% 30%':'grid-template-columns: 50% 50%')},[_c('div',{staticClass:"options-row"},[_c('div',{staticClass:"options"},[_c('Checkbox',{model:{value:(_vm.editQuestion.options.required),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "required", $$v);},expression:"editQuestion.options.required"}},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.questionRequired"))+"\n ")]),_vm._v(" "),_c('Checkbox',{staticClass:"option",on:{"on-change":_vm.scoringEnabledChange},model:{value:(_vm.editQuestion.options.scoringEnabled),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "scoringEnabled", $$v);},expression:"editQuestion.options.scoringEnabled"}},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.scoringEnabled"))+"\n ")])],1)]),_vm._v(" "),(_vm.gridTemplateColumns>0)?_c('div',{staticClass:"options-row before-border"},[(_vm.enabledSpeciallyQuestions)?_c('div',{staticClass:"options"},[_c('Checkbox',{on:{"on-change":_vm.starEnabledChange},model:{value:(_vm.editQuestion.options.starEnabled),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "starEnabled", $$v);},expression:"editQuestion.options.starEnabled"}},[_c('span',[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.starEnabled"))+"\n "),_c('Icon',{attrs:{"type":"md-star","color":"orange","size":16}})],1)]),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.starEnabled),expression:"editQuestion.options.starEnabled"}],staticClass:"option-expand"},[_c('span',[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.starMinCountPrefix"))+"\n ")]),_vm._v(" "),_c('Select',{staticStyle:{"width":"50px"},attrs:{"size":"small"},model:{value:(_vm.editQuestion.options.starMinCount),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "starMinCount", $$v);},expression:"editQuestion.options.starMinCount"}},_vm._l((_vm.selectStarList),function(item){return _c('Option',{key:item.value,attrs:{"value":item.value}},[_vm._v(_vm._s(item.label)+"\n ")])}),1),_vm._v(" "),_c('span',[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.starMinCountSuffix"))+"\n ")])],1),_vm._v(" "),(_vm.enabledInputChoice)?_c('div',[_c('Checkbox',{staticClass:"option",on:{"on-change":_vm.inputEnabledChange},model:{value:(_vm.editQuestion.options.inputtedEnabled),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "inputtedEnabled", $$v);},expression:"editQuestion.options.inputtedEnabled"}},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.inputted_enabled"))+"\n ")]),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.inputtedEnabled),expression:"editQuestion.options.inputtedEnabled"}],staticClass:"option-expand"},[_c('span',[_vm._v(_vm._s(_vm.t("survey_creator.question.inputted_enabled_prefix")))]),_vm._v(" "),_c('InputNumber',{staticClass:"inputing",attrs:{"max":999,"min":1,"precision":0},model:{value:(_vm.editQuestion.options.inputMinLength),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "inputMinLength", $$v);},expression:"editQuestion.options.inputMinLength"}}),_vm._v(" "),_c('span',[_vm._v(_vm._s(_vm.t("survey_creator.question.inputted_enabled_suffix")))])],1)],1):_vm._e(),_vm._v(" "),(_vm.enabledExclusiveChoice&&!_vm.enabledInputChoice)?_c('div',{staticClass:"options"},[_c('Checkbox',{staticClass:"option",on:{"on-change":_vm.exclusiveEnabledChange},model:{value:(_vm.editQuestion.options.exclusiveEnabled),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "exclusiveEnabled", $$v);},expression:"editQuestion.options.exclusiveEnabled"}},[_c('span',[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.exclusive_enabled"))+"\n "),_c('Tooltip',{attrs:{"max-width":"200","content":_vm.t('survey_creator.question.exclusive_option_tooltip'),"placement":"bottom"}},[_c('Icon',{attrs:{"custom":"i-icon icon-exclamation-mark-outline","size":"16"}})],1)],1)])],1):_vm._e()],1):_c('div',{staticClass:"options"},[(_vm.enabledInputChoice)?_c('div',[_c('Checkbox',{staticClass:"option",staticStyle:{"margin-top":"0px"},on:{"on-change":_vm.inputEnabledChange},model:{value:(_vm.editQuestion.options.inputtedEnabled),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "inputtedEnabled", $$v);},expression:"editQuestion.options.inputtedEnabled"}},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.inputted_enabled"))+"\n ")]),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.inputtedEnabled),expression:"editQuestion.options.inputtedEnabled"}],staticClass:"option-expand"},[_c('span',[_vm._v(_vm._s(_vm.t("survey_creator.question.inputted_enabled_prefix")))]),_vm._v(" "),_c('InputNumber',{staticClass:"inputing",attrs:{"max":999,"min":1,"precision":0},model:{value:(_vm.editQuestion.options.inputMinLength),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "inputMinLength", $$v);},expression:"editQuestion.options.inputMinLength"}}),_vm._v(" "),_c('span',[_vm._v(_vm._s(_vm.t("survey_creator.question.inputted_enabled_suffix")))])],1)],1):_vm._e(),_vm._v(" "),(_vm.enabledExclusiveChoice)?_c('Checkbox',{staticClass:"option",style:(_vm.enabledInputChoice?'margin-top: 24px':'margin-top: 0px'),on:{"on-change":_vm.exclusiveEnabledChange},model:{value:(_vm.editQuestion.options.exclusiveEnabled),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "exclusiveEnabled", $$v);},expression:"editQuestion.options.exclusiveEnabled"}},[_c('span',[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.exclusive_enabled"))+"\n "),_c('Tooltip',{attrs:{"max-width":"200","content":_vm.t('survey_creator.question.exclusive_option_tooltip'),"placement":"bottom"}},[_c('Icon',{attrs:{"custom":"i-icon icon-exclamation-mark-outline","size":"16"}})],1)],1)]):_vm._e()],1)]):_vm._e(),_vm._v(" "),(_vm.gridTemplateColumns>2)?_c('div',{staticClass:"options-row before-border"},[_c('div',{staticClass:"options"},[_c('Checkbox',{on:{"on-change":_vm.exclusiveEnabledChange},model:{value:(_vm.editQuestion.options.exclusiveEnabled),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "exclusiveEnabled", $$v);},expression:"editQuestion.options.exclusiveEnabled"}},[_c('span',[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.exclusive_enabled"))+"\n "),_c('Tooltip',{attrs:{"max-width":"200","content":_vm.t('survey_creator.question.exclusive_option_tooltip'),"placement":"bottom"}},[_c('Icon',{attrs:{"custom":"i-icon icon-exclamation-mark-outline","size":"16"}})],1)],1)])],1)]):_vm._e()]),_vm._v(" "),(_vm.enabledEvaluationTag)?_c('div',{staticClass:"evaluation-tag-row"},[_c('span',{staticClass:"evaluation-tag-label"},[_vm._v(_vm._s(_vm.t("survey_creator.question.evaluation_tag.label"))+":")]),_vm._v(" "),_c('RadioGroup',{model:{value:(_vm.editQuestion.options.evaluationTag),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "evaluationTag", $$v);},expression:"editQuestion.options.evaluationTag"}},[_c('Radio',{attrs:{"label":"TEACHER"}},[_vm._v(_vm._s(_vm.t("survey_creator.question.evaluation_tag.TEACHER")))]),_vm._v(" "),_c('Radio',{attrs:{"label":"COURSE"}},[_vm._v(_vm._s(_vm.t("survey_creator.question.evaluation_tag.COURSE")))])],1)],1):_vm._e(),_vm._v(" "),(_vm.enabledRichText)?_c('Alert',{attrs:{"show-icon":""}},[_vm._v(_vm._s(_vm.t("survey_creator.question.rich_text.alert"))+"\n ")]):_vm._e(),_vm._v(" "),_c('Row',[_c('Form-item',{attrs:{"label-width":60,"label":_vm.t('survey_creator.page.question'),"prop":'header.text.' + _vm.primaryLanguage,"rules":{
|
|
19345
19364
|
required: true,
|
|
19346
19365
|
message: _vm.t('survey_creator.question.titleRequiredTip'),
|
|
19347
19366
|
}}},[_c('Row',[_c('Col',{attrs:{"span":"24"}},[(_vm.enabledRichText)?_c('rich-text',{ref:"richText",attrs:{"placeholder":_vm.t('survey_creator.question.titleRequiredTip')},on:{"input":_vm.onRichTextInput},model:{value:(_vm.editQuestion.header.text[_vm.primaryLanguage]),callback:function ($$v) {_vm.$set(_vm.editQuestion.header.text, _vm.primaryLanguage, $$v);},expression:"editQuestion.header.text[primaryLanguage]"}}):_c('Input',{attrs:{"maxlength":500,"placeholder":_vm.t('survey_creator.question.titleRequiredTip')},model:{value:(_vm.editQuestion.header.text[_vm.primaryLanguage]),callback:function ($$v) {_vm.$set(_vm.editQuestion.header.text, _vm.primaryLanguage, $$v);},expression:"editQuestion.header.text[primaryLanguage]"}})],1)],1)],1)],1),_vm._v(" "),_c('div',{staticClass:"option-header"},[_c('div',{staticClass:"choice"},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.option_header_choice"))+"\n ")]),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.scoringEnabled),expression:"editQuestion.options.scoringEnabled"}],staticClass:"scoring"},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.option_header_scoring"))+"\n ")]),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.editQuestion.options.inputtedEnabled),expression:"editQuestion.options.inputtedEnabled"}],staticClass:"inputing"},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.option_header_inputing"))+"\n ")])]),_vm._v(" "),_c('draggable',{staticClass:"question-choices-wrapper",attrs:{"draggable":".question-choice"},on:{"start":function($event){_vm.drag = true;},"end":function($event){_vm.drag = false;}},model:{value:(_vm.editQuestion.choices),callback:function ($$v) {_vm.$set(_vm.editQuestion, "choices", $$v);},expression:"editQuestion.choices"}},_vm._l((_vm.editQuestion.choices),function(option,index){return _c('div',{key:index},[(!option.options.exclusiveEnabled)?_c('div',{staticClass:"choice-row"},[_c('FormItem',{attrs:{"label-width":60,"label":_vm.t('survey_creator.question.optional'),"prop":'choices.' + index + '.text.' + _vm.primaryLanguage,"rules":{
|
|
@@ -19382,11 +19401,11 @@ var __vue_staticRenderFns__$p = [];
|
|
|
19382
19401
|
/* style */
|
|
19383
19402
|
const __vue_inject_styles__$q = function (inject) {
|
|
19384
19403
|
if (!inject) return
|
|
19385
|
-
inject("data-v-
|
|
19404
|
+
inject("data-v-45217913_0", { source: ".multi-selection-form .options-container[data-v-45217913]{margin:0 8px 16px;border-bottom:1px solid #e8eaec;display:grid}.multi-selection-form .options-container .options-row[data-v-45217913]{display:flex;flex-direction:row;margin-bottom:16px}.multi-selection-form .options-container .options-row .options[data-v-45217913]{display:flex;flex-direction:column}.multi-selection-form .options-container .options-row .options .option[data-v-45217913]{margin-top:24px}.multi-selection-form .options-container .options-row .options .option-expand[data-v-45217913]{display:flex;align-items:center;margin-top:10px;padding:8px;border-radius:4px;background:#f7f7f7}.multi-selection-form .options-container .options-row .options .option-expand .inputing[data-v-45217913]{width:64px}.multi-selection-form .options-container .before-border[data-v-45217913]{border-left:1px solid #e8eaec;padding-left:16px}.multi-selection-form .question-options[data-v-45217913]{padding-bottom:10px;padding-left:80px}.multi-selection-form[data-v-45217913] .ivu-form-item{width:100%}.multi-selection-form .evaluation-tag-row[data-v-45217913]{display:flex;align-items:center;padding:8px 8px 12px;border-bottom:1px solid #e8eaec;margin-bottom:16px}.multi-selection-form .evaluation-tag-row .evaluation-tag-label[data-v-45217913]{margin-right:8px;font-size:14px;color:#262833;white-space:nowrap}.multi-selection-form .option-header[data-v-45217913]{background:#f0f1f3;border-radius:4px;width:100%;height:32px;margin-bottom:24px;display:flex;flex-direction:row;color:#70748c;align-items:center;padding:0 8px 0 16px}.multi-selection-form .option-header .choice[data-v-45217913]{width:100%}.multi-selection-form .option-header .scoring[data-v-45217913]{width:100px;display:flex;justify-content:center}.multi-selection-form .option-header .inputing[data-v-45217913]{width:145px;min-width:42px;display:flex;justify-content:center}.multi-selection-form .choice-row .question-choice[data-v-45217913]{display:flex;flex-direction:row;align-items:center;padding-right:8px}.multi-selection-form .choice-row .question-choice .choice[data-v-45217913]{display:flex;flex-direction:row;width:100%;margin-right:8px}.multi-selection-form .choice-row .question-choice .choice .button[data-v-45217913]{margin-left:8px}.multi-selection-form .choice-row .question-choice .scoring[data-v-45217913]{width:85px}.multi-selection-form .choice-row .question-choice .inputing[data-v-45217913]{width:145px;text-align:center}.multi-selection-form .choice-row .question-choice .inputing .ivu-checkbox-wrapper[data-v-45217913]{margin-right:0}.multi-selection-form .exclusive-choice[data-v-45217913]{border-top:1px solid #e8eaec;padding-top:16px}.multi-selection-form .option-input[data-v-45217913]{margin:0 50px 30px 60px}[data-v-45217913] .ivu-form-item-error-tip{min-width:170px}", map: undefined, media: undefined });
|
|
19386
19405
|
|
|
19387
19406
|
};
|
|
19388
19407
|
/* scoped */
|
|
19389
|
-
const __vue_scope_id__$q = "data-v-
|
|
19408
|
+
const __vue_scope_id__$q = "data-v-45217913";
|
|
19390
19409
|
/* module identifier */
|
|
19391
19410
|
const __vue_module_identifier__$q = undefined;
|
|
19392
19411
|
/* functional template */
|
|
@@ -19419,12 +19438,15 @@ var script$r = Vue.extend({
|
|
|
19419
19438
|
Button,
|
|
19420
19439
|
Input: Input$1,
|
|
19421
19440
|
Checkbox,
|
|
19441
|
+
Radio,
|
|
19442
|
+
RadioGroup,
|
|
19422
19443
|
Icon,
|
|
19423
19444
|
},
|
|
19424
19445
|
mixins: [questionFormMixin],
|
|
19425
19446
|
data() {
|
|
19426
19447
|
return {
|
|
19427
19448
|
enabledPresetReplies: false,
|
|
19449
|
+
enabledEvaluationTag: false,
|
|
19428
19450
|
};
|
|
19429
19451
|
},
|
|
19430
19452
|
computed: {
|
|
@@ -19443,9 +19465,13 @@ var script$r = Vue.extend({
|
|
|
19443
19465
|
},
|
|
19444
19466
|
created() {
|
|
19445
19467
|
this.enabledPresetReplies = _$1.get(this.$rootComponent, "options.enabledPresetReplies", false);
|
|
19468
|
+
this.enabledEvaluationTag = _$1.get(this.$rootComponent, "options.enabledEvaluationTag", false);
|
|
19446
19469
|
if (!this.editQuestion.options.presetReplies) {
|
|
19447
19470
|
this.$set(this.editQuestion.options, "presetReplies", []);
|
|
19448
19471
|
}
|
|
19472
|
+
if (this.enabledEvaluationTag && !this.editQuestion.options.evaluationTag) {
|
|
19473
|
+
this.$set(this.editQuestion.options, "evaluationTag", "COURSE");
|
|
19474
|
+
}
|
|
19449
19475
|
},
|
|
19450
19476
|
methods: {
|
|
19451
19477
|
addPresetReply() {
|
|
@@ -19485,7 +19511,7 @@ const __vue_script__$r = script$r;
|
|
|
19485
19511
|
var __vue_render__$q = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('Form',{ref:"questionForm",attrs:{"model":_vm.editQuestion,"label-colon":false}},[_c('Form-item',{attrs:{"prop":'header.text.' + _vm.primaryLanguage,"rules":{
|
|
19486
19512
|
required: true,
|
|
19487
19513
|
message: _vm.t('survey_creator.question.titleRequiredTip'),
|
|
19488
|
-
}}},[_c('label',{attrs:{"slot":"label"},slot:"label"},[_c('span'),_vm._v(" "),_c('span',[_vm._v(_vm._s(_vm.t("survey_creator.page.question")))])]),_vm._v(" "),_c('Checkbox',{model:{value:(_vm.editQuestion.options.required),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "required", $$v);},expression:"editQuestion.options.required"}},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.questionRequired"))+"\n ")]),_vm._v(" "),_c('Input',{attrs:{"placeholder":_vm.t('survey_creator.question.titleRequiredTip')},model:{value:(_vm.editQuestion.header.text[_vm.primaryLanguage]),callback:function ($$v) {_vm.$set(_vm.editQuestion.header.text, _vm.primaryLanguage, (typeof $$v === 'string'? $$v.trim(): $$v));},expression:"editQuestion.header.text[primaryLanguage]"}})],1),_vm._v(" "),(_vm.showPresetReplies)?_c('div',{staticClass:"preset-replies"},[_c('Button',{attrs:{"type":"primary","icon":"md-add","disabled":_vm.hasEmptyReply},on:{"click":_vm.addPresetReply}},[_vm._v(_vm._s(_vm.t("survey_creator.question.addPresetReply"))+"\n ")]),_vm._v(" "),_c('div',{staticClass:"preset-reply-list"},_vm._l((_vm.editQuestion.options.presetReplies),function(reply,index){return _c('Form-item',{key:index,staticClass:"preset-reply-item",attrs:{"prop":'options.presetReplies.' + index,"rules":[
|
|
19514
|
+
}}},[_c('label',{attrs:{"slot":"label"},slot:"label"},[_c('span'),_vm._v(" "),_c('span',[_vm._v(_vm._s(_vm.t("survey_creator.page.question")))])]),_vm._v(" "),_c('Checkbox',{model:{value:(_vm.editQuestion.options.required),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "required", $$v);},expression:"editQuestion.options.required"}},[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.questionRequired"))+"\n ")]),_vm._v(" "),(_vm.enabledEvaluationTag)?_c('div',{staticClass:"evaluation-tag-row"},[_c('span',{staticClass:"evaluation-tag-label"},[_vm._v(_vm._s(_vm.t("survey_creator.question.evaluation_tag.label"))+":")]),_vm._v(" "),_c('RadioGroup',{model:{value:(_vm.editQuestion.options.evaluationTag),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "evaluationTag", $$v);},expression:"editQuestion.options.evaluationTag"}},[_c('Radio',{attrs:{"label":"TEACHER"}},[_vm._v(_vm._s(_vm.t("survey_creator.question.evaluation_tag.TEACHER")))]),_vm._v(" "),_c('Radio',{attrs:{"label":"COURSE"}},[_vm._v(_vm._s(_vm.t("survey_creator.question.evaluation_tag.COURSE")))])],1)],1):_vm._e(),_vm._v(" "),_c('Input',{attrs:{"placeholder":_vm.t('survey_creator.question.titleRequiredTip')},model:{value:(_vm.editQuestion.header.text[_vm.primaryLanguage]),callback:function ($$v) {_vm.$set(_vm.editQuestion.header.text, _vm.primaryLanguage, (typeof $$v === 'string'? $$v.trim(): $$v));},expression:"editQuestion.header.text[primaryLanguage]"}})],1),_vm._v(" "),(_vm.showPresetReplies)?_c('div',{staticClass:"preset-replies"},[_c('Button',{attrs:{"type":"primary","icon":"md-add","disabled":_vm.hasEmptyReply},on:{"click":_vm.addPresetReply}},[_vm._v(_vm._s(_vm.t("survey_creator.question.addPresetReply"))+"\n ")]),_vm._v(" "),_c('div',{staticClass:"preset-reply-list"},_vm._l((_vm.editQuestion.options.presetReplies),function(reply,index){return _c('Form-item',{key:index,staticClass:"preset-reply-item",attrs:{"prop":'options.presetReplies.' + index,"rules":[
|
|
19489
19515
|
{
|
|
19490
19516
|
required: true,
|
|
19491
19517
|
message: _vm.t('survey_creator.question.presetReplyRequiredTip'),
|
|
@@ -19498,11 +19524,11 @@ var __vue_staticRenderFns__$q = [];
|
|
|
19498
19524
|
/* style */
|
|
19499
19525
|
const __vue_inject_styles__$r = function (inject) {
|
|
19500
19526
|
if (!inject) return
|
|
19501
|
-
inject("data-v-
|
|
19527
|
+
inject("data-v-4d1aeb95_0", { source: "[data-v-4d1aeb95] .ivu-form-item{width:100%}.evaluation-tag-row[data-v-4d1aeb95]{display:flex;align-items:center;padding:8px 0 12px;margin-bottom:8px}.evaluation-tag-row .evaluation-tag-label[data-v-4d1aeb95]{margin-right:8px;font-size:14px;color:#262833;white-space:nowrap}.preset-replies .preset-reply-list[data-v-4d1aeb95]{display:flex;flex-wrap:wrap;gap:8px;margin-top:20px}.preset-replies .preset-reply-list[data-v-4d1aeb95] .ivu-form-item{margin-bottom:14px}.preset-replies .preset-reply-item[data-v-4d1aeb95] .ivu-form-item{margin-bottom:0}.preset-replies .preset-reply-item[data-v-4d1aeb95] .ivu-form-item .ivu-form-item-error-tip{white-space:nowrap}.preset-replies .preset-reply-item .preset-reply-input[data-v-4d1aeb95]{position:relative;min-width:200px}.preset-replies .preset-reply-item .preset-reply-input[data-v-4d1aeb95] .ivu-input{padding-right:28px}.preset-replies .preset-reply-item .preset-reply-input .preset-reply-close[data-v-4d1aeb95]{position:absolute;right:8px;top:50%;transform:translateY(-50%);font-size:16px;cursor:pointer;color:#999}.preset-replies .preset-reply-item .preset-reply-input .preset-reply-close[data-v-4d1aeb95]:hover{color:#ed4014}", map: undefined, media: undefined });
|
|
19502
19528
|
|
|
19503
19529
|
};
|
|
19504
19530
|
/* scoped */
|
|
19505
|
-
const __vue_scope_id__$r = "data-v-
|
|
19531
|
+
const __vue_scope_id__$r = "data-v-4d1aeb95";
|
|
19506
19532
|
/* module identifier */
|
|
19507
19533
|
const __vue_module_identifier__$r = undefined;
|
|
19508
19534
|
/* functional template */
|
|
@@ -19535,6 +19561,8 @@ var script$s = Vue.extend({
|
|
|
19535
19561
|
Button,
|
|
19536
19562
|
Input: Input$1,
|
|
19537
19563
|
Checkbox,
|
|
19564
|
+
Radio,
|
|
19565
|
+
RadioGroup,
|
|
19538
19566
|
InputNumber,
|
|
19539
19567
|
Row,
|
|
19540
19568
|
Col,
|
|
@@ -19546,8 +19574,15 @@ var script$s = Vue.extend({
|
|
|
19546
19574
|
labelWidth: 80,
|
|
19547
19575
|
defaultLevel: 5,
|
|
19548
19576
|
layoutOptions: ["HORIZONTAL", "VERTICAL"],
|
|
19577
|
+
enabledEvaluationTag: false,
|
|
19549
19578
|
};
|
|
19550
19579
|
},
|
|
19580
|
+
created() {
|
|
19581
|
+
this.enabledEvaluationTag = _$1.get(this.$rootComponent, "options.enabledEvaluationTag", false);
|
|
19582
|
+
if (this.enabledEvaluationTag && !this.editQuestion.options.evaluationTag) {
|
|
19583
|
+
this.$set(this.editQuestion.options, "evaluationTag", "COURSE");
|
|
19584
|
+
}
|
|
19585
|
+
},
|
|
19551
19586
|
mounted() {
|
|
19552
19587
|
this.initData();
|
|
19553
19588
|
},
|
|
@@ -19622,7 +19657,7 @@ var script$s = Vue.extend({
|
|
|
19622
19657
|
const __vue_script__$s = script$s;
|
|
19623
19658
|
|
|
19624
19659
|
/* template */
|
|
19625
|
-
var __vue_render__$r = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('Form',{ref:"questionForm",attrs:{"model":_vm.editQuestion,"label-colon":false}},[_c('Row',[_c('Form-item',{attrs:{"prop":'header.text.' + _vm.primaryLanguage,"rules":{
|
|
19660
|
+
var __vue_render__$r = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('Form',{ref:"questionForm",attrs:{"model":_vm.editQuestion,"label-colon":false}},[(_vm.enabledEvaluationTag)?_c('div',{staticClass:"evaluation-tag-row"},[_c('span',{staticClass:"evaluation-tag-label"},[_vm._v(_vm._s(_vm.t("survey_creator.question.evaluation_tag.label"))+":")]),_vm._v(" "),_c('RadioGroup',{model:{value:(_vm.editQuestion.options.evaluationTag),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "evaluationTag", $$v);},expression:"editQuestion.options.evaluationTag"}},[_c('Radio',{attrs:{"label":"TEACHER"}},[_vm._v(_vm._s(_vm.t("survey_creator.question.evaluation_tag.TEACHER")))]),_vm._v(" "),_c('Radio',{attrs:{"label":"COURSE"}},[_vm._v(_vm._s(_vm.t("survey_creator.question.evaluation_tag.COURSE")))])],1)],1):_vm._e(),_vm._v(" "),_c('Row',[_c('Form-item',{attrs:{"prop":'header.text.' + _vm.primaryLanguage,"rules":{
|
|
19626
19661
|
required: true,
|
|
19627
19662
|
message: _vm.t('survey_creator.question.titleRequiredTip'),
|
|
19628
19663
|
},"label":_vm.t('survey_creator.page.matrixQuestion')}},[_c('Checkbox',{model:{value:(_vm.editQuestion.options.required),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "required", $$v);},expression:"editQuestion.options.required"}},[_vm._v(_vm._s(_vm.t("survey_creator.question.questionRequired")))]),_vm._v(" "),_c('Row',[_c('Col',{attrs:{"span":23,"offset":-1}},[_c('Input',{attrs:{"placeholder":_vm.t('survey_creator.question.titleRequiredTip')},model:{value:(_vm.editQuestion.header.text[_vm.primaryLanguage]),callback:function ($$v) {_vm.$set(_vm.editQuestion.header.text, _vm.primaryLanguage, (typeof $$v === 'string'? $$v.trim(): $$v));},expression:"editQuestion.header.text[primaryLanguage]"}})],1)],1)],1)],1),_vm._v(" "),_c('Row',[_c('Form-item',{attrs:{"label":_vm.t('survey_creator.question.level'),"label-width":_vm.labelWidth}},[_c('InputNumber',{attrs:{"min":2,"max":20},on:{"on-change":_vm.levelChange},model:{value:(_vm.editQuestion.options.level),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "level", $$v);},expression:"editQuestion.options.level"}})],1)],1),_vm._v(" "),_vm._l((_vm.editQuestion.choices),function(choice,index){return _c('FormItem',{key:choice.id,attrs:{"label":_vm.t('survey_creator.question.optional'),"label-width":_vm.labelWidth}},[_c('Row',[_c('Col',{attrs:{"span":"4"}},[_c('FormItem',{attrs:{"prop":'choices.' + index + '.options.score',"rules":{
|
|
@@ -19640,11 +19675,11 @@ var __vue_staticRenderFns__$r = [];
|
|
|
19640
19675
|
/* style */
|
|
19641
19676
|
const __vue_inject_styles__$s = function (inject) {
|
|
19642
19677
|
if (!inject) return
|
|
19643
|
-
inject("data-v-
|
|
19678
|
+
inject("data-v-9e7e18a0_0", { source: "[data-v-9e7e18a0] .ivu-form-item{width:100%}.evaluation-tag-row[data-v-9e7e18a0]{display:flex;align-items:center;padding:8px 8px 12px;border-bottom:1px solid #e8eaec;margin-bottom:16px}.evaluation-tag-row .evaluation-tag-label[data-v-9e7e18a0]{margin-right:8px;font-size:14px;color:#262833;white-space:nowrap}", map: undefined, media: undefined });
|
|
19644
19679
|
|
|
19645
19680
|
};
|
|
19646
19681
|
/* scoped */
|
|
19647
|
-
const __vue_scope_id__$s = "data-v-
|
|
19682
|
+
const __vue_scope_id__$s = "data-v-9e7e18a0";
|
|
19648
19683
|
/* module identifier */
|
|
19649
19684
|
const __vue_module_identifier__$s = undefined;
|
|
19650
19685
|
/* functional template */
|
|
@@ -19675,6 +19710,8 @@ var script$t = Vue.extend({
|
|
|
19675
19710
|
FormItem,
|
|
19676
19711
|
Input: Input$1,
|
|
19677
19712
|
Checkbox,
|
|
19713
|
+
Radio,
|
|
19714
|
+
RadioGroup,
|
|
19678
19715
|
Row,
|
|
19679
19716
|
Col,
|
|
19680
19717
|
Select,
|
|
@@ -19698,10 +19735,15 @@ var script$t = Vue.extend({
|
|
|
19698
19735
|
],
|
|
19699
19736
|
scoreRange: [],
|
|
19700
19737
|
decimalPlaceOptions: [0, 1],
|
|
19738
|
+
enabledEvaluationTag: false,
|
|
19701
19739
|
};
|
|
19702
19740
|
},
|
|
19703
19741
|
created() {
|
|
19704
19742
|
this.initData();
|
|
19743
|
+
this.enabledEvaluationTag = _$1.get(this.$rootComponent, "options.enabledEvaluationTag", false);
|
|
19744
|
+
if (this.enabledEvaluationTag && !this.editQuestion.options.evaluationTags) {
|
|
19745
|
+
this.$set(this.editQuestion.options, "evaluationTags", ["COURSE"]);
|
|
19746
|
+
}
|
|
19705
19747
|
},
|
|
19706
19748
|
computed: {
|
|
19707
19749
|
disableLabelSelector() {
|
|
@@ -19807,7 +19849,7 @@ const __vue_script__$t = script$t;
|
|
|
19807
19849
|
/* template */
|
|
19808
19850
|
var __vue_render__$s = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('Form',{ref:"questionForm",attrs:{"model":_vm.editQuestion,"label-colon":false}},[_c('Row',{staticStyle:{"margin-left":"24px"}},[_c('Col',[_c('Form-item',[_c('Checkbox',{model:{value:(_vm.editQuestion.options.required),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "required", $$v);},expression:"editQuestion.options.required"}},[_vm._v(_vm._s(_vm.t("survey_creator.question.questionRequired"))+"\n ")])],1),_vm._v(" "),_c('Row',[_c('Form-item',[_c('Checkbox',{model:{value:(_vm.editQuestion.options.extremeValueLabelEnabled),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "extremeValueLabelEnabled", $$v);},expression:"editQuestion.options.extremeValueLabelEnabled"}},[_vm._v(_vm._s(_vm.t("survey_creator.question.scoring.extreme_value_label"))+"\n ")]),_vm._v(" "),_c('Select',{staticStyle:{"width":"160px"},attrs:{"disabled":_vm.disableLabelSelector,"default-label":_vm.extremeValueLabels[0]},model:{value:(_vm.editQuestion.options.extremeValueLabel),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "extremeValueLabel", $$v);},expression:"editQuestion.options.extremeValueLabel"}},_vm._l((_vm.extremeValueLabels),function(item){return _c('Option',{key:item,attrs:{"value":item}},[_vm._v(_vm._s(_vm.t(
|
|
19809
19851
|
("survey_creator.question.scoring.extreme_value_labels." + item + ".label")
|
|
19810
|
-
))+"\n ")])}),1)],1)],1)],1),_vm._v(" "),_c('Col',[_c('Divider',{staticStyle:{"height":"90px","margin-right":"16px"},attrs:{"type":"vertical"}})],1),_vm._v(" "),_c('Col',[_c('div',[_c('span',[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.scoring.setScoringRange"))+"\n ")]),_vm._v(" "),_c('Select',{staticStyle:{"width":"80px"},model:{value:(_vm.editQuestion.options.minRange),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "minRange", $$v);},expression:"editQuestion.options.minRange"}},_vm._l((_vm.scoreRange),function(item){return _c('Option',{key:item,attrs:{"value":item,"disabled":_vm.disableMinRangeOption(item)}},[_vm._v(_vm._s(item)+"\n ")])}),1),_vm._v("\n -\n "),_c('Select',{staticStyle:{"width":"80px"},model:{value:(_vm.editQuestion.options.maxRange),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "maxRange", $$v);},expression:"editQuestion.options.maxRange"}},_vm._l((_vm.scoreRange),function(item){return _c('Option',{key:item,attrs:{"value":item,"disabled":_vm.disableMaxRangeOption(item)}},[_vm._v(_vm._s(item)+"\n ")])}),1)],1),_vm._v(" "),_c('div',{staticStyle:{"margin-top":"24px"}},[_c('span',[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.scoring.retainDecimal"))+"\n ")]),_vm._v(" "),_c('Select',{staticStyle:{"width":"80px"},attrs:{"default-label":_vm.decimalPlaceOptions[0]},model:{value:(_vm.editQuestion.options.decimalPlaces),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "decimalPlaces", $$v);},expression:"editQuestion.options.decimalPlaces"}},_vm._l((_vm.decimalPlaceOptions),function(item){return _c('Option',{key:item,attrs:{"value":item}},[_vm._v(_vm._s(item)+"\n ")])}),1),_vm._v(" "),_c('span',[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.scoring.decimalPlaces"))+"\n ")])],1)])],1),_vm._v(" "),_c('Divider',{staticStyle:{"margin-top":"-9px"}}),_vm._v(" "),_c('Row',[_c('Form-item',{attrs:{"prop":'header.text.' + _vm.primaryLanguage,"rules":{
|
|
19852
|
+
))+"\n ")])}),1)],1)],1)],1),_vm._v(" "),_c('Col',[_c('Divider',{staticStyle:{"height":"90px","margin-right":"16px"},attrs:{"type":"vertical"}})],1),_vm._v(" "),_c('Col',[_c('div',[_c('span',[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.scoring.setScoringRange"))+"\n ")]),_vm._v(" "),_c('Select',{staticStyle:{"width":"80px"},model:{value:(_vm.editQuestion.options.minRange),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "minRange", $$v);},expression:"editQuestion.options.minRange"}},_vm._l((_vm.scoreRange),function(item){return _c('Option',{key:item,attrs:{"value":item,"disabled":_vm.disableMinRangeOption(item)}},[_vm._v(_vm._s(item)+"\n ")])}),1),_vm._v("\n -\n "),_c('Select',{staticStyle:{"width":"80px"},model:{value:(_vm.editQuestion.options.maxRange),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "maxRange", $$v);},expression:"editQuestion.options.maxRange"}},_vm._l((_vm.scoreRange),function(item){return _c('Option',{key:item,attrs:{"value":item,"disabled":_vm.disableMaxRangeOption(item)}},[_vm._v(_vm._s(item)+"\n ")])}),1)],1),_vm._v(" "),_c('div',{staticStyle:{"margin-top":"24px"}},[_c('span',[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.scoring.retainDecimal"))+"\n ")]),_vm._v(" "),_c('Select',{staticStyle:{"width":"80px"},attrs:{"default-label":_vm.decimalPlaceOptions[0]},model:{value:(_vm.editQuestion.options.decimalPlaces),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "decimalPlaces", $$v);},expression:"editQuestion.options.decimalPlaces"}},_vm._l((_vm.decimalPlaceOptions),function(item){return _c('Option',{key:item,attrs:{"value":item}},[_vm._v(_vm._s(item)+"\n ")])}),1),_vm._v(" "),_c('span',[_vm._v("\n "+_vm._s(_vm.t("survey_creator.question.scoring.decimalPlaces"))+"\n ")])],1)])],1),_vm._v(" "),_c('Divider',{staticStyle:{"margin-top":"-9px"}}),_vm._v(" "),(_vm.enabledEvaluationTag)?_c('div',{staticClass:"evaluation-tag-row"},[_c('span',{staticClass:"evaluation-tag-label"},[_vm._v(_vm._s(_vm.t("survey_creator.question.evaluation_tag.label"))+":")]),_vm._v(" "),_c('RadioGroup',{model:{value:(_vm.editQuestion.options.evaluationTag),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "evaluationTag", $$v);},expression:"editQuestion.options.evaluationTag"}},[_c('Radio',{attrs:{"label":"TEACHER"}},[_vm._v(_vm._s(_vm.t("survey_creator.question.evaluation_tag.TEACHER")))]),_vm._v(" "),_c('Radio',{attrs:{"label":"COURSE"}},[_vm._v(_vm._s(_vm.t("survey_creator.question.evaluation_tag.COURSE")))])],1)],1):_vm._e(),_vm._v(" "),_c('Row',[_c('Form-item',{attrs:{"prop":'header.text.' + _vm.primaryLanguage,"rules":{
|
|
19811
19853
|
required: true,
|
|
19812
19854
|
message: _vm.t('survey_creator.question.titleRequiredTip'),
|
|
19813
19855
|
},"label":_vm.t('survey_creator.page.question')}},[_c('Row',[_c('Input',{attrs:{"placeholder":_vm.t('survey_creator.question.titleRequiredTip')},model:{value:(_vm.editQuestion.header.text[_vm.primaryLanguage]),callback:function ($$v) {_vm.$set(_vm.editQuestion.header.text, _vm.primaryLanguage, (typeof $$v === 'string'? $$v.trim(): $$v));},expression:"editQuestion.header.text[primaryLanguage]"}})],1)],1),_vm._v(" "),_c('Row',{directives:[{name:"show",rawName:"v-show",value:(_vm.showQuestionScoreSlider),expression:"showQuestionScoreSlider"}]},[_c('div',{staticStyle:{"margin-right":"134px","margin-bottom":"18px"}},[_c('Slider',{staticStyle:{"width":"562px","margin-left":"66px","margin-right":"134px","margin-top":"16px"},attrs:{"min":_vm.editQuestion.options.minRange,"max":_vm.editQuestion.options.maxRange,"step":_vm.sliderStep,"show-input":"","show-tips":"always"},model:{value:(_vm.editQuestion.options.sliderValue),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "sliderValue", $$v);},expression:"editQuestion.options.sliderValue"}}),_vm._v(" "),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.extremeValueLabelSelected),expression:"extremeValueLabelSelected"}]},[_c('span',{staticStyle:{"margin-left":"66px","float":"left"}},[_vm._v("\n "+_vm._s(_vm.t(
|
|
@@ -19827,11 +19869,11 @@ var __vue_staticRenderFns__$s = [];
|
|
|
19827
19869
|
/* style */
|
|
19828
19870
|
const __vue_inject_styles__$t = function (inject) {
|
|
19829
19871
|
if (!inject) return
|
|
19830
|
-
inject("data-v-
|
|
19872
|
+
inject("data-v-2f49f423_0", { source: "[data-v-2f49f423] .ivu-form-item{width:100%}.evaluation-tag-row[data-v-2f49f423]{display:flex;align-items:center;padding:8px 8px 12px;border-bottom:1px solid #e8eaec;margin-bottom:16px}.evaluation-tag-row .evaluation-tag-label[data-v-2f49f423]{margin-right:8px;font-size:14px;color:#262833;white-space:nowrap}.btn-container[data-v-2f49f423]{padding-left:8px}.btn-container .icon[data-v-2f49f423]{display:flex;float:left;font-size:18px}.btn-container .label[data-v-2f49f423]{display:flex;float:left;align-items:center;font-weight:500;font-size:14px;line-height:22px}.btn-container .disabled[data-v-2f49f423]{color:#c5c8ce}.btn-container .enabled[data-v-2f49f423]{color:#1890ff;cursor:pointer}", map: undefined, media: undefined });
|
|
19831
19873
|
|
|
19832
19874
|
};
|
|
19833
19875
|
/* scoped */
|
|
19834
|
-
const __vue_scope_id__$t = "data-v-
|
|
19876
|
+
const __vue_scope_id__$t = "data-v-2f49f423";
|
|
19835
19877
|
/* module identifier */
|
|
19836
19878
|
const __vue_module_identifier__$t = undefined;
|
|
19837
19879
|
/* functional template */
|
|
@@ -19863,30 +19905,46 @@ var script$u = Vue.extend({
|
|
|
19863
19905
|
ButtonGroup,
|
|
19864
19906
|
Button,
|
|
19865
19907
|
Input: Input$1,
|
|
19908
|
+
Checkbox,
|
|
19909
|
+
Radio,
|
|
19910
|
+
RadioGroup,
|
|
19866
19911
|
},
|
|
19867
19912
|
mixins: [questionFormMixin],
|
|
19913
|
+
data() {
|
|
19914
|
+
return {
|
|
19915
|
+
enabledEvaluationTag: false,
|
|
19916
|
+
};
|
|
19917
|
+
},
|
|
19918
|
+
created() {
|
|
19919
|
+
this.enabledEvaluationTag = _$1.get(this.$rootComponent, "options.enabledEvaluationTag", false);
|
|
19920
|
+
if (this.enabledEvaluationTag && !this.editQuestion.options.evaluationTag) {
|
|
19921
|
+
this.$set(this.editQuestion.options, "evaluationTag", "COURSE");
|
|
19922
|
+
}
|
|
19923
|
+
},
|
|
19868
19924
|
});
|
|
19869
19925
|
|
|
19870
19926
|
/* script */
|
|
19871
19927
|
const __vue_script__$u = script$u;
|
|
19872
19928
|
|
|
19873
19929
|
/* template */
|
|
19874
|
-
var __vue_render__$t = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('Form',{ref:"questionForm",attrs:{"model":_vm.editQuestion,"label-colon":false}},[_c('Form-item',{attrs:{"prop":'header.text.' + _vm.primaryLanguage,"rules":{
|
|
19930
|
+
var __vue_render__$t = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('Form',{ref:"questionForm",attrs:{"model":_vm.editQuestion,"label-colon":false}},[(_vm.enabledEvaluationTag)?_c('div',{staticClass:"evaluation-tag-row"},[_c('span',{staticClass:"evaluation-tag-label"},[_vm._v(_vm._s(_vm.t("survey_creator.question.evaluation_tag.label"))+":")]),_vm._v(" "),_c('RadioGroup',{model:{value:(_vm.editQuestion.options.evaluationTag),callback:function ($$v) {_vm.$set(_vm.editQuestion.options, "evaluationTag", $$v);},expression:"editQuestion.options.evaluationTag"}},[_c('Radio',{attrs:{"label":"TEACHER"}},[_vm._v(_vm._s(_vm.t("survey_creator.question.evaluation_tag.TEACHER")))]),_vm._v(" "),_c('Radio',{attrs:{"label":"COURSE"}},[_vm._v(_vm._s(_vm.t("survey_creator.question.evaluation_tag.COURSE")))])],1)],1):_vm._e(),_vm._v(" "),_c('Form-item',{attrs:{"prop":'header.text.' + _vm.primaryLanguage,"rules":{
|
|
19875
19931
|
required: true,
|
|
19876
19932
|
message: _vm.t('survey_creator.question.textTitleRequiredTip'),
|
|
19877
19933
|
}}},[_c('label',{attrs:{"slot":"label"},slot:"label"},[_c('span'),_vm._v(" "),_c('span',[_vm._v(_vm._s(_vm.t("survey_creator.page.textTitle")))])]),_vm._v(" "),_c('Input',{attrs:{"autosize":{ minRows: 3, maxRows: 3 },"type":"textarea","placeholder":_vm.t('survey_creator.question.textTitleRequiredTip')},model:{value:(_vm.editQuestion.header.text[_vm.primaryLanguage]),callback:function ($$v) {_vm.$set(_vm.editQuestion.header.text, _vm.primaryLanguage, (typeof $$v === 'string'? $$v.trim(): $$v));},expression:"editQuestion.header.text[primaryLanguage]"}})],1)],1)};
|
|
19878
19934
|
var __vue_staticRenderFns__$t = [];
|
|
19879
19935
|
|
|
19880
19936
|
/* style */
|
|
19881
|
-
const __vue_inject_styles__$u =
|
|
19937
|
+
const __vue_inject_styles__$u = function (inject) {
|
|
19938
|
+
if (!inject) return
|
|
19939
|
+
inject("data-v-356bf7dc_0", { source: ".evaluation-tag-row[data-v-356bf7dc]{display:flex;align-items:center;padding:8px 8px 12px;border-bottom:1px solid #e8eaec;margin-bottom:16px}.evaluation-tag-row .evaluation-tag-label[data-v-356bf7dc]{margin-right:8px;font-size:14px;color:#262833;white-space:nowrap}", map: undefined, media: undefined });
|
|
19940
|
+
|
|
19941
|
+
};
|
|
19882
19942
|
/* scoped */
|
|
19883
|
-
const __vue_scope_id__$u =
|
|
19943
|
+
const __vue_scope_id__$u = "data-v-356bf7dc";
|
|
19884
19944
|
/* module identifier */
|
|
19885
19945
|
const __vue_module_identifier__$u = undefined;
|
|
19886
19946
|
/* functional template */
|
|
19887
19947
|
const __vue_is_functional_template__$u = false;
|
|
19888
|
-
/* style inject */
|
|
19889
|
-
|
|
19890
19948
|
/* style inject SSR */
|
|
19891
19949
|
|
|
19892
19950
|
/* style inject shadow dom */
|
|
@@ -19901,7 +19959,7 @@ var __vue_staticRenderFns__$t = [];
|
|
|
19901
19959
|
__vue_is_functional_template__$u,
|
|
19902
19960
|
__vue_module_identifier__$u,
|
|
19903
19961
|
false,
|
|
19904
|
-
|
|
19962
|
+
createInjector,
|
|
19905
19963
|
undefined,
|
|
19906
19964
|
undefined
|
|
19907
19965
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wg-npm/survey-creator",
|
|
3
|
-
"version": "1.78.
|
|
3
|
+
"version": "1.78.04151600",
|
|
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": "1.78.
|
|
16
|
-
"@wg-npm/survey-service-api": "1.78.
|
|
15
|
+
"@wg-npm/survey-core": "1.78.04151600",
|
|
16
|
+
"@wg-npm/survey-service-api": "1.78.04151600",
|
|
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": "1.78.
|
|
42
|
-
"@wg-npm/survey-service-api": "1.78.
|
|
41
|
+
"@wg-npm/survey-core": "1.78.04151600",
|
|
42
|
+
"@wg-npm/survey-service-api": "1.78.04151600",
|
|
43
43
|
"acorn": "^7.3.1",
|
|
44
44
|
"axios": "^0.19.2",
|
|
45
45
|
"babelrc-rollup": "^3.0.0",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"publishConfig": {
|
|
80
80
|
"access": "public"
|
|
81
81
|
},
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "6602a28aeda8e781ed586c3d22c06a2b9adc6692",
|
|
83
83
|
"rollup": {
|
|
84
84
|
"external": [
|
|
85
85
|
"vue",
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<Form ref="questionForm" :model="editQuestion" :label-colon="false">
|
|
3
|
+
<div v-if="enabledEvaluationTag" class="evaluation-tag-row">
|
|
4
|
+
<span class="evaluation-tag-label">{{ t("survey_creator.question.evaluation_tag.label") }}:</span>
|
|
5
|
+
<RadioGroup v-model="editQuestion.options.evaluationTag">
|
|
6
|
+
<Radio label="TEACHER">{{ t("survey_creator.question.evaluation_tag.TEACHER") }}</Radio>
|
|
7
|
+
<Radio label="COURSE">{{ t("survey_creator.question.evaluation_tag.COURSE") }}</Radio>
|
|
8
|
+
</RadioGroup>
|
|
9
|
+
</div>
|
|
3
10
|
<Row>
|
|
4
11
|
<Form-item
|
|
5
12
|
:prop="'header.text.' + primaryLanguage"
|
|
@@ -115,6 +122,8 @@ import {
|
|
|
115
122
|
FormItem,
|
|
116
123
|
Input,
|
|
117
124
|
InputNumber,
|
|
125
|
+
Radio,
|
|
126
|
+
RadioGroup,
|
|
118
127
|
Row,
|
|
119
128
|
} from "view-design";
|
|
120
129
|
import {
|
|
@@ -134,6 +143,8 @@ export default Vue.extend({
|
|
|
134
143
|
Button,
|
|
135
144
|
Input,
|
|
136
145
|
Checkbox,
|
|
146
|
+
Radio,
|
|
147
|
+
RadioGroup,
|
|
137
148
|
InputNumber,
|
|
138
149
|
Row,
|
|
139
150
|
Col,
|
|
@@ -145,8 +156,16 @@ export default Vue.extend({
|
|
|
145
156
|
labelWidth: 80,
|
|
146
157
|
defaultLevel: 5,
|
|
147
158
|
layoutOptions: [SurveyLayout.HORIZONTAL, SurveyLayout.VERTICAL],
|
|
159
|
+
enabledEvaluationTag: false,
|
|
148
160
|
};
|
|
149
161
|
},
|
|
162
|
+
created() {
|
|
163
|
+
// @ts-ignore
|
|
164
|
+
this.enabledEvaluationTag = _.get(this.$rootComponent, "options.enabledEvaluationTag", false);
|
|
165
|
+
if (this.enabledEvaluationTag && !this.editQuestion.options.evaluationTag) {
|
|
166
|
+
this.$set(this.editQuestion.options, "evaluationTag", "COURSE");
|
|
167
|
+
}
|
|
168
|
+
},
|
|
150
169
|
mounted() {
|
|
151
170
|
this.initData();
|
|
152
171
|
},
|
|
@@ -244,4 +263,19 @@ export default Vue.extend({
|
|
|
244
263
|
/deep/ .ivu-form-item {
|
|
245
264
|
width: 100%;
|
|
246
265
|
}
|
|
266
|
+
|
|
267
|
+
.evaluation-tag-row {
|
|
268
|
+
display: flex;
|
|
269
|
+
align-items: center;
|
|
270
|
+
padding: 8px 8px 12px;
|
|
271
|
+
border-bottom: 1px solid #e8eaec;
|
|
272
|
+
margin-bottom: 16px;
|
|
273
|
+
|
|
274
|
+
.evaluation-tag-label {
|
|
275
|
+
margin-right: 8px;
|
|
276
|
+
font-size: 14px;
|
|
277
|
+
color: #262833;
|
|
278
|
+
white-space: nowrap;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
247
281
|
</style>
|
|
@@ -169,6 +169,13 @@
|
|
|
169
169
|
</div>
|
|
170
170
|
</div>
|
|
171
171
|
</div>
|
|
172
|
+
<div v-if="enabledEvaluationTag" class="evaluation-tag-row">
|
|
173
|
+
<span class="evaluation-tag-label">{{ t("survey_creator.question.evaluation_tag.label") }}:</span>
|
|
174
|
+
<RadioGroup v-model="editQuestion.options.evaluationTag">
|
|
175
|
+
<Radio label="TEACHER">{{ t("survey_creator.question.evaluation_tag.TEACHER") }}</Radio>
|
|
176
|
+
<Radio label="COURSE">{{ t("survey_creator.question.evaluation_tag.COURSE") }}</Radio>
|
|
177
|
+
</RadioGroup>
|
|
178
|
+
</div>
|
|
172
179
|
<Alert v-if="enabledRichText" show-icon>{{
|
|
173
180
|
t("survey_creator.question.rich_text.alert")
|
|
174
181
|
}}
|
|
@@ -362,7 +369,7 @@
|
|
|
362
369
|
<script lang="ts">
|
|
363
370
|
import Vue from "vue";
|
|
364
371
|
import _ from "lodash";
|
|
365
|
-
import {Alert, Button, ButtonGroup, Checkbox, Col, Form, FormItem, Icon, Input, InputNumber, Option, Row, Select, Tooltip,} from "view-design";
|
|
372
|
+
import {Alert, Button, ButtonGroup, Checkbox, Col, Form, FormItem, Icon, Input, InputNumber, Option, Radio, RadioGroup, Row, Select, Tooltip,} from "view-design";
|
|
366
373
|
import {QuestionFactory, SurveyLayout} from "@wg-npm/survey-core";
|
|
367
374
|
import draggable from "vuedraggable";
|
|
368
375
|
import questionFormMixin from "../../../mixins/question-form-mixin";
|
|
@@ -377,6 +384,8 @@ export default Vue.extend({
|
|
|
377
384
|
Button,
|
|
378
385
|
Input,
|
|
379
386
|
Checkbox,
|
|
387
|
+
Radio,
|
|
388
|
+
RadioGroup,
|
|
380
389
|
Row,
|
|
381
390
|
Col,
|
|
382
391
|
Icon,
|
|
@@ -400,7 +409,8 @@ export default Vue.extend({
|
|
|
400
409
|
enabledExclusiveChoice: false,
|
|
401
410
|
enabledInputChoice: false,
|
|
402
411
|
enabledRichText: false,
|
|
403
|
-
enabledSpeciallyQuestions: true
|
|
412
|
+
enabledSpeciallyQuestions: true,
|
|
413
|
+
enabledEvaluationTag: false,
|
|
404
414
|
};
|
|
405
415
|
},
|
|
406
416
|
created() {
|
|
@@ -430,6 +440,11 @@ export default Vue.extend({
|
|
|
430
440
|
"options.enabledSpeciallyQuestions",
|
|
431
441
|
true
|
|
432
442
|
);
|
|
443
|
+
// @ts-ignore
|
|
444
|
+
this.enabledEvaluationTag = _.get(this.$rootComponent, "options.enabledEvaluationTag", false);
|
|
445
|
+
if (this.enabledEvaluationTag && !this.editQuestion.options.evaluationTag) {
|
|
446
|
+
this.$set(this.editQuestion.options, "evaluationTag", "COURSE");
|
|
447
|
+
}
|
|
433
448
|
},
|
|
434
449
|
computed: {
|
|
435
450
|
gridTemplateColumns() {
|
|
@@ -603,6 +618,21 @@ export default Vue.extend({
|
|
|
603
618
|
width: 100%;
|
|
604
619
|
}
|
|
605
620
|
|
|
621
|
+
.evaluation-tag-row {
|
|
622
|
+
display: flex;
|
|
623
|
+
align-items: center;
|
|
624
|
+
padding: 8px 8px 12px;
|
|
625
|
+
border-bottom: 1px solid #e8eaec;
|
|
626
|
+
margin-bottom: 16px;
|
|
627
|
+
|
|
628
|
+
.evaluation-tag-label {
|
|
629
|
+
margin-right: 8px;
|
|
630
|
+
font-size: 14px;
|
|
631
|
+
color: #262833;
|
|
632
|
+
white-space: nowrap;
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
|
|
606
636
|
.option-header {
|
|
607
637
|
background: #f0f1f3;
|
|
608
638
|
border-radius: 4px;
|
|
@@ -86,6 +86,13 @@
|
|
|
86
86
|
</Col>
|
|
87
87
|
</Row>
|
|
88
88
|
<Divider style="margin-top: -9px"/>
|
|
89
|
+
<div v-if="enabledEvaluationTag" class="evaluation-tag-row">
|
|
90
|
+
<span class="evaluation-tag-label">{{ t("survey_creator.question.evaluation_tag.label") }}:</span>
|
|
91
|
+
<RadioGroup v-model="editQuestion.options.evaluationTag">
|
|
92
|
+
<Radio label="TEACHER">{{ t("survey_creator.question.evaluation_tag.TEACHER") }}</Radio>
|
|
93
|
+
<Radio label="COURSE">{{ t("survey_creator.question.evaluation_tag.COURSE") }}</Radio>
|
|
94
|
+
</RadioGroup>
|
|
95
|
+
</div>
|
|
89
96
|
|
|
90
97
|
<!-- question & sub question -->
|
|
91
98
|
<Row>
|
|
@@ -237,7 +244,7 @@
|
|
|
237
244
|
<script lang="ts">
|
|
238
245
|
import Vue from "vue";
|
|
239
246
|
import _ from "lodash";
|
|
240
|
-
import {Button, ButtonGroup, Checkbox, Col, Divider, Form, FormItem, Icon, Input, Option, Row, Select, Slider, Tooltip,} from "view-design";
|
|
247
|
+
import {Button, ButtonGroup, Checkbox, Col, Divider, Form, FormItem, Icon, Input, Option, Radio, RadioGroup, Row, Select, Slider, Tooltip,} from "view-design";
|
|
241
248
|
import {SubQuestionModel} from "@wg-npm/survey-core";
|
|
242
249
|
import questionFormMixin from "../../../mixins/question-form-mixin";
|
|
243
250
|
|
|
@@ -248,6 +255,8 @@ export default Vue.extend({
|
|
|
248
255
|
FormItem,
|
|
249
256
|
Input,
|
|
250
257
|
Checkbox,
|
|
258
|
+
Radio,
|
|
259
|
+
RadioGroup,
|
|
251
260
|
Row,
|
|
252
261
|
Col,
|
|
253
262
|
Select,
|
|
@@ -271,10 +280,16 @@ export default Vue.extend({
|
|
|
271
280
|
],
|
|
272
281
|
scoreRange: [],
|
|
273
282
|
decimalPlaceOptions: [0, 1],
|
|
283
|
+
enabledEvaluationTag: false,
|
|
274
284
|
};
|
|
275
285
|
},
|
|
276
286
|
created() {
|
|
277
287
|
this.initData();
|
|
288
|
+
// @ts-ignore
|
|
289
|
+
this.enabledEvaluationTag = _.get(this.$rootComponent, "options.enabledEvaluationTag", false);
|
|
290
|
+
if (this.enabledEvaluationTag && !this.editQuestion.options.evaluationTags) {
|
|
291
|
+
this.$set(this.editQuestion.options, "evaluationTags", ["COURSE"]);
|
|
292
|
+
}
|
|
278
293
|
},
|
|
279
294
|
computed: {
|
|
280
295
|
disableLabelSelector() {
|
|
@@ -400,6 +415,21 @@ export default Vue.extend({
|
|
|
400
415
|
width: 100%;
|
|
401
416
|
}
|
|
402
417
|
|
|
418
|
+
.evaluation-tag-row {
|
|
419
|
+
display: flex;
|
|
420
|
+
align-items: center;
|
|
421
|
+
padding: 8px 8px 12px;
|
|
422
|
+
border-bottom: 1px solid #e8eaec;
|
|
423
|
+
margin-bottom: 16px;
|
|
424
|
+
|
|
425
|
+
.evaluation-tag-label {
|
|
426
|
+
margin-right: 8px;
|
|
427
|
+
font-size: 14px;
|
|
428
|
+
color: #262833;
|
|
429
|
+
white-space: nowrap;
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
|
|
403
433
|
.btn-container {
|
|
404
434
|
padding-left: 8px;
|
|
405
435
|
|
|
@@ -16,6 +16,13 @@
|
|
|
16
16
|
t("survey_creator.question.questionRequired")
|
|
17
17
|
}}
|
|
18
18
|
</Checkbox>
|
|
19
|
+
<div v-if="enabledEvaluationTag" class="evaluation-tag-row">
|
|
20
|
+
<span class="evaluation-tag-label">{{ t("survey_creator.question.evaluation_tag.label") }}:</span>
|
|
21
|
+
<RadioGroup v-model="editQuestion.options.evaluationTag">
|
|
22
|
+
<Radio label="TEACHER">{{ t("survey_creator.question.evaluation_tag.TEACHER") }}</Radio>
|
|
23
|
+
<Radio label="COURSE">{{ t("survey_creator.question.evaluation_tag.COURSE") }}</Radio>
|
|
24
|
+
</RadioGroup>
|
|
25
|
+
</div>
|
|
19
26
|
<Input
|
|
20
27
|
v-model.trim="editQuestion.header.text[primaryLanguage]"
|
|
21
28
|
:placeholder="t('survey_creator.question.titleRequiredTip')"
|
|
@@ -63,7 +70,7 @@
|
|
|
63
70
|
</template>
|
|
64
71
|
<script lang="ts">
|
|
65
72
|
import Vue from "vue";
|
|
66
|
-
import {Button, ButtonGroup, Checkbox, Form, FormItem, Icon, Input,} from "view-design";
|
|
73
|
+
import {Button, ButtonGroup, Checkbox, Form, FormItem, Icon, Input, Radio, RadioGroup,} from "view-design";
|
|
67
74
|
import {QuestionType} from "@wg-npm/survey-core";
|
|
68
75
|
import _ from "lodash";
|
|
69
76
|
import questionFormMixin from "../../../mixins/question-form-mixin";
|
|
@@ -77,12 +84,15 @@ export default Vue.extend({
|
|
|
77
84
|
Button,
|
|
78
85
|
Input,
|
|
79
86
|
Checkbox,
|
|
87
|
+
Radio,
|
|
88
|
+
RadioGroup,
|
|
80
89
|
Icon,
|
|
81
90
|
},
|
|
82
91
|
mixins: [questionFormMixin],
|
|
83
92
|
data() {
|
|
84
93
|
return {
|
|
85
94
|
enabledPresetReplies: false,
|
|
95
|
+
enabledEvaluationTag: false,
|
|
86
96
|
};
|
|
87
97
|
},
|
|
88
98
|
computed: {
|
|
@@ -105,10 +115,15 @@ export default Vue.extend({
|
|
|
105
115
|
"options.enabledPresetReplies",
|
|
106
116
|
false
|
|
107
117
|
);
|
|
118
|
+
// @ts-ignore
|
|
119
|
+
this.enabledEvaluationTag = _.get(this.$rootComponent, "options.enabledEvaluationTag", false);
|
|
108
120
|
|
|
109
121
|
if (!this.editQuestion.options.presetReplies) {
|
|
110
122
|
this.$set(this.editQuestion.options, "presetReplies", []);
|
|
111
123
|
}
|
|
124
|
+
if (this.enabledEvaluationTag && !this.editQuestion.options.evaluationTag) {
|
|
125
|
+
this.$set(this.editQuestion.options, "evaluationTag", "COURSE");
|
|
126
|
+
}
|
|
112
127
|
},
|
|
113
128
|
methods: {
|
|
114
129
|
addPresetReply() {
|
|
@@ -155,6 +170,20 @@ export default Vue.extend({
|
|
|
155
170
|
width: 100%;
|
|
156
171
|
}
|
|
157
172
|
|
|
173
|
+
.evaluation-tag-row {
|
|
174
|
+
display: flex;
|
|
175
|
+
align-items: center;
|
|
176
|
+
padding: 8px 0 12px;
|
|
177
|
+
margin-bottom: 8px;
|
|
178
|
+
|
|
179
|
+
.evaluation-tag-label {
|
|
180
|
+
margin-right: 8px;
|
|
181
|
+
font-size: 14px;
|
|
182
|
+
color: #262833;
|
|
183
|
+
white-space: nowrap;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
158
187
|
.preset-replies {
|
|
159
188
|
|
|
160
189
|
.preset-reply-list {
|
|
@@ -93,6 +93,13 @@
|
|
|
93
93
|
|
|
94
94
|
</div>
|
|
95
95
|
</div>
|
|
96
|
+
<div v-if="enabledEvaluationTag" class="evaluation-tag-row">
|
|
97
|
+
<span class="evaluation-tag-label">{{ t("survey_creator.question.evaluation_tag.label") }}:</span>
|
|
98
|
+
<RadioGroup v-model="editQuestion.options.evaluationTag">
|
|
99
|
+
<Radio label="TEACHER">{{ t("survey_creator.question.evaluation_tag.TEACHER") }}</Radio>
|
|
100
|
+
<Radio label="COURSE">{{ t("survey_creator.question.evaluation_tag.COURSE") }}</Radio>
|
|
101
|
+
</RadioGroup>
|
|
102
|
+
</div>
|
|
96
103
|
<Alert v-if="enabledRichText" show-icon>{{
|
|
97
104
|
t("survey_creator.question.rich_text.alert")
|
|
98
105
|
}}
|
|
@@ -241,7 +248,7 @@
|
|
|
241
248
|
<script lang="ts">
|
|
242
249
|
import Vue from "vue";
|
|
243
250
|
import _ from "lodash";
|
|
244
|
-
import {Alert, Button, ButtonGroup, Checkbox, Col, Form, FormItem, Icon, Input, InputNumber, Modal, Row,} from "view-design";
|
|
251
|
+
import {Alert, Button, ButtonGroup, Checkbox, Col, Form, FormItem, Icon, Input, InputNumber, Modal, Radio, RadioGroup, Row,} from "view-design";
|
|
245
252
|
import {QuestionFactory, SurveyLayout} from "@wg-npm/survey-core";
|
|
246
253
|
import draggable from "vuedraggable";
|
|
247
254
|
import questionFormMixin from "../../../mixins/question-form-mixin";
|
|
@@ -256,6 +263,8 @@ export default Vue.extend({
|
|
|
256
263
|
Button,
|
|
257
264
|
Input,
|
|
258
265
|
Checkbox,
|
|
266
|
+
Radio,
|
|
267
|
+
RadioGroup,
|
|
259
268
|
Row,
|
|
260
269
|
Col,
|
|
261
270
|
Icon,
|
|
@@ -275,7 +284,8 @@ export default Vue.extend({
|
|
|
275
284
|
layoutOptions: [SurveyLayout.HORIZONTAL, SurveyLayout.VERTICAL],
|
|
276
285
|
enabledInputChoice: false,
|
|
277
286
|
enabledRichText: false,
|
|
278
|
-
enabledSpeciallyQuestions: true
|
|
287
|
+
enabledSpeciallyQuestions: true,
|
|
288
|
+
enabledEvaluationTag: false,
|
|
279
289
|
};
|
|
280
290
|
},
|
|
281
291
|
created() {
|
|
@@ -297,6 +307,11 @@ export default Vue.extend({
|
|
|
297
307
|
"options.enabledSpeciallyQuestions",
|
|
298
308
|
true
|
|
299
309
|
);
|
|
310
|
+
// @ts-ignore
|
|
311
|
+
this.enabledEvaluationTag = _.get(this.$rootComponent, "options.enabledEvaluationTag", false);
|
|
312
|
+
if (this.enabledEvaluationTag && !this.editQuestion.options.evaluationTag) {
|
|
313
|
+
this.$set(this.editQuestion.options, "evaluationTag", "COURSE");
|
|
314
|
+
}
|
|
300
315
|
|
|
301
316
|
this.editQuestion.options.richTextEnabled = this.enabledRichText;
|
|
302
317
|
},
|
|
@@ -448,6 +463,21 @@ export default Vue.extend({
|
|
|
448
463
|
}
|
|
449
464
|
}
|
|
450
465
|
|
|
466
|
+
.evaluation-tag-row {
|
|
467
|
+
display: flex;
|
|
468
|
+
align-items: center;
|
|
469
|
+
padding: 8px 8px 12px;
|
|
470
|
+
border-bottom: 1px solid #e8eaec;
|
|
471
|
+
margin-bottom: 16px;
|
|
472
|
+
|
|
473
|
+
.evaluation-tag-label {
|
|
474
|
+
margin-right: 8px;
|
|
475
|
+
font-size: 14px;
|
|
476
|
+
color: #262833;
|
|
477
|
+
white-space: nowrap;
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
|
|
451
481
|
.option-header {
|
|
452
482
|
background: #f0f1f3;
|
|
453
483
|
border-radius: 4px;
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<Form ref="questionForm" :model="editQuestion" :label-colon="false">
|
|
3
|
+
<div v-if="enabledEvaluationTag" class="evaluation-tag-row">
|
|
4
|
+
<span class="evaluation-tag-label">{{ t("survey_creator.question.evaluation_tag.label") }}:</span>
|
|
5
|
+
<RadioGroup v-model="editQuestion.options.evaluationTag">
|
|
6
|
+
<Radio label="TEACHER">{{ t("survey_creator.question.evaluation_tag.TEACHER") }}</Radio>
|
|
7
|
+
<Radio label="COURSE">{{ t("survey_creator.question.evaluation_tag.COURSE") }}</Radio>
|
|
8
|
+
</RadioGroup>
|
|
9
|
+
</div>
|
|
3
10
|
<Form-item
|
|
4
11
|
:prop="'header.text.' + primaryLanguage"
|
|
5
12
|
:rules="{
|
|
@@ -23,7 +30,8 @@
|
|
|
23
30
|
|
|
24
31
|
<script lang="ts">
|
|
25
32
|
import Vue from "vue";
|
|
26
|
-
import { Button, ButtonGroup, Form, FormItem, Input } from "view-design";
|
|
33
|
+
import { Button, ButtonGroup, Checkbox, Form, FormItem, Input, Radio, RadioGroup } from "view-design";
|
|
34
|
+
import _ from "lodash";
|
|
27
35
|
import questionFormMixin from "../../../mixins/question-form-mixin";
|
|
28
36
|
|
|
29
37
|
export default Vue.extend({
|
|
@@ -34,7 +42,39 @@ export default Vue.extend({
|
|
|
34
42
|
ButtonGroup,
|
|
35
43
|
Button,
|
|
36
44
|
Input,
|
|
45
|
+
Checkbox,
|
|
46
|
+
Radio,
|
|
47
|
+
RadioGroup,
|
|
37
48
|
},
|
|
38
49
|
mixins: [questionFormMixin],
|
|
50
|
+
data() {
|
|
51
|
+
return {
|
|
52
|
+
enabledEvaluationTag: false,
|
|
53
|
+
};
|
|
54
|
+
},
|
|
55
|
+
created() {
|
|
56
|
+
// @ts-ignore
|
|
57
|
+
this.enabledEvaluationTag = _.get(this.$rootComponent, "options.enabledEvaluationTag", false);
|
|
58
|
+
if (this.enabledEvaluationTag && !this.editQuestion.options.evaluationTag) {
|
|
59
|
+
this.$set(this.editQuestion.options, "evaluationTag", "COURSE");
|
|
60
|
+
}
|
|
61
|
+
},
|
|
39
62
|
});
|
|
40
63
|
</script>
|
|
64
|
+
|
|
65
|
+
<style scoped lang="less">
|
|
66
|
+
.evaluation-tag-row {
|
|
67
|
+
display: flex;
|
|
68
|
+
align-items: center;
|
|
69
|
+
padding: 8px 8px 12px;
|
|
70
|
+
border-bottom: 1px solid #e8eaec;
|
|
71
|
+
margin-bottom: 16px;
|
|
72
|
+
|
|
73
|
+
.evaluation-tag-label {
|
|
74
|
+
margin-right: 8px;
|
|
75
|
+
font-size: 14px;
|
|
76
|
+
color: #262833;
|
|
77
|
+
white-space: nowrap;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
</style>
|
package/src/locale/lang/en-US.ts
CHANGED
|
@@ -134,6 +134,11 @@ export default {
|
|
|
134
134
|
starMinCountSuffix: "Items or More Get Star",
|
|
135
135
|
maxScore: "Max score",
|
|
136
136
|
enableMultiSelect: "Enable Multi Selection",
|
|
137
|
+
evaluation_tag: {
|
|
138
|
+
label: "Evaluation Tag",
|
|
139
|
+
TEACHER: "Evaluate Teacher",
|
|
140
|
+
COURSE: "Evaluate Course",
|
|
141
|
+
},
|
|
137
142
|
evaluation: {
|
|
138
143
|
level: {
|
|
139
144
|
"1": "Excellent",
|
package/src/locale/lang/zh-CN.ts
CHANGED