@wg-npm/survey-creator 0.3.4166 → 0.3.4371
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.
|
@@ -1999,7 +1999,7 @@ var __vue_staticRenderFns__$r = [];
|
|
|
1999
1999
|
var script$q = Vue.extend({
|
|
2000
2000
|
name: "Evaluation",
|
|
2001
2001
|
components: {
|
|
2002
|
-
Row, Col, Checkbox, CheckboxGroup, Card, Icon,
|
|
2002
|
+
Row, Col, Checkbox, CheckboxGroup, Card, Icon, Tooltip,
|
|
2003
2003
|
STAR: Star$1,
|
|
2004
2004
|
EXPR: Expr$1,
|
|
2005
2005
|
},
|
|
@@ -2016,7 +2016,7 @@ var script$q = Vue.extend({
|
|
|
2016
2016
|
const __vue_script__$q = script$q;
|
|
2017
2017
|
|
|
2018
2018
|
/* template */
|
|
2019
|
-
var __vue_render__$q = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[(_vm.question.evaluationItems.length > 0)?_c('Row',{attrs:{"type":"flex","justify":"start","gutter":24}},_vm._l((_vm.question.evaluationItems),function(item){return _c('Col',{key:item.id,staticClass:"col-padding"},[_c('Card',{staticClass:"evaluation-cards-default",attrs:{"dis-hover":""}},[_c('div',{staticClass:"card-title",attrs:{"slot":"title"},slot:"title"},[_c('Icon',{staticClass:"icon",attrs:{"type":"ios-checkmark-circle-outline","size":36}})],1),_vm._v(" "),_c('div',{staticClass:"card-content"},[_c('p',{staticClass:"text"},[_vm._v(_vm._s(_vm._f("translate")(item.text,true)))]),_vm._v(" "),_c(_vm.question.options.evaluationType,{tag:"component",attrs:{"item":item}})],1)])],1)}),1):_vm._e()],1)};
|
|
2019
|
+
var __vue_render__$q = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[(_vm.question.evaluationItems.length > 0)?_c('Row',{attrs:{"type":"flex","justify":"start","gutter":24}},_vm._l((_vm.question.evaluationItems),function(item){return _c('Col',{key:item.id,staticClass:"col-padding"},[_c('Card',{staticClass:"evaluation-cards-default",attrs:{"dis-hover":""}},[_c('div',{staticClass:"card-title",attrs:{"slot":"title"},slot:"title"},[_c('Icon',{staticClass:"icon",attrs:{"type":"ios-checkmark-circle-outline","size":36}})],1),_vm._v(" "),_c('div',{staticClass:"card-content"},[_c('Tooltip',{attrs:{"max-width":"200"}},[_c('p',{attrs:{"slot":"content"},slot:"content"},[_vm._v(_vm._s(_vm._f("translate")(item.text,true)))]),_vm._v(" "),_c('p',{staticClass:"text"},[_vm._v(_vm._s(_vm._f("translate")(item.text,true)))])]),_vm._v(" "),_c(_vm.question.options.evaluationType,{tag:"component",attrs:{"item":item}})],1)])],1)}),1):_vm._e()],1)};
|
|
2020
2020
|
var __vue_staticRenderFns__$q = [];
|
|
2021
2021
|
|
|
2022
2022
|
/* style */
|
|
@@ -4413,12 +4413,17 @@ var script$1 = Vue.extend({
|
|
|
4413
4413
|
this.$emit("on-save", JSON.stringify(this.getPureSurvey(this.currentSurvey)));
|
|
4414
4414
|
return;
|
|
4415
4415
|
}
|
|
4416
|
-
|
|
4417
|
-
|
|
4418
|
-
|
|
4419
|
-
|
|
4420
|
-
|
|
4421
|
-
|
|
4416
|
+
if (this.showQuestionWhenPageLoad) {
|
|
4417
|
+
this.$emit("on-save", JSON.stringify(this.getPureSurvey(this.currentSurvey)));
|
|
4418
|
+
}
|
|
4419
|
+
else {
|
|
4420
|
+
Modal.confirm({
|
|
4421
|
+
title: this.t("survey_creator.message.surveyLocaleNoSettingCompleted"),
|
|
4422
|
+
onOk: () => {
|
|
4423
|
+
this.$emit("on-save", JSON.stringify(this.getPureSurvey(this.currentSurvey)));
|
|
4424
|
+
}
|
|
4425
|
+
});
|
|
4426
|
+
}
|
|
4422
4427
|
},
|
|
4423
4428
|
getPureSurvey(survey) {
|
|
4424
4429
|
let temp = _.cloneDeep(survey);
|
|
@@ -4512,7 +4517,7 @@ var script$1 = Vue.extend({
|
|
|
4512
4517
|
const __vue_script__$1 = script$1;
|
|
4513
4518
|
|
|
4514
4519
|
/* template */
|
|
4515
|
-
var __vue_render__$1 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[(_vm.showQuestionWhenPageLoad)?_c('div',[_c('question-edit-drawer',{ref:"editDrawer",attrs:{"question":_vm.editingQuestion,"operation-type":_vm.operationType},on:{"cancel":_vm.cancel},model:{value:(_vm.questionEditDrawerVisible),callback:function ($$v) {_vm.questionEditDrawerVisible=$$v;},expression:"questionEditDrawerVisible"}})],1):_c('div',{staticClass:"survey-creator-wrapper"},[_c('Card',{attrs:{"shadow":""}},[_c('Row',{attrs:{"align":"middle","justify":"space-between","type":"flex"}},[_c('Col',{attrs:{"span":"20"}},[_c('Icon',{staticClass:"icon-clipboard",attrs:{"custom":"i-icon icon-clipboard","size":"24"}}),_vm._v(" "),_c('span',{staticClass:"title"},[_vm._v("\n "+_vm._s(_vm._f("translate")(_vm.survey.name.text,true))+"\n ")])],1),_vm._v(" "),_c('Col',[_c('Button',{attrs:{"icon":"ios-arrow-back"},on:{"click":_vm.onBack}},[_vm._v(_vm._s(_vm.t('survey_creator.common.back')))])],1)],1)],1),_vm._v(" "),(_vm.isPreviewMode)?_c('survey-internal-previewer',{staticStyle:{"min-height":"calc(100vh - 128px)"},attrs:{"options":this.options,"survey":this.currentSurvey,"operation-type":_vm.operationType}}):_c('Card',{staticStyle:{"min-height":"calc(100vh - 128px)"},attrs:{"shadow":""}},[_c('Tabs',{attrs:{"type":"card"},model:{value:(_vm.activeTab),callback:function ($$v) {_vm.activeTab=$$v;},expression:"activeTab"}},[_c('TabPane',{attrs:{"label":_vm.t('survey_creator.common.tab.question_setting'),"name":"EDIT"}},[(_vm.activeTab
|
|
4520
|
+
var __vue_render__$1 = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[(_vm.showQuestionWhenPageLoad)?_c('div',[_c('question-edit-drawer',{ref:"editDrawer",attrs:{"question":_vm.editingQuestion,"operation-type":_vm.operationType},on:{"cancel":_vm.cancel},model:{value:(_vm.questionEditDrawerVisible),callback:function ($$v) {_vm.questionEditDrawerVisible=$$v;},expression:"questionEditDrawerVisible"}})],1):_c('div',{staticClass:"survey-creator-wrapper"},[_c('Card',{attrs:{"shadow":""}},[_c('Row',{attrs:{"align":"middle","justify":"space-between","type":"flex"}},[_c('Col',{attrs:{"span":"20"}},[_c('Icon',{staticClass:"icon-clipboard",attrs:{"custom":"i-icon icon-clipboard","size":"24"}}),_vm._v(" "),_c('span',{staticClass:"title"},[_vm._v("\n "+_vm._s(_vm._f("translate")(_vm.survey.name.text,true))+"\n ")])],1),_vm._v(" "),_c('Col',[_c('Button',{attrs:{"icon":"ios-arrow-back"},on:{"click":_vm.onBack}},[_vm._v(_vm._s(_vm.t('survey_creator.common.back')))])],1)],1)],1),_vm._v(" "),(_vm.isPreviewMode)?_c('survey-internal-previewer',{staticStyle:{"min-height":"calc(100vh - 128px)"},attrs:{"options":this.options,"survey":this.currentSurvey,"operation-type":_vm.operationType}}):_c('Card',{staticStyle:{"min-height":"calc(100vh - 128px)"},attrs:{"shadow":""}},[_c('Tabs',{attrs:{"type":"card"},model:{value:(_vm.activeTab),callback:function ($$v) {_vm.activeTab=$$v;},expression:"activeTab"}},[_c('TabPane',{attrs:{"label":_vm.t('survey_creator.common.tab.question_setting'),"name":"EDIT"}},[(_vm.activeTab === 'EDIT')?_c('div',[_c('Row',{staticClass:"survey-operate",attrs:{"type":"flex","justify":"space-between","align":"middle","gutter":48}},[_c('Col',[_c('create-question-dropdown')],1),_vm._v(" "),_c('Col',[_c('edit-options',{staticClass:"edit-option",attrs:{"survey":this.currentSurvey}})],1)],1),_vm._v(" "),_c('Scroll',{staticClass:"question-content",attrs:{"height":_vm.height}},[_c('survey-editor',{attrs:{"options":this.options,"survey":this.currentSurvey}})],1)],1):_vm._e()]),_vm._v(" "),_c('TabPane',{attrs:{"label":_vm.t('survey_creator.common.tab.language'),"name":"TRANSLATE"}},[(_vm.activeTab === 'TRANSLATE')?_c('survey-translator',{attrs:{"options":this.options,"survey":this.currentSurvey}}):_vm._e()],1)],1)],1),_vm._v(" "),_c('question-edit-drawer',{ref:"editDrawer",attrs:{"question":_vm.editingQuestion,"operation-type":_vm.operationType},model:{value:(_vm.questionEditDrawerVisible),callback:function ($$v) {_vm.questionEditDrawerVisible=$$v;},expression:"questionEditDrawerVisible"}}),_vm._v(" "),_c('Card',{attrs:{"shadow":""}},[_c('Row',{attrs:{"gutter":30,"align":"middle","justify":"center","type":"flex"}},[_c('Col',[_c('Button',{attrs:{"loading":_vm.loading,"type":"primary","disabled":_vm.isSaved},on:{"click":_vm.onSave}},[_vm._v(_vm._s(_vm.t("survey_creator.common.save"))+"\n ")])],1)],1)],1)],1)])};
|
|
4516
4521
|
var __vue_staticRenderFns__$1 = [];
|
|
4517
4522
|
|
|
4518
4523
|
/* style */
|
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.4371",
|
|
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.4371",
|
|
16
|
+
"@wg-npm/survey-service-api": "0.3.4371",
|
|
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.4371",
|
|
42
|
+
"@wg-npm/survey-service-api": "0.3.4371",
|
|
43
43
|
"acorn": "^7.3.1",
|
|
44
44
|
"axios": "^0.19.2",
|
|
45
45
|
"babelrc-rollup": "^3.0.0",
|
|
@@ -7,7 +7,10 @@
|
|
|
7
7
|
<Icon class="icon" type="ios-checkmark-circle-outline" :size="36"/>
|
|
8
8
|
</div>
|
|
9
9
|
<div class="card-content">
|
|
10
|
-
<
|
|
10
|
+
<Tooltip max-width="200">
|
|
11
|
+
<p slot="content">{{ item.text | translate(true) }}</p>
|
|
12
|
+
<p class="text">{{ item.text | translate(true) }}</p>
|
|
13
|
+
</Tooltip>
|
|
11
14
|
<component :is="question.options.evaluationType" :item="item"></component>
|
|
12
15
|
</div>
|
|
13
16
|
</Card>
|
|
@@ -18,7 +21,7 @@
|
|
|
18
21
|
|
|
19
22
|
<script lang="ts">
|
|
20
23
|
import Vue from "vue";
|
|
21
|
-
import {Checkbox, Col, Row, CheckboxGroup, Card, Icon} from "view-design";
|
|
24
|
+
import {Checkbox, Col, Row, CheckboxGroup, Card, Icon, Tooltip} from "view-design";
|
|
22
25
|
import LocaleMixin from "../../../mixins/locale-mixin";
|
|
23
26
|
import {QuestionEvaluationModel, QuestionType} from "@wg-npm/survey-core";
|
|
24
27
|
import Star from "./evaluation/star.vue";
|
|
@@ -28,7 +31,7 @@
|
|
|
28
31
|
export default Vue.extend({
|
|
29
32
|
name: "Evaluation",
|
|
30
33
|
components: {
|
|
31
|
-
Row, Col, Checkbox, CheckboxGroup, Card, Icon,
|
|
34
|
+
Row, Col, Checkbox, CheckboxGroup, Card, Icon, Tooltip,
|
|
32
35
|
STAR: Star,
|
|
33
36
|
EXPR: Expr,
|
|
34
37
|
},
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
<Card shadow v-else style="min-height: calc(100vh - 128px);">
|
|
36
36
|
<Tabs type="card" v-model="activeTab">
|
|
37
37
|
<TabPane :label="t('survey_creator.common.tab.question_setting')" name="EDIT">
|
|
38
|
-
<div v-if="activeTab
|
|
38
|
+
<div v-if="activeTab === 'EDIT'">
|
|
39
39
|
<Row type="flex" justify="space-between" class="survey-operate" align="middle" :gutter="48">
|
|
40
40
|
<Col>
|
|
41
41
|
<create-question-dropdown/>
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
</TabPane>
|
|
52
52
|
<TabPane :label="t('survey_creator.common.tab.language')" name="TRANSLATE">
|
|
53
53
|
<survey-translator
|
|
54
|
-
v-if="activeTab
|
|
54
|
+
v-if="activeTab === 'TRANSLATE'"
|
|
55
55
|
:options="this.options"
|
|
56
56
|
:survey="this.currentSurvey"
|
|
57
57
|
/>
|
|
@@ -241,16 +241,24 @@
|
|
|
241
241
|
);
|
|
242
242
|
return;
|
|
243
243
|
}
|
|
244
|
-
|
|
245
|
-
|
|
244
|
+
|
|
245
|
+
if (this.showQuestionWhenPageLoad) {
|
|
246
|
+
this.$emit(
|
|
247
|
+
"on-save",
|
|
248
|
+
JSON.stringify(this.getPureSurvey(this.currentSurvey))
|
|
249
|
+
);
|
|
250
|
+
} else {
|
|
251
|
+
// @ts-ignore
|
|
252
|
+
Modal.confirm({
|
|
246
253
|
title: this.t("survey_creator.message.surveyLocaleNoSettingCompleted"),
|
|
247
254
|
onOk: () => {
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
255
|
+
this.$emit(
|
|
256
|
+
"on-save",
|
|
257
|
+
JSON.stringify(this.getPureSurvey(this.currentSurvey))
|
|
258
|
+
);
|
|
252
259
|
}
|
|
253
|
-
|
|
260
|
+
});
|
|
261
|
+
}
|
|
254
262
|
},
|
|
255
263
|
getPureSurvey(survey) {
|
|
256
264
|
let temp = _.cloneDeep(survey);
|
|
@@ -189,11 +189,20 @@
|
|
|
189
189
|
|
|
190
190
|
.card-content {
|
|
191
191
|
text-align: center;
|
|
192
|
+
.ivu-tooltip {
|
|
193
|
+
display: unset;
|
|
194
|
+
}
|
|
195
|
+
.ivu-tooltip-rel{
|
|
196
|
+
display: unset;
|
|
197
|
+
}
|
|
192
198
|
|
|
193
199
|
.text {
|
|
194
200
|
font-weight: 500;
|
|
195
201
|
font-size: 18px;
|
|
196
202
|
padding: 10px;
|
|
203
|
+
white-space: nowrap;/*把文本强制显示在一行*/
|
|
204
|
+
overflow: hidden;/*隐藏超出部分的文字*/
|
|
205
|
+
text-overflow: ellipsis;/*超出显示省略号*/
|
|
197
206
|
}
|
|
198
207
|
}
|
|
199
208
|
}
|
|
@@ -132,10 +132,20 @@
|
|
|
132
132
|
.card-content {
|
|
133
133
|
text-align: center;
|
|
134
134
|
|
|
135
|
+
.ivu-tooltip {
|
|
136
|
+
display: unset;
|
|
137
|
+
}
|
|
138
|
+
.ivu-tooltip-rel{
|
|
139
|
+
display: unset;
|
|
140
|
+
}
|
|
141
|
+
|
|
135
142
|
.text {
|
|
136
143
|
font-weight: 500;
|
|
137
144
|
font-size: 18px;
|
|
138
145
|
padding: 10px;
|
|
146
|
+
white-space: nowrap;/*把文本强制显示在一行*/
|
|
147
|
+
overflow: hidden;/*隐藏超出部分的文字*/
|
|
148
|
+
text-overflow: ellipsis;/*超出显示省略号*/
|
|
139
149
|
}
|
|
140
150
|
}
|
|
141
151
|
}
|