|
@@ -112,6 +112,9 @@
|
|
<el-button class="add" size="small" @click="addItems()"
|
|
<el-button class="add" size="small" @click="addItems()"
|
|
>新增资源</el-button
|
|
>新增资源</el-button
|
|
>
|
|
>
|
|
|
|
+ <el-button class="add" size="small" @click="paperTemp()"
|
|
|
|
+ >下载试卷模板</el-button
|
|
|
|
+ >
|
|
</template>
|
|
</template>
|
|
</cloudTable>
|
|
</cloudTable>
|
|
</el-col>
|
|
</el-col>
|
|
@@ -215,6 +218,7 @@
|
|
<el-form-item label="资源附件">
|
|
<el-form-item label="资源附件">
|
|
<!-- <Button @click="choiceImg" icon="ios-cloud-upload-outline" type="primary">选择文件</Button> -->
|
|
<!-- <Button @click="choiceImg" icon="ios-cloud-upload-outline" type="primary">选择文件</Button> -->
|
|
<el-upload
|
|
<el-upload
|
|
|
|
+ ref="upload"
|
|
class="uploadItems"
|
|
class="uploadItems"
|
|
action="/v1/common/upfile"
|
|
action="/v1/common/upfile"
|
|
:limit="1"
|
|
:limit="1"
|
|
@@ -226,6 +230,14 @@
|
|
<el-button size="small" type="primary">点击上传</el-button>
|
|
<el-button size="small" type="primary">点击上传</el-button>
|
|
</el-upload>
|
|
</el-upload>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
+ <div class="ques" v-for="(item, index) in quesContent">
|
|
|
|
+ <span v-exchangeHtml:foo="item.tx"></span>
|
|
|
|
+ <span v-exchangeHtml:foo="item.tg"></span>
|
|
|
|
+ <span v-exchangeHtml:foo="item.da"></span>
|
|
|
|
+ <span v-exchangeHtml:foo="item.zsd"></span>
|
|
|
|
+ <span v-exchangeHtml:foo="item.nd"></span>
|
|
|
|
+ <span v-exchangeHtml:foo="item.jx"></span>
|
|
|
|
+ </div>
|
|
</el-form>
|
|
</el-form>
|
|
</cloudDialog>
|
|
</cloudDialog>
|
|
<!-- <cloudDialog ref="dialog2" :config="dialogConfig2" :beforeClose="beforeClose2" @close="resetForm2">
|
|
<!-- <cloudDialog ref="dialog2" :config="dialogConfig2" :beforeClose="beforeClose2" @close="resetForm2">
|
|
@@ -259,7 +271,7 @@ export default {
|
|
listQuery: {
|
|
listQuery: {
|
|
name: "",
|
|
name: "",
|
|
year: null,
|
|
year: null,
|
|
- sid:null
|
|
|
|
|
|
+ sid: null,
|
|
},
|
|
},
|
|
treeData: [
|
|
treeData: [
|
|
{
|
|
{
|
|
@@ -457,6 +469,7 @@ export default {
|
|
},
|
|
},
|
|
],
|
|
],
|
|
},
|
|
},
|
|
|
|
+ quesContent: [],
|
|
};
|
|
};
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
@@ -518,6 +531,7 @@ export default {
|
|
this.dialogForm1.ctype = "exam";
|
|
this.dialogForm1.ctype = "exam";
|
|
this.dialogForm1.subject = this.leftQuery.subject;
|
|
this.dialogForm1.subject = this.leftQuery.subject;
|
|
this.dialogForm1.period = this.leftQuery.period;
|
|
this.dialogForm1.period = this.leftQuery.period;
|
|
|
|
+ this.dialogForm1.ques = this.quesContent;
|
|
}
|
|
}
|
|
this.$refs.dialog1.open((cancel) => {
|
|
this.$refs.dialog1.open((cancel) => {
|
|
this.$refs["dialogForm1"].validate((valid) => {
|
|
this.$refs["dialogForm1"].validate((valid) => {
|
|
@@ -650,6 +664,32 @@ export default {
|
|
handleAvatarSuccess(res, file) {
|
|
handleAvatarSuccess(res, file) {
|
|
this.dialogForm.name = file.name;
|
|
this.dialogForm.name = file.name;
|
|
this.dialogForm.attach_url = [res.data];
|
|
this.dialogForm.attach_url = [res.data];
|
|
|
|
+ this.clickup(file);
|
|
|
|
+ },
|
|
|
|
+ clickup(file) {
|
|
|
|
+ this.dataTable.loading = true;
|
|
|
|
+ var formData = new FormData();
|
|
|
|
+ formData.append("file", file);
|
|
|
|
+ // let fileList = new FormData();
|
|
|
|
+ var token = this.Cookies.get("www-authenticate");
|
|
|
|
+ axios({
|
|
|
|
+ url: "http://127.0.0.1:19882/parsedocx.aspx",
|
|
|
|
+ // url: "http://10.10.153.242:19882/parsedocx.aspx",
|
|
|
|
+ method: "post",
|
|
|
|
+ data: formData,
|
|
|
|
+ headers: {
|
|
|
|
+ Authorization: `Bearer ${token}`,
|
|
|
|
+ },
|
|
|
|
+ })
|
|
|
|
+ .then((res) => {
|
|
|
|
+ this.dataTable.loading = false;
|
|
|
|
+ // this.open3();
|
|
|
|
+ this.quesContent = res.data;
|
|
|
|
+ this.$refs.upload.clearFiles();
|
|
|
|
+ })
|
|
|
|
+ .catch((err) => {
|
|
|
|
+ this.loading = false;
|
|
|
|
+ });
|
|
},
|
|
},
|
|
addItems() {
|
|
addItems() {
|
|
this.dialogForm = {
|
|
this.dialogForm = {
|
|
@@ -746,6 +786,12 @@ export default {
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ paperTemp() {
|
|
|
|
+ var link = document.createElement("a");
|
|
|
|
+ link.href =
|
|
|
|
+ "http://osscache.scxjc.club/static/say365/eques_template.docx";
|
|
|
|
+ link.click();
|
|
|
|
+ },
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|