|
@@ -13,7 +13,7 @@
|
|
<!-- 问卷活动列表 -->
|
|
<!-- 问卷活动列表 -->
|
|
<div class="qn-col qn-list-box">
|
|
<div class="qn-col qn-list-box">
|
|
<div class="qn-box-header">
|
|
<div class="qn-box-header">
|
|
- <span>问卷列表</span>
|
|
|
|
|
|
+ <span>{{ $t('survey.list') }}</span>
|
|
<div>
|
|
<div>
|
|
<Icon type="md-trash" class="to-create-icon" @click="onDeleteQn" style="margin-left: 10px" v-if="qnList.length && ($access.can('admin.*|schoolAc-upd') || isPrivate)" />
|
|
<Icon type="md-trash" class="to-create-icon" @click="onDeleteQn" style="margin-left: 10px" v-if="qnList.length && ($access.can('admin.*|schoolAc-upd') || isPrivate)" />
|
|
<Icon type="md-add" class="to-create-icon" @click="goToCreate" v-if="($access.can('admin.*|schoolAc-upd') || isPrivate)" />
|
|
<Icon type="md-add" class="to-create-icon" @click="goToCreate" v-if="($access.can('admin.*|schoolAc-upd') || isPrivate)" />
|
|
@@ -33,7 +33,7 @@
|
|
<span class="qn-item-nums">
|
|
<span class="qn-item-nums">
|
|
<Icon type="md-time" size="14" style="margin-right: 5px" />{{ $tools.formatTime(item.startTime) }}</span>
|
|
<Icon type="md-time" size="14" style="margin-right: 5px" />{{ $tools.formatTime(item.startTime) }}</span>
|
|
<span class="qn-item-status" :style="{ background: item.progress === 'pending' ? '#0BADD4' : item.progress === 'going' ? '#12a568' : '#949594', }">
|
|
<span class="qn-item-status" :style="{ background: item.progress === 'pending' ? '#0BADD4' : item.progress === 'going' ? '#12a568' : '#949594', }">
|
|
- {{ item.progress === "pending" ? "待发布" : item.progress === "going" ? "进行中" : "已结束" }}
|
|
|
|
|
|
+ {{ item.progress === "pending" ? $t('survey.pending') : item.progress === "going" ? $t('survey.going') : $t('survey.finish') }}
|
|
</span>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -48,12 +48,12 @@
|
|
<!-- 问卷基础信息展示 -->
|
|
<!-- 问卷基础信息展示 -->
|
|
<div class="qn-col qn-info-box">
|
|
<div class="qn-col qn-info-box">
|
|
<div class="qn-box-header">
|
|
<div class="qn-box-header">
|
|
- <span>问卷详情</span>
|
|
|
|
|
|
+ <span>{{ $t('survey.surveyDetails') }}</span>
|
|
<div class="qn-box-header-tools">
|
|
<div class="qn-box-header-tools">
|
|
<!-- <span class="qn-box-header-tools-tool" v-show="currentQn.status !== 300 && qnList.length">
|
|
<!-- <span class="qn-box-header-tools-tool" v-show="currentQn.status !== 300 && qnList.length">
|
|
<Icon type="md-create" size="18" title="编辑" @click="onEditQn" /></span> -->
|
|
<Icon type="md-create" size="18" title="编辑" @click="onEditQn" /></span> -->
|
|
<span class="qn-box-header-tools-tool" v-show="currentQn.progress === 'going' && qnList.length">
|
|
<span class="qn-box-header-tools-tool" v-show="currentQn.progress === 'going' && qnList.length">
|
|
- <Icon type="md-undo" size="18" title="取消发布" @click="onCancelQn" style="margin-left: 8px" v-if="($access.can('admin.*|schoolAc-upd') || isPrivate)" /></span>
|
|
|
|
|
|
+ <Icon type="md-undo" size="18" :title="$t('survey.undo')" @click="onCancelQn" style="margin-left: 8px" v-if="($access.can('admin.*|schoolAc-upd') || isPrivate)" /></span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<vuescroll ref="qnDetailsScroll">
|
|
<vuescroll ref="qnDetailsScroll">
|
|
@@ -70,19 +70,19 @@
|
|
<!-- 问卷提交数据 -->
|
|
<!-- 问卷提交数据 -->
|
|
<div class="qn-col qn-data-box">
|
|
<div class="qn-col qn-data-box">
|
|
<div class="qn-box-header">
|
|
<div class="qn-box-header">
|
|
- <span>问卷数据</span>
|
|
|
|
|
|
+ <span>{{ $t('survey.surveyResult') }}</span>
|
|
<div class="qn-box-header-tools" v-show="!isEmptyData">
|
|
<div class="qn-box-header-tools" v-show="!isEmptyData">
|
|
<div class="qn-box-header-tools-tool" style="margin-right: 25px" v-show="currentQn.progress !== 'finish' && editable">
|
|
<div class="qn-box-header-tools-tool" style="margin-right: 25px" v-show="currentQn.progress !== 'finish' && editable">
|
|
<Icon type="md-list-box" color="#dcdcdc" />
|
|
<Icon type="md-list-box" color="#dcdcdc" />
|
|
<Dropdown @on-click="onAddItem">
|
|
<Dropdown @on-click="onAddItem">
|
|
<Button>
|
|
<Button>
|
|
- 新增题目
|
|
|
|
|
|
+ {{ $t('survey.addItem') }}
|
|
<Icon type="ios-arrow-down"></Icon>
|
|
<Icon type="ios-arrow-down"></Icon>
|
|
</Button>
|
|
</Button>
|
|
<DropdownMenu slot="list">
|
|
<DropdownMenu slot="list">
|
|
- <DropdownItem name="single">单选题</DropdownItem>
|
|
|
|
- <DropdownItem name="multiple">多选题</DropdownItem>
|
|
|
|
- <DropdownItem name="judge">判断题</DropdownItem>
|
|
|
|
|
|
+ <DropdownItem name="single">{{ $t('survey.single') }}</DropdownItem>
|
|
|
|
+ <DropdownItem name="multiple">{{ $t('survey.multiple') }}</DropdownItem>
|
|
|
|
+ <DropdownItem name="judge">{{ $t('survey.judge') }}</DropdownItem>
|
|
</DropdownMenu>
|
|
</DropdownMenu>
|
|
</Dropdown>
|
|
</Dropdown>
|
|
</div>
|
|
</div>
|
|
@@ -92,16 +92,16 @@
|
|
</div> -->
|
|
</div> -->
|
|
<div class="qn-box-header-tools-tool" @click="onEditQn" v-show="currentQn.progress === 'pending' && qnList.length && !editable && ($access.can('admin.*|schoolAc-upd') || isPrivate)">
|
|
<div class="qn-box-header-tools-tool" @click="onEditQn" v-show="currentQn.progress === 'pending' && qnList.length && !editable && ($access.can('admin.*|schoolAc-upd') || isPrivate)">
|
|
<Icon type="md-create" color="#209460" />
|
|
<Icon type="md-create" color="#209460" />
|
|
- <span>编辑问卷</span>
|
|
|
|
|
|
+ <span>{{ $t('survey.edit') }}</span>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="qn-box-header-tools-tool" v-show="editable" style="margin-right: 20px">
|
|
<div class="qn-box-header-tools-tool" v-show="editable" style="margin-right: 20px">
|
|
- <Button class="btn-save" icon="md-folder" :loading="isBtnLoading" @click="onSaveQn">保存问卷</Button>
|
|
|
|
|
|
+ <Button class="btn-save" icon="md-folder" :loading="isBtnLoading" @click="onSaveQn">{{ $t('survey.save') }}</Button>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="qn-box-header-tools-tool" @click="onCancelEditQn" v-show="editable">
|
|
<div class="qn-box-header-tools-tool" @click="onCancelEditQn" v-show="editable">
|
|
<Icon type="md-create" color="#209460" />
|
|
<Icon type="md-create" color="#209460" />
|
|
- <span>取消编辑</span>
|
|
|
|
|
|
+ <span>{{ $t('survey.cancelEdit') }}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -160,10 +160,10 @@
|
|
goToCreate() {
|
|
goToCreate() {
|
|
let hasNoSaveQn = this.qnList.filter(i => !i.id).length
|
|
let hasNoSaveQn = this.qnList.filter(i => !i.id).length
|
|
if (hasNoSaveQn) {
|
|
if (hasNoSaveQn) {
|
|
- this.$Message.warning("已存在未保存的问卷!");
|
|
|
|
|
|
+ this.$Message.warning(this.$t('survey.isExistTip'));
|
|
} else {
|
|
} else {
|
|
let defaultQn = {
|
|
let defaultQn = {
|
|
- name: "预设问卷名称",
|
|
|
|
|
|
+ name: this.$t('survey.defaultName'),
|
|
targetClassIds: [],
|
|
targetClassIds: [],
|
|
endTime: "",
|
|
endTime: "",
|
|
startTime: "",
|
|
startTime: "",
|
|
@@ -186,10 +186,8 @@
|
|
/** 删除当前问卷 */
|
|
/** 删除当前问卷 */
|
|
onDeleteQn() {
|
|
onDeleteQn() {
|
|
this.$Modal.confirm({
|
|
this.$Modal.confirm({
|
|
- title: "删除问卷",
|
|
|
|
- content: "<p>确认删除该问卷?</p>",
|
|
|
|
- okText: "确认",
|
|
|
|
- cancelText: "取消",
|
|
|
|
|
|
+ title: this.$t('survey.deletesurvey'),
|
|
|
|
+ content: this.$t('survey.deleteConfirmTip'),
|
|
onOk: () => {
|
|
onOk: () => {
|
|
this.isLoading = true;
|
|
this.isLoading = true;
|
|
|
|
|
|
@@ -203,19 +201,19 @@
|
|
.then((res) => {
|
|
.then((res) => {
|
|
if (!res.error) {
|
|
if (!res.error) {
|
|
this.isLoading = false;
|
|
this.isLoading = false;
|
|
- this.$Message.success("操作成功");
|
|
|
|
|
|
+ this.$Message.success(this.$t('survey.deleteSuc'));
|
|
this.handleTabClick(
|
|
this.handleTabClick(
|
|
this.$route.name === "manageQuestionnaire" ? 0 : 1
|
|
this.$route.name === "manageQuestionnaire" ? 0 : 1
|
|
);
|
|
);
|
|
} else {
|
|
} else {
|
|
this.isLoading = false;
|
|
this.isLoading = false;
|
|
- this.$Message.success("操作失败");
|
|
|
|
|
|
+ this.$Message.error(this.$t('survey.deleteFail'));
|
|
}
|
|
}
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
this.qnList.splice(this.qnList.indexOf(this.currentQn), 1);
|
|
this.qnList.splice(this.qnList.indexOf(this.currentQn), 1);
|
|
this.isLoading = false;
|
|
this.isLoading = false;
|
|
- this.$Message.success("操作成功");
|
|
|
|
|
|
+ this.$Message.success(this.$t('survey.deleteSuc'));
|
|
if (this.qnList.length) this.onQnClick(this.qnList[0], 0);
|
|
if (this.qnList.length) this.onQnClick(this.qnList[0], 0);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -241,7 +239,7 @@
|
|
}
|
|
}
|
|
this.isLoadList = false;
|
|
this.isLoadList = false;
|
|
} else {
|
|
} else {
|
|
- this.$Message.error("获取数据失败");
|
|
|
|
|
|
+ this.$Message.error(this.$t('survey.getDataFailTip'));
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
@@ -259,7 +257,7 @@
|
|
if (!res.error && res.surveys) {
|
|
if (!res.error && res.surveys) {
|
|
r(res.surveys[0]);
|
|
r(res.surveys[0]);
|
|
} else {
|
|
} else {
|
|
- this.$Message.error("获取数据失败");
|
|
|
|
|
|
+ this.$Message.error(this.$t('survey.getDataFailTip'));
|
|
}
|
|
}
|
|
});
|
|
});
|
|
});
|
|
});
|
|
@@ -313,7 +311,7 @@
|
|
reset: false,
|
|
reset: false,
|
|
})
|
|
})
|
|
.then((res) => {
|
|
.then((res) => {
|
|
- this.$Message.success("操作成功");
|
|
|
|
|
|
+ this.$Message.success(this.$t('survey.doSuc'));
|
|
this.$refs.qnForm.qnFormEdit = false;
|
|
this.$refs.qnForm.qnFormEdit = false;
|
|
this.editable = false;
|
|
this.editable = false;
|
|
this.isLoading = false;
|
|
this.isLoading = false;
|
|
@@ -429,10 +427,8 @@
|
|
/* 取消发布问卷 */
|
|
/* 取消发布问卷 */
|
|
onCancelQn() {
|
|
onCancelQn() {
|
|
this.$Modal.confirm({
|
|
this.$Modal.confirm({
|
|
- title: "取消发布",
|
|
|
|
- content: "<p>确认取消发布该问卷?</p>",
|
|
|
|
- okText: "确认",
|
|
|
|
- cancelText: "取消",
|
|
|
|
|
|
+ title: this.$t('survey.cancelSurvey'),
|
|
|
|
+ content: this.$t('survey.cancelConfirmTip'),
|
|
onOk: () => {
|
|
onOk: () => {
|
|
this.isLoading = true;
|
|
this.isLoading = true;
|
|
this.$api.questionnaire
|
|
this.$api.questionnaire
|
|
@@ -442,11 +438,11 @@
|
|
.then((res) => {
|
|
.then((res) => {
|
|
if (!res.error) {
|
|
if (!res.error) {
|
|
this.isLoading = false;
|
|
this.isLoading = false;
|
|
- this.$Message.success("操作成功");
|
|
|
|
|
|
+ this.$Message.success(this.$t('survey.doSuc'));
|
|
this.getQnList();
|
|
this.getQnList();
|
|
} else {
|
|
} else {
|
|
this.isLoading = false;
|
|
this.isLoading = false;
|
|
- this.$Message.success("操作失败");
|
|
|
|
|
|
+ this.$Message.success(this.$t('survey.doFail'));
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|