Commit 2862857e authored by 夏敏伟's avatar 夏敏伟

修改api

parent a982817e
import { get, post, delete_util, fileUpload_PUT, addParam } from "../util/http_util";
const PREFIX_RESOURCE = "api/rest/3z/resource/";
const PREFIX_ELASTIC = "api/rest/elastic/";
const PREFIX_DOCUMENT = "api/rest/3z/document/";
//文献增加标签
export const queryCollection = (id) => {
return get(`${PREFIX_RESOURCE}queryCollection?folderId=${id}`);
}
export const queryOneNews = (id) => {
return get(`${PREFIX_ELASTIC}queryOneNews?Id=${id}`);
}
export const queryLiterature = (id) => {
return get(`${PREFIX_DOCUMENT}queryLiterature?id=${id}`);
}
export const removeCollection = (id) => {
return delete_util(`${PREFIX_RESOURCE}removeCollection?id=${id}`);
}
\ No newline at end of file
import { type } from "jquery";
import { get, post,delete_util } from "../util/http_util"; import { get, post,delete_util } from "../util/http_util";
//#region 公共 //#region 公共
//服务前缀 //服务前缀
const PREFIX = "api/rest/resource"; const PREFIX = "api/rest/3z/resource";
const PREFIX_Sentiment = "api/rest/sentiment"; const PREFIX_Sentiment = "api/rest/sentiment";
/** /**
* 添加param * 添加param
......
import { get, post, delete_util, fileUpload_PUT, addParam } from "../../util/http_util";
const PREFIX_DOCUMENT = "api/rest/3z/document/";
const PREFIX_RESOURCE = "api/rest/3z/resource/";
// 查询关注
export const queryAttention = (pageNum, pageSize, content) => {
let url = `${PREFIX_RESOURCE}queryAttention`;
url += addParam({ pageNum, pageSize, content });
return get(url);
}
// 编辑数据
export const updateAttention = (data) => {
return post(`${PREFIX_RESOURCE}updateAttention`, data);
}
// 删除关注
export const removeAttention = (id) => {
return delete_util(`${PREFIX_RESOURCE}removeAttention/${id}`);
}
// 新增数据
export const addAttention = (data) => {
return post(`${PREFIX_RESOURCE}addAttention`, data);
}
\ No newline at end of file
import { get_exame, post_exame, delete_util_exame, addParam } from "../../util/http_util";
const PREFIX = "api_exame/user/";
const PREFIX_ADMIN = "api_exame/admin/";
//查询考试记录
export const queryExame = (pageNum, pageSize, account, name) => {
let url = `${PREFIX}questionBank/queryExame`;
url += addParam({ pageNum, pageSize, account, name });
return get_exame(url);
}
export const queryDetails = data => {
return post_exame(`api_exame/admin/TRecordDetails/queryDetails`, data);
}
//新建记录
export const createRecord = data => {
return post_exame(`${PREFIX_ADMIN}TExameRecord/createRecord`, data);
}
//查询记录
export const queryRecord = data => {
return post_exame(`${PREFIX_ADMIN}TExameRecord/queryRecord`, data);
}
//创建考试题目
export const createExame = (name, suggestTime, startTime, endTime, singleNum, multiNum, judgeNum, singlePointValue, multiPointValue, judgePointValue) => {
let url = `${PREFIX}questionBank/createExame`;
url += addParam({ name, suggestTime, startTime, endTime, singleNum, multiNum, judgeNum, singlePointValue, multiPointValue, judgePointValue });
return get_exame(url)
}
//删除试卷
export const removeExame = data => {
return delete_util_exame(`${PREFIX}questionBank/removeExame`, data)
}
export const addQuestionBank = data => {
return post_exame(`${PREFIX_ADMIN}questionBank/addQuestionBank`, data);
}
export const updateQuestionBankById = data => {
return post_exame(`${PREFIX_ADMIN}questionBank/updateQuestionBankById`, data);
}
export const deleteQuestionBankById = data => {
return post_exame(`${PREFIX_ADMIN}questionBank/deleteQuestionBankById`, data);
}
export const listQuestionBank = data => {
return post_exame(`${PREFIX_ADMIN}questionBank/listQuestionBank`, data);
}
export const addTExameContent = data => {
return post_exame(`${PREFIX_ADMIN}TExameContent/addTExameContent`, data);
}
export const updateTExameContent = data => {
return post_exame(`${PREFIX_ADMIN}TExameContent/updateTExameContent`, data);
}
export const deleteTExameContent = data => {
return post_exame(`${PREFIX_ADMIN}TExameContent/deleteTExameContent`, data);
}
export const listTExameContent = data => {
return post_exame(`${PREFIX_ADMIN}TExameContent/listTExameContent`, data);
}
import { get, post, delete_util, fileUpload_PUT, addParam } from "../../util/http_util";
const PREFIX_DOCUMENT = "api/rest/3z/document/";
const PREFIX_RESOURCE = "api/rest/3z/resource/";
const PREFIX_ELASTIC = "api/rest/elastic/";
// 板块查询
export const queryLiteratureFolder = (module) => {
return get(`${PREFIX_DOCUMENT}queryLiteratureFolder?module=${module}`)
}
// 文献资料查询
export const queryLiterature = (module, pageNum, pageSize, origin_name, folder, stick) => {
let url = `${PREFIX_DOCUMENT}queryLiterature`;
url += addParam({ module, pageNum, pageSize, origin_name, folder, stick });
return get(url);
}
//多板块文献资料查询
export const multiQueryLiterature = (module, showPic, ids) => {
let url = `${PREFIX_DOCUMENT}multiQueryLiterature`;
url += addParam({ module, showPic });
return post(url, ids);
}
// 新增人员关联信息
export const addRelatedInfo = (data) => {
return post(`${PREFIX_RESOURCE}addRelatedInfo`, data);
}
//文献增加标签
export const addLiteratureLabel = (id, data) => {
return post(`${PREFIX_DOCUMENT}addLiteratureLabel?id=${id}`, data);
}
//查询收藏目录
export const queryCollectionFolder = (collector) => {
return get(`${PREFIX_RESOURCE}queryCollectionFolder?collector=${collector}`);
}
//添加收藏
export const addCollection = (data) => {
return post(`${PREFIX_RESOURCE}addCollection`, data);
}
//添加收藏夹目录
export const addCollectionFolder = data => {
return post(`${PREFIX_RESOURCE}addCollectionFolder`, data);
}
//删除收藏目录
export const removeCollectionFolder = id => {
return delete_util(`${PREFIX_RESOURCE}removeCollectionFolder?folderId=${id}`);
}
//文献资料上传
export const uploadLiterature = data => {
return fileUpload_PUT(`${PREFIX_DOCUMENT}uploadLiterature`, data)
}
//文献资料删除
export const removeLiterature = (folder, name) => {
return get(`${PREFIX_DOCUMENT}removeLiterature?folder=${folder}&name=${name}`);
}
//给文献资料附加图片
export const addPictureToLiterature = data => {
return fileUpload_PUT(`${PREFIX_DOCUMENT}addPictureToLiterature`, data);
}
//批量文献置顶
export const bulkStickLiterature = data => {
return post(`${PREFIX_DOCUMENT}bulkStickLiterature`, data);
}
//文献资料批量删除
export const removeLiteratureByBatch = data => {
return delete_util(`${PREFIX_DOCUMENT}removeLiteratureByBatch`, data);
}
//批量修改文献资料所在的板块
export const bulkChangeLiteratureFolder = data => {
return post(`${PREFIX_DOCUMENT}bulkChangeLiteratureFolder`, data)
}
//板块名称修改
export const updateLiteratureFolder = data => {
return post(`${PREFIX_DOCUMENT}updateLiteratureFolder`, data)
}
//查询相关推荐文献资料
export const queryRecommendLiterature = id => {
return post(`${PREFIX_ELASTIC}queryRecommendLiterature?id=${id}`);
}
//分页检索文献列表
export const searchLiterature = (module, pageNum, pageSize, text) => {
let url = `${PREFIX_ELASTIC}queryRecommendLiterature`;
url += addParam({ module, pageNum, pageSize, text });
return post(url);
}
//根据文献name获取文献
export const queryLiteratureById = name => {
return get(`${PREFIX_ELASTIC}queryLiteratureById?id=${name}`);
}
//文件文献预览
export const previewPdf = (bucket, objectName) => {
window.open(`api/rest/file/pdf/${bucket}?objectName=${objectName}`);
}
\ No newline at end of file
...@@ -6,14 +6,14 @@ import { ...@@ -6,14 +6,14 @@ import {
import { import {
saveAs saveAs
} from 'file-saver'; } from 'file-saver';
import {ACCESS_TOKEN, ACCESS_USER, HTTP_STATUS} from "../constant/user"; import { ACCESS_TOKEN, ACCESS_USER, HTTP_STATUS } from "../constant/user";
/** /**
* 添加请求头 * 添加请求头
* @param {} headers * @param {} headers
* @returns * @returns
*/ */
function addHeaders(headers){ function addHeaders(headers) {
let headers_target = { let headers_target = {
'Content-Type': 'application/json', // 指定提交方式为表单提交 'Content-Type': 'application/json', // 指定提交方式为表单提交
'x-requested-with': 'XMLHttpRequest' 'x-requested-with': 'XMLHttpRequest'
...@@ -105,7 +105,7 @@ let delete_util = (url, data, headers = {}) => { ...@@ -105,7 +105,7 @@ let delete_util = (url, data, headers = {}) => {
}; };
let fileUpload = (url, formData, headers = {}) => { let fileUpload = (url, formData, headers = {}) => {
let headers_target = {'x-requested-with': 'XMLHttpRequest'}; let headers_target = { 'x-requested-with': 'XMLHttpRequest' };
headers_target = Object.assign(headers_target, headers); headers_target = Object.assign(headers_target, headers);
let token = sessionStorage.getItem("token"); let token = sessionStorage.getItem("token");
if (token) { if (token) {
...@@ -158,14 +158,14 @@ let fileDownload = (url, filename, type, headers = {}) => { ...@@ -158,14 +158,14 @@ let fileDownload = (url, filename, type, headers = {}) => {
//下载文件 type传文件类型 例如:doc,xls... //下载文件 type传文件类型 例如:doc,xls...
let fileDownload1 = (url, param, filename, headers = {}) => { let fileDownload1 = (url, param, filename, headers = {}) => {
return new Promise((resolve, reject)=>{ return new Promise((resolve, reject) => {
fetch(url, { fetch(url, {
method: "POST", method: "POST",
body: typeof param == "object" ? JSON.stringify(param) : param, body: typeof param == "object" ? JSON.stringify(param) : param,
headers: new Headers(addHeaders(headers)) headers: new Headers(addHeaders(headers))
}).then(res => { }).then(res => {
let tmp = res.headers.get('content-disposition'); let tmp = res.headers.get('content-disposition');
if(filename == null && tmp != null){ if (filename == null && tmp != null) {
// 解码 // 解码
filename = decodeURIComponent(tmp.split('filename=')[1]); filename = decodeURIComponent(tmp.split('filename=')[1]);
} }
...@@ -178,7 +178,7 @@ let fileDownload1 = (url, param, filename, headers = {}) => { ...@@ -178,7 +178,7 @@ let fileDownload1 = (url, param, filename, headers = {}) => {
a.click(); a.click();
window.URL.revokeObjectURL(url); window.URL.revokeObjectURL(url);
resolve(); resolve();
}).catch(err=>{ }).catch(err => {
console.log(err); console.log(err);
}); });
}); });
...@@ -338,7 +338,7 @@ let base64DataURLToArrayBuffer = (dataURL) => { ...@@ -338,7 +338,7 @@ let base64DataURLToArrayBuffer = (dataURL) => {
} }
return bytes.buffer; return bytes.buffer;
} }
let imageToBase64 = (file,that) =>{ let imageToBase64 = (file, that) => {
var reader = new FileReader() var reader = new FileReader()
reader.readAsDataURL(file) reader.readAsDataURL(file)
reader.onload = () => { reader.onload = () => {
...@@ -427,19 +427,19 @@ let dateChangeFormat = (format, date) => { ...@@ -427,19 +427,19 @@ let dateChangeFormat = (format, date) => {
}); });
return format; return format;
} }
let getCookie = (name)=>{ let getCookie = (name) => {
let arr, reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)"); let arr, reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)");
if (arr = document.cookie.match(reg)) if (arr = document.cookie.match(reg))
return (arr[2]); return (arr[2]);
else else
return null; return null;
} }
let setCookie = (c_name, value, b)=>{ let setCookie = (c_name, value, b) => {
let s = new Date(); let s = new Date();
s.setDate(s.getDate() + b); s.setDate(s.getDate() + b);
document.cookie = c_name + "=" + escape(value) + ((b == null) ? "" : ";expires=" + s.toGMTString()); document.cookie = c_name + "=" + escape(value) + ((b == null) ? "" : ";expires=" + s.toGMTString());
} }
let delCookie = (name)=>{ let delCookie = (name) => {
let exp = new Date(); let exp = new Date();
exp.setTime(exp.getTime() - 1); exp.setTime(exp.getTime() - 1);
let s = getCookie(name); let s = getCookie(name);
...@@ -447,6 +447,139 @@ let delCookie = (name)=>{ ...@@ -447,6 +447,139 @@ let delCookie = (name)=>{
document.cookie = name + "=" + s + ";expires=" + exp.toGMTString(); document.cookie = name + "=" + s + ";expires=" + exp.toGMTString();
} }
/**
* 添加param
* @param {*} param
* @returns
*/
const addParam = (param) => {
let url = "";
let keys = Object.getOwnPropertyNames(param);
keys.forEach(function (key, index) {
if (param[key] != undefined) {
if (index == 0) {
url += "?";
}
url += key + "=" + param[key];
if (index != keys.length - 1) {
url += "&";
}
}
});
return url;
}
let get_exame = (url, headers = {}) => {
return new Promise((resolve, reject) => {
fetch(url, {
method: "GET",
headers: new Headers(addHeaders(headers))
}).then(res => {
if (res.status == 200) {
return res.text();
} else {
console.log(res.statusText);
reject(HTTP_STATUS);
}
}).then(res => {
let result = JSON.parse(res);
if (result.state.code == 90001) {
resolve(result.data);
} else {
console.log(result);
reject(result);
}
}).catch(err => reject(err));
})
};
let post_exame = (url, data, headers = {}) => {
return new Promise((resolve, reject) => {
fetch(url, {
method: "POST",
body: typeof data == "object" ? JSON.stringify(data) : data,
headers: new Headers(addHeaders(headers))
}).then(res => {
if (res.status == 200) {
return res.text();
} else {
console.log(res.statusText);
reject(HTTP_STATUS);
}
}).then(res => {
let result = JSON.parse(res);
if (result.state.code == 90001) {
resolve(result.data);
} else {
console.log(result);
reject(result);
}
}).catch(err => reject(err));
})
};
let delete_util_exame = (url, data, headers = {}) => {
return new Promise((resolve, reject) => {
fetch(url, {
method: "DELETE",
body: typeof data == "object" ? JSON.stringify(data) : data,
headers: new Headers(addHeaders(headers))
}).then(res => {
if (res.status == 200) {
return res.text();
} else {
console.log(res.statusText);
reject(HTTP_STATUS);
}
}).then(res => {
let result = JSON.parse(res);
if (result.state.code == 90001) {
resolve(result.data);
} else {
console.log(result);
reject(result);
}
}).catch(err => reject(err));
})
};
let fileUpload_PUT = (url, formData, headers = {}) => {
let headers_target = { 'x-requested-with': 'XMLHttpRequest' };
headers_target = Object.assign(headers_target, headers);
let token = sessionStorage.getItem("token");
if (token) {
headers_target[ACCESS_TOKEN] = token;
}
let user = sessionStorage.getItem("user");
if (user) {
headers_target[ACCESS_USER] = JSON.parse(user).account;
}
return new Promise((resolve, reject) => {
fetch(url, {
method: "PUT",
body: formData,
headers: new Headers(headers_target)
}).then(res => {
if (res.status == 200) {
return res.text();
} else {
console.log(res.statusText);
reject(HTTP_STATUS);
}
}).then(res => {
let result = JSON.parse(res);
if (result.code == 9000) {
resolve(result.data);
} else {
console.log(result);
reject(result);
}
}).catch(err => reject(err));
})
};
export { export {
get, get,
post, post,
...@@ -472,4 +605,9 @@ export { ...@@ -472,4 +605,9 @@ export {
fileDownload1, fileDownload1,
imageToBase64, imageToBase64,
rw_jg_IsConfirm, rw_jg_IsConfirm,
addParam,
get_exame,
post_exame,
delete_util_exame,
fileUpload_PUT
} }
\ No newline at end of file
...@@ -3,34 +3,41 @@ ...@@ -3,34 +3,41 @@
<div class="left-bookMark1"> <div class="left-bookMark1">
<div class="title">文件夹</div> <div class="title">文件夹</div>
<ul> <ul>
<li v-for="(item,index) in collectionFolder" @click="queryCollectionFolderNews(item.id,index)" :style="{'color':(index==selectIndex)?'#0dada7':'','font-weight':(index==selectIndex)?'900':''}"> <li v-for="(item, index) in collectionFolder" @click="queryCollectionFolderNews(item.id, index)"
<span class="el-icon-folder-opened"></span>&emsp;{{item.name}} :style="{ 'color': (index == selectIndex) ? '#0dada7' : '', 'font-weight': (index == selectIndex) ? '900' : '' }">
<span class="el-icon-folder-opened"></span>&emsp;{{ item.name }}
</li> </li>
</ul> </ul>
</div> </div>
<div class="right-bookMark1"> <div class="right-bookMark1">
<ul> <ul>
<li v-for="(item,index) in collectionFolderNews"> <li v-for="(item, index) in collectionFolderNews">
<div @click="showNews(item)"> <div @click="showNews(item)">
<span style="color:#ff4949;font-size: 15px;font-weight: 900;" v-show="item.description==''||item.description==null">全文:</span> <span style="color:#ff4949;font-size: 15px;font-weight: 900;"
<span v-text="item.description==''||item.description==null?''+item.title:item.description" style="font-size: 14px;"></span> v-show="item.description == '' || item.description == null">全文:</span>
<span
v-text="item.description == '' || item.description == null ? '' + item.title : item.description"
style="font-size: 14px;"></span>
</div> </div>
<div> <div>
<span>收藏时间:</span> <span>收藏时间:</span>
<span v-text="item.createTime"></span> <span v-text="item.createTime"></span>
<el-button class="removeButton" type="danger" icon="el-icon-delete" circle size="mini" @click="removeCollection(item)"></el-button> <el-button class="removeButton" type="danger" icon="el-icon-delete" circle size="mini"
@click="removeCollection(item)"></el-button>
</div> </div>
</li> </li>
</ul> </ul>
</div> </div>
<!-- 新闻详情展示 --> <!-- 新闻详情展示 -->
<el-dialog :title="newInfo.title" :visible.sync="dialogVisible" width="60%" :before-close="handleClose" center v-if="newInfo"> <el-dialog :title="newInfo.title" :visible.sync="dialogVisible" width="60%" :before-close="handleClose" center
v-if="newInfo">
<span> <span>
<div>发布时间:<span v-text="newInfo.pubdate"></span></div> <div>发布时间:<span v-text="newInfo.pubdate"></span></div>
<div> <div>
<el-tag type="danger" effect="dark" v-text="newInfo.is_original?'原创':'转发'"></el-tag> <el-tag type="danger" effect="dark" v-text="newInfo.is_original ? '原创' : '转发'"></el-tag>
<el-tag type="primary" effect="dark" v-text="newInfo.country" v-show="newInfo.country!=''&&newInfo.country!=null"></el-tag> <el-tag type="primary" effect="dark" v-text="newInfo.country"
v-show="newInfo.country != '' && newInfo.country != null"></el-tag>
<el-tag type="success" effect="dark" v-text="newInfo.site_name"></el-tag> <el-tag type="success" effect="dark" v-text="newInfo.site_name"></el-tag>
</div> </div>
<div id="txt" v-html="newInfo.txt"></div> <div id="txt" v-html="newInfo.txt"></div>
...@@ -49,6 +56,7 @@ ...@@ -49,6 +56,7 @@
padding: 1% 3% 3% 2%; padding: 1% 3% 3% 2%;
color: white; color: white;
box-sizing: border-box; box-sizing: border-box;
.left-bookMark1 { .left-bookMark1 {
width: 260px; width: 260px;
height: 100%; height: 100%;
...@@ -57,6 +65,7 @@ ...@@ -57,6 +65,7 @@
box-sizing: border-box; box-sizing: border-box;
background-image: url(../../assets/img/bookMark/03.png); background-image: url(../../assets/img/bookMark/03.png);
background-size: 100% 100%; background-size: 100% 100%;
.title { .title {
width: 100%; width: 100%;
height: 30px; height: 30px;
...@@ -66,6 +75,7 @@ ...@@ -66,6 +75,7 @@
background-size: 100% 100%; background-size: 100% 100%;
color: #ff9900; color: #ff9900;
} }
ul { ul {
width: 100%; width: 100%;
height: calc(100% - 40px); height: calc(100% - 40px);
...@@ -74,9 +84,11 @@ ...@@ -74,9 +84,11 @@
padding: 0; padding: 0;
list-style: none; list-style: none;
overflow-y: auto; overflow-y: auto;
&::-webkit-scrollbar { &::-webkit-scrollbar {
display: none; display: none;
} }
li { li {
width: 100%; width: 100%;
height: 30px; height: 30px;
...@@ -87,7 +99,8 @@ ...@@ -87,7 +99,8 @@
box-sizing: border-box; box-sizing: border-box;
background-image: url(../../assets/img/bookMark/08.png); background-image: url(../../assets/img/bookMark/08.png);
background-size: 100% 100%; background-size: 100% 100%;
color:#797979; color: #797979;
&:hover { &:hover {
cursor: pointer; cursor: pointer;
font-weight: bold; font-weight: bold;
...@@ -96,6 +109,7 @@ ...@@ -96,6 +109,7 @@
} }
} }
} }
.right-bookMark1 { .right-bookMark1 {
width: calc(100% - 280px); width: calc(100% - 280px);
height: 100%; height: 100%;
...@@ -105,6 +119,7 @@ ...@@ -105,6 +119,7 @@
box-sizing: border-box; box-sizing: border-box;
background-image: url(../../assets/img/bookMark/05.png); background-image: url(../../assets/img/bookMark/05.png);
background-size: 100% 100%; background-size: 100% 100%;
ul { ul {
width: 100%; width: 100%;
height: 98%; height: 98%;
...@@ -113,26 +128,31 @@ ...@@ -113,26 +128,31 @@
box-sizing: border-box; box-sizing: border-box;
list-style: none; list-style: none;
overflow-y: auto; overflow-y: auto;
&::-webkit-scrollbar { &::-webkit-scrollbar {
display: none; display: none;
} }
li { li {
padding: 20px; padding: 20px;
box-sizing: border-box; box-sizing: border-box;
background-image: url(../../assets/img/bookMark/06.png); background-image: url(../../assets/img/bookMark/06.png);
background-size: 100% 100%; background-size: 100% 100%;
cursor: pointer; cursor: pointer;
div { div {
&:first-child { &:first-child {
color: #ffffff; color: #ffffff;
} }
&:nth-child(2) { &:nth-child(2) {
font-size: 13px; font-size: 13px;
color: #ffffff; color: #ffffff;
margin-top: 10px; margin-top: 10px;
text-align: right; text-align: right;
} }
.removeButton{
.removeButton {
margin-left: 20px; margin-left: 20px;
} }
} }
...@@ -149,6 +169,7 @@ ...@@ -149,6 +169,7 @@
text-align: center; text-align: center;
color: #b3b3b3; color: #b3b3b3;
} }
&:nth-child(3) { &:nth-child(3) {
color: white; color: white;
margin-top: 10px; margin-top: 10px;
...@@ -158,6 +179,7 @@ ...@@ -158,6 +179,7 @@
} }
} }
} }
.el-tag { .el-tag {
height: 20px; height: 20px;
padding: 0px 8px; padding: 0px 8px;
...@@ -169,6 +191,8 @@ ...@@ -169,6 +191,8 @@
<script> <script>
import { endLoading, get, startLoading, delete_util } from '../../util/http_util' import { endLoading, get, startLoading, delete_util } from '../../util/http_util'
import { queryCollection, queryOneNews, queryLiterature, removeCollection } from '../../api/bookMark';
import { queryCollectionFolder } from '../../api/xxxl/llxx';
export default { export default {
name: 'bookMark1', name: 'bookMark1',
data() { data() {
...@@ -181,14 +205,14 @@ export default { ...@@ -181,14 +205,14 @@ export default {
selectItem: {} selectItem: {}
} }
}, },
inject:['reload'], inject: ['reload'],
methods: { methods: {
queryCollectionFolderNews(id, index) { queryCollectionFolderNews(id, index) {
this.selectIndex = index; this.selectIndex = index;
get('api/rest/resource/queryCollection?folderId=' + id).then(res => { queryCollection(id).then(res => {
this.collectionFolderNews = res; this.collectionFolderNews = res;
}) })
.catch((err)=>{ .catch((err) => {
this.$message.warning(err.message); this.$message.warning(err.message);
}) })
}, },
...@@ -196,7 +220,7 @@ export default { ...@@ -196,7 +220,7 @@ export default {
showNews(item) { showNews(item) {
this.selectItem = item; this.selectItem = item;
startLoading(); startLoading();
get('api/rest/fulltext/queryOneNews?Id=' + item.originId).then(res => { queryOneNews(item.originId).then(res => {
if (res != null) { if (res != null) {
this.dialogVisible = true; this.dialogVisible = true;
this.newInfo = res; this.newInfo = res;
...@@ -206,7 +230,7 @@ export default { ...@@ -206,7 +230,7 @@ export default {
this.newInfo.txt = htmlStr.replace(keyword, "<span style='color:red'>" + keyword + "</span>"); this.newInfo.txt = htmlStr.replace(keyword, "<span style='color:red'>" + keyword + "</span>");
}); });
} else { } else {
get('api/rest/document/queryLiterature?id=' + item.originId).then(resLi => { queryLiterature(item.originId).then(resLi => {
window.open('api/rest/document/viewLiterature/' + resLi.list[0].folder + '/' + resLi.list[0].name); window.open('api/rest/document/viewLiterature/' + resLi.list[0].folder + '/' + resLi.list[0].name);
}).catch(err => { }).catch(err => {
this.$message.warning(err.message); this.$message.warning(err.message);
...@@ -214,7 +238,7 @@ export default { ...@@ -214,7 +238,7 @@ export default {
} }
endLoading(); endLoading();
}) })
.catch((err)=>{ .catch((err) => {
endLoading(); endLoading();
this.$message.warning(err.message); this.$message.warning(err.message);
}) })
...@@ -228,7 +252,7 @@ export default { ...@@ -228,7 +252,7 @@ export default {
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
delete_util('api/rest/resource/removeCollection?id=' + item.id).then(res => { removeCollection(item.id).then(res => {
if (res == 1) { if (res == 1) {
this.$message.success("删除成功!"); this.$message.success("删除成功!");
this.reload(); this.reload();
...@@ -254,11 +278,11 @@ export default { ...@@ -254,11 +278,11 @@ export default {
} }
}, },
activated() { activated() {
get('api/rest/resource/queryCollectionFolder?collector=' + this.userInfo.account).then(res => { queryCollectionFolder(this.userInfo.account).then(res => {
this.collectionFolder = res; this.collectionFolder = res;
res[0].id && this.queryCollectionFolderNews(res[0].id, 0); res[0].id && this.queryCollectionFolderNews(res[0].id, 0);
}) })
.catch((err)=>{ .catch((err) => {
this.$message.warning(err.message); this.$message.warning(err.message);
}) })
} }
......
...@@ -217,6 +217,7 @@ export default { ...@@ -217,6 +217,7 @@ export default {
} }
}, },
mounted() { mounted() {
console.log(this.$store.state.navList);
let arr = this.$store.state.navList[0].children.filter((e) => e.path == '/sjgl'); let arr = this.$store.state.navList[0].children.filter((e) => e.path == '/sjgl');
this.$store.state.navList[0].children.forEach((item) => { this.$store.state.navList[0].children.forEach((item) => {
if (item.children.length > 0) { if (item.children.length > 0) {
...@@ -230,6 +231,7 @@ export default { ...@@ -230,6 +231,7 @@ export default {
}) })
} }
}); });
this.manager_module = this.$store.state.navList[0].children.filter( this.manager_module = this.$store.state.navList[0].children.filter(
(e) => e.meta.type == "1" (e) => e.meta.type == "1"
); );
......
...@@ -149,6 +149,10 @@ ...@@ -149,6 +149,10 @@
<script> <script>
import { get, fileUpload, startLoading, endLoading, download, delete_util, post } from '../../util/http_util'; import { get, fileUpload, startLoading, endLoading, download, delete_util, post } from '../../util/http_util';
import {
queryLiterature, uploadLiterature, removeLiterature, addPictureToLiterature, bulkStickLiterature, removeLiteratureByBatch, bulkChangeLiteratureFolder,
updateLiteratureFolder, queryLiteratureFolder, previewPdf
} from "../../api/xxxl/llxx"
export default { export default {
name: 'flfggl', name: 'flfggl',
inject: ['reload'], inject: ['reload'],
...@@ -190,10 +194,10 @@ export default { ...@@ -190,10 +194,10 @@ export default {
}, },
//查询上传的文件 //查询上传的文件
queryLiterature(pageNum, pageSize, title, type) { queryLiterature(pageNum, pageSize, title, type) {
let titleUrl = (title != '' && title != null) ? ('&origin_name=' + title) : ''; let titleUrl = title == '' ? null : title;
let typeUrl = (type != '' && type != null) ? ('&folder=' + type) : ''; let typeUrl = type == '' ? null : type;;
let type_stick = this.valueSelectFile_type == "1"; let type_stick = this.valueSelectFile_type == "1";
get('api/rest/document/queryLiterature?module=法律法规&stick=' + type_stick + '&pageNum=' + pageNum + '&pageSize=' + pageSize + titleUrl + typeUrl).then(res => { queryLiterature('法律法规', pageNum, pageSize, titleUrl, typeUrl, type_stick).then(res => {
this.literatureList = res.list; this.literatureList = res.list;
this.total = res.totals; this.total = res.totals;
this.currentPage = pageNum; this.currentPage = pageNum;
...@@ -214,7 +218,7 @@ export default { ...@@ -214,7 +218,7 @@ export default {
fd.append("folder", this.value); fd.append("folder", this.value);
fd.append("module", '法律法规'); fd.append("module", '法律法规');
this.imgList.length == 1 && fd.append('image', this.imgList[0].raw); this.imgList.length == 1 && fd.append('image', this.imgList[0].raw);
fileUpload('api/rest/document/uploadLiterature', fd).then(res => { uploadLiterature(fd).then(res => {
if (res == 1) { if (res == 1) {
this.$message.success('上传成功!'); this.$message.success('上传成功!');
this.valueSelectFile_type = '2'; this.valueSelectFile_type = '2';
...@@ -252,7 +256,8 @@ export default { ...@@ -252,7 +256,8 @@ export default {
}, },
//以pdf形式预览 //以pdf形式预览
viewLiterature(item) { viewLiterature(item) {
window.open('api/rest/document/viewLiterature/' + item.folder + '/' + item.name); // window.open('api/rest/document/viewLiterature/' + item.folder + '/' + item.name);
previewPdf('LiteraturePDF', item.name);
}, },
//修改文件 //修改文件
editFile(item) { editFile(item) {
...@@ -267,7 +272,7 @@ export default { ...@@ -267,7 +272,7 @@ export default {
type: 'warning' type: 'warning'
}) })
.then(res => { .then(res => {
return delete_util('api/rest/document/removeLiterature?folder=' + item.folder + '&name=' + item.name); return removeLiterature(item.folder, item.name);
}) })
.then(res => { .then(res => {
if (res == 1) { if (res == 1) {
...@@ -292,7 +297,7 @@ export default { ...@@ -292,7 +297,7 @@ export default {
let fd = new FormData(); let fd = new FormData();
fd.append('name', item.name); fd.append('name', item.name);
fd.append('folder', item.folder); fd.append('folder', item.folder);
fileUpload('api/rest/document/addPictureToLiterature', fd).then(res => { addPictureToLiterature(fd).then(res => {
if (res == 1) { if (res == 1) {
this.$message.success('图片删除成功!'); this.$message.success('图片删除成功!');
this.dialogVisibleImg = false; this.dialogVisibleImg = false;
...@@ -333,7 +338,7 @@ export default { ...@@ -333,7 +338,7 @@ export default {
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
delete_util('api/rest/document/removeLiteratureByBatch', this.multipleSelection).then(res => { removeLiteratureByBatch(this.multipleSelection).then(res => {
if (res == this.multipleSelection.length) { if (res == this.multipleSelection.length) {
this.$message.success('删除成功!'); this.$message.success('删除成功!');
this.queryLiterature(this.currentPage, this.everySize, this.input, this.valueSelect); this.queryLiterature(this.currentPage, this.everySize, this.input, this.valueSelect);
...@@ -366,7 +371,7 @@ export default { ...@@ -366,7 +371,7 @@ export default {
obj.oldFolder = res.bucket; obj.oldFolder = res.bucket;
list.push(obj); list.push(obj);
}) })
post('api/rest/document/bulkChangeLiteratureFolder', list).then(res => { bulkChangeLiteratureFolder(list).then(res => {
if (res == list.length) { if (res == list.length) {
this.$message.success('转移成功!'); this.$message.success('转移成功!');
this.dialogVisibleFolder = false; this.dialogVisibleFolder = false;
...@@ -415,7 +420,7 @@ export default { ...@@ -415,7 +420,7 @@ export default {
fd.append('name', this.selectFile.name); fd.append('name', this.selectFile.name);
fd.append('folder', this.selectFile.folder); fd.append('folder', this.selectFile.folder);
fd.append('file', this.fileListImg[0].raw); fd.append('file', this.fileListImg[0].raw);
fileUpload('api/rest/document/addPictureToLiterature', fd).then(res => { addPictureToLiterature(fd).then(res => {
if (res == 1) { if (res == 1) {
this.$message.success('新增图片成功!'); this.$message.success('新增图片成功!');
this.dialogVisibleImg = false; this.dialogVisibleImg = false;
...@@ -451,7 +456,7 @@ export default { ...@@ -451,7 +456,7 @@ export default {
obj.id = row.id; obj.id = row.id;
obj.stick = row.stick == null ? 1 : 0; obj.stick = row.stick == null ? 1 : 0;
let message = obj.stick == 1 ? '置顶' : '取消置顶'; let message = obj.stick == 1 ? '置顶' : '取消置顶';
post('api/rest/document/bulkStickLiterature', [obj]).then(res => { bulkStickLiterature([obj]).then(res => {
if (res == 1) { if (res == 1) {
this.search(); this.search();
this.$message.success(message + '成功!'); this.$message.success(message + '成功!');
...@@ -473,7 +478,7 @@ export default { ...@@ -473,7 +478,7 @@ export default {
tmpList.push(obj); tmpList.push(obj);
}) })
});; });;
post('api/rest/document/updateLiteratureFolder', tmpList).then(res => { updateLiteratureFolder(tmpList).then(res => {
if (res == tmpList.length) { if (res == tmpList.length) {
this.$message.success('模块名称修改成功!'); this.$message.success('模块名称修改成功!');
this.dialogVisibleModule = false; this.dialogVisibleModule = false;
...@@ -489,7 +494,7 @@ export default { ...@@ -489,7 +494,7 @@ export default {
}, },
activated() { activated() {
//查询板块名称 //查询板块名称
get('api/rest/document/queryLiteratureFolder?module=法律法规').then(res => { queryLiteratureFolder('法律法规').then(res => {
this.moduleList = res; this.moduleList = res;
this.transferRadios = res; this.transferRadios = res;
let arrListModule = [ let arrListModule = [
......
...@@ -14,15 +14,8 @@ ...@@ -14,15 +14,8 @@
<div class="bottom-div"> <div class="bottom-div">
<div class="table-div"> <div class="table-div">
<el-table :data="tableData" height="100%" border style="width: 100%" @selection-change="handleSelectionChange"> <el-table :data="tableData" height="100%" border style="width: 100%" @selection-change="handleSelectionChange">
<el-table-column <el-table-column type="selection" width="55"></el-table-column>
type="selection" <el-table-column type="index" width="100" label="序号"></el-table-column>
width="55"
></el-table-column>
<el-table-column
type="index"
width="100"
label="序号"
></el-table-column>
<el-table-column prop="name" label="试卷名称"> </el-table-column> <el-table-column prop="name" label="试卷名称"> </el-table-column>
<el-table-column prop="limitStartTime" label="试卷开启时间"> <el-table-column prop="limitStartTime" label="试卷开启时间">
</el-table-column> </el-table-column>
...@@ -32,40 +25,22 @@ ...@@ -32,40 +25,22 @@
<template slot-scope="scope"> <template slot-scope="scope">
<i class="el-icon-view" @click="ckxq(scope.row)" title="查看详情"></i> <i class="el-icon-view" @click="ckxq(scope.row)" title="查看详情"></i>
&nbsp; &nbsp;
<i <i class="el-icon-delete" @click="handleDelete(scope.row)"
class="el-icon-delete" style="color:red;font-size: 20px;cursor: pointer;" title="删除"></i>
@click="handleDelete(scope.row)"
style="color:red;font-size: 20px;cursor: pointer;"
title="删除"
></i>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
<div class="page-div"> <div class="page-div">
<el-pagination <el-pagination class="myPagination" background layout="total, sizes, prev, pager, next, jumper"
class="myPagination" @size-change="handleSizeChange" :total="totals" :page-size="pageRow" :current-page="current_page_qw"
background @current-change="handleCurrentChange_qw" :page-sizes="[10, 20, 50, 100]">
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
:total="totals"
:page-size="pageRow"
:current-page="current_page_qw"
@current-change="handleCurrentChange_qw"
:page-sizes="[10, 20, 50, 100]"
>
</el-pagination> </el-pagination>
</div> </div>
</div> </div>
</div> </div>
<div <div class="sjtms" v-if="!show_s" element-loading-text="试题正在加载中,请稍后!!!" element-loading-spinner="el-icon-loading"
class="sjtms" element-loading-background="rgba(0, 0, 0, 0.8)" v-loading="loading">
v-if="!show_s"
element-loading-text="试题正在加载中,请稍后!!!"
element-loading-spinner="el-icon-loading"
element-loading-background="rgba(0, 0, 0, 0.8)"
v-loading="loading"
>
<div class="fh"> <div class="fh">
<el-button type="info" @click="kszxs(true)">返回</el-button> <el-button type="info" @click="kszxs(true)">返回</el-button>
</div> </div>
...@@ -76,8 +51,7 @@ ...@@ -76,8 +51,7 @@
</div> </div>
<div class="title-class"> <div class="title-class">
<div class="title-div"> <div class="title-div">
<span></span><span v-text="counts"></span <span></span><span v-text="counts"></span><span>次模拟考试</span>
><span>次模拟考试</span>
</div> </div>
<div> <div>
<span>总分100分</span> <span>总分100分</span>
...@@ -85,8 +59,8 @@ ...@@ -85,8 +59,8 @@
</div> </div>
<div class="pub-div"> <div class="pub-div">
<div class="tit-div"> <div class="tit-div">
<span>(一)单选题</span <span>(一)单选题</span><span class="pub-span">{{ '(共' + arr_single.length + '题,每题' + single_score + '分,选错不得分)'
><span class="pub-span">{{'(共'+arr_single.length+'题,每题'+single_score+'分,选错不得分)'}}</span> }}</span>
</div> </div>
<div class="tm-xx"> <div class="tm-xx">
<div v-for="(item, index) in arr_single" class="tm-div"> <div v-for="(item, index) in arr_single" class="tm-div">
...@@ -95,12 +69,7 @@ ...@@ -95,12 +69,7 @@
</div> </div>
<div class="xx-div"> <div class="xx-div">
<div v-for="(items, indexs) in item.content" class="xx-dic"> <div v-for="(items, indexs) in item.content" class="xx-dic">
<el-radio <el-radio v-model="item._correct" :label="items" :key="indexs">{{ items }}</el-radio>
v-model="item._correct"
:label="items"
:key="indexs"
>{{ items }}</el-radio
>
</div> </div>
</div> </div>
</div> </div>
...@@ -108,8 +77,8 @@ ...@@ -108,8 +77,8 @@
</div> </div>
<div class="pub-div"> <div class="pub-div">
<div class="tit-div"> <div class="tit-div">
<span>(二)多选题</span <span>(二)多选题</span><span class="pub-span">{{ '(共' + arr_multiple.length + '题,每题' + multiple_score +
><span class="pub-span">{{'(共'+arr_multiple.length+'题,每题'+multiple_score+'分,选错不得分)'}}</span> '分,选错不得分)' }}</span>
</div> </div>
<div class="tm-xx"> <div class="tm-xx">
<div v-for="(item, index) in arr_multiple" class="tm-div"> <div v-for="(item, index) in arr_multiple" class="tm-div">
...@@ -118,12 +87,7 @@ ...@@ -118,12 +87,7 @@
</div> </div>
<div class="xx-div"> <div class="xx-div">
<div v-for="(items, indexs) in item.content" class="xx-dic"> <div v-for="(items, indexs) in item.content" class="xx-dic">
<el-checkbox <el-checkbox v-model="item._correct" :label="items" :key="indexs">{{ items }}</el-checkbox>
v-model="item._correct"
:label="items"
:key="indexs"
>{{ items }}</el-checkbox
>
</div> </div>
</div> </div>
</div> </div>
...@@ -131,8 +95,8 @@ ...@@ -131,8 +95,8 @@
</div> </div>
<div class="pub-div"> <div class="pub-div">
<div class="tit-div"> <div class="tit-div">
<span>(三)判断题</span <span>(三)判断题</span><span class="pub-span">{{ '(共' + arr_judge.length + '题,每题' + judge_score + '分,选错不得分)'
><span class="pub-span">{{'(共'+arr_judge.length+'题,每题'+judge_score+'分,选错不得分)'}}</span> }}</span>
</div> </div>
<div class="tm-xx"> <div class="tm-xx">
<div v-for="(item, index) in arr_judge" class="tm-div"> <div v-for="(item, index) in arr_judge" class="tm-div">
...@@ -141,12 +105,7 @@ ...@@ -141,12 +105,7 @@
</div> </div>
<div class="xx-div"> <div class="xx-div">
<div v-for="(items, indexs) in item.content" class="xx-dic"> <div v-for="(items, indexs) in item.content" class="xx-dic">
<el-radio <el-radio v-model="item._correct" :label="items" :key="indexs">{{ items }}</el-radio>
v-model="item._correct"
:label="items"
:key="indexs"
>{{ items }}</el-radio
>
</div> </div>
</div> </div>
</div> </div>
...@@ -158,62 +117,43 @@ ...@@ -158,62 +117,43 @@
</div> </div>
<div class="tm_dt" v-if="tab_st == 2"> <div class="tm_dt" v-if="tab_st == 2">
<div style="margin-top: 50px"> <div style="margin-top: 50px">
<div <div style="
style="
text-align: center; text-align: center;
color: black; color: black;
font-size: 20px; font-size: 20px;
font-weight: 700; font-weight: 700;
" ">
>
<span>您好!您此次试题学习训练结果为</span> <span>您好!您此次试题学习训练结果为</span>
<span <span v-text="fraction" style="color: red; font-size: 20px"></span>
v-text="fraction"
style="color: red; font-size: 20px"
></span>
<span></span> <span></span>
</div> </div>
<div <div style="
style="
margin-left: calc(50% - 100px); margin-left: calc(50% - 100px);
margin-top: 20px; margin-top: 20px;
color: black; color: black;
" ">
>
<div style="margin-top: 10px"> <div style="margin-top: 10px">
<div class="pub_dt_div"><span>单选题:</span></div> <div class="pub_dt_div"><span>单选题:</span></div>
<div> <div>
<span v-if="dx_fractions == 10">全部答对</span> <span v-if="dx_fractions == 10">全部答对</span>
<span v-if="dx_fractions != 10" <span v-if="dx_fractions != 10">答对{{ dx_fractions }}道题</span>
>答对{{ dx_fractions }}道题</span <span v-if="dx_fractions != 10">答错{{ 10 - dx_fractions }}道题</span>
>
<span v-if="dx_fractions != 10"
>答错{{ 10 - dx_fractions }}道题</span
>
</div> </div>
</div> </div>
<div style="margin-top: 10px"> <div style="margin-top: 10px">
<div class="pub_dt_div"><span>多选题:</span></div> <div class="pub_dt_div"><span>多选题:</span></div>
<div> <div>
<span v-if="dxs_fractions == 10">全部答对</span> <span v-if="dxs_fractions == 10">全部答对</span>
<span v-if="dxs_fractions != 10" <span v-if="dxs_fractions != 10">答对{{ dxs_fractions }}道题</span>
>答对{{ dxs_fractions }}道题</span <span v-if="dxs_fractions != 10">答错{{ 5 - dxs_fractions }}道题</span>
>
<span v-if="dxs_fractions != 10"
>答错{{ 5 - dxs_fractions }}道题</span
>
</div> </div>
</div> </div>
<div style="margin-top: 10px"> <div style="margin-top: 10px">
<div class="pub_dt_div"><span>判断题:</span></div> <div class="pub_dt_div"><span>判断题:</span></div>
<div> <div>
<span v-if="pd_fractions == 10">全部答对</span> <span v-if="pd_fractions == 10">全部答对</span>
<span v-if="pd_fractions != 10" <span v-if="pd_fractions != 10">答对{{ pd_fractions }}道题</span>
>答对{{ pd_fractions }}道题</span <span v-if="pd_fractions != 10">答错{{ 5 - pd_fractions }}道题</span>
>
<span v-if="pd_fractions != 10"
>答错{{ 5 - pd_fractions }}道题</span
>
</div> </div>
</div> </div>
</div> </div>
...@@ -233,31 +173,19 @@ ...@@ -233,31 +173,19 @@
</div> </div>
<div class="pub-div"> <div class="pub-div">
<div class="tit-div"> <div class="tit-div">
<span>(一)单选题</span <span>(一)单选题</span><span class="pub-span">{{ '(共' + arr_single.length + '题,每题' + single_score + '分,选错不得分)'
><span class="pub-span">{{'(共'+arr_single.length+'题,每题'+single_score+'分,选错不得分)'}}</span> }}</span>
</div> </div>
<div class="tm-xx"> <div class="tm-xx">
<div v-for="(item, index) in arr_single" class="tm-div"> <div v-for="(item, index) in arr_single" class="tm-div">
<div> <div>
<i <i class="el-icon-check pub_i1" v-if="item.type == 'true'"></i>
class="el-icon-check pub_i1" <i class="el-icon-close pub_i2" v-if="item.type == 'false'"></i>
v-if="item.type == 'true'"
></i>
<i
class="el-icon-close pub_i2"
v-if="item.type == 'false'"
></i>
<span>{{ index + 1 + ": " + item.title }}</span> <span>{{ index + 1 + ": " + item.title }}</span>
</div> </div>
<div class="xx-div"> <div class="xx-div">
<div v-for="(items, indexs) in item.content" class="xx-dic"> <div v-for="(items, indexs) in item.content" class="xx-dic">
<el-radio <el-radio disabled v-model="item._correct" :label="items" :key="indexs">{{ items }}</el-radio>
disabled
v-model="item._correct"
:label="items"
:key="indexs"
>{{ items }}</el-radio
>
</div> </div>
<div v-if="item.type == 'false'" class="zqxx"> <div v-if="item.type == 'false'" class="zqxx">
<span style="color: #00e209">正确选项:</span> <span style="color: #00e209">正确选项:</span>
...@@ -271,41 +199,24 @@ ...@@ -271,41 +199,24 @@
</div> </div>
<div class="pub-div"> <div class="pub-div">
<div class="tit-div"> <div class="tit-div">
<span>(二)多选题</span <span>(二)多选题</span><span class="pub-span">{{ '(共' + arr_multiple.length + '题,每题' + multiple_score +
><span class="pub-span">{{'(共'+arr_multiple.length+'题,每题'+multiple_score+'分,选错不得分)'}}</span> '分,选错不得分)' }}</span>
</div> </div>
<div class="tm-xx"> <div class="tm-xx">
<div v-for="(item, index) in arr_multiple" class="tm-div"> <div v-for="(item, index) in arr_multiple" class="tm-div">
<div> <div>
<i <i class="el-icon-check pub_i1" v-if="item.type == 'true'"></i>
class="el-icon-check pub_i1" <i class="el-icon-close pub_i2" v-if="item.type == 'false'"></i>
v-if="item.type == 'true'"
></i>
<i
class="el-icon-close pub_i2"
v-if="item.type == 'false'"
></i>
<span>{{ index + 1 + ": " + item.title }}</span> <span>{{ index + 1 + ": " + item.title }}</span>
</div> </div>
<div class="xx-div"> <div class="xx-div">
<div v-for="(items, indexs) in item.content" class="xx-dic"> <div v-for="(items, indexs) in item.content" class="xx-dic">
<el-checkbox <el-checkbox disabled v-model="item._correct" :label="items" :key="indexs">{{ items }}</el-checkbox>
disabled
v-model="item._correct"
:label="items"
:key="indexs"
>{{ items }}</el-checkbox
>
</div> </div>
</div> </div>
<div v-if="item.type == 'false'" class="zqxx"> <div v-if="item.type == 'false'" class="zqxx">
<span style="color: #00e209">正确选项:</span> <span style="color: #00e209">正确选项:</span>
<el-checkbox <el-checkbox disabled v-for="(it, index_it) in item.correct" :key="index_it">{{ it }}</el-checkbox>
disabled
v-for="(it, index_it) in item.correct"
:key="index_it"
>{{ it }}</el-checkbox
>
</div> </div>
</div> </div>
</div> </div>
...@@ -313,30 +224,18 @@ ...@@ -313,30 +224,18 @@
<div class="pub-div"> <div class="pub-div">
<div class="tit-div"> <div class="tit-div">
<span>(三)判断题</span> <span>(三)判断题</span>
<span class="pub-span">{{'(共'+arr_judge.length+'题,每题'+judge_score+'分,选错不得分)'}}</span> <span class="pub-span">{{ '(共' + arr_judge.length + '题,每题' + judge_score + '分,选错不得分)' }}</span>
</div> </div>
<div class="tm-xx"> <div class="tm-xx">
<div v-for="(item, index) in arr_judge" class="tm-div"> <div v-for="(item, index) in arr_judge" class="tm-div">
<div> <div>
<i <i class="el-icon-check pub_i1" v-if="item.type == 'true'"></i>
class="el-icon-check pub_i1" <i class="el-icon-close pub_i2" v-if="item.type == 'false'"></i>
v-if="item.type == 'true'"
></i>
<i
class="el-icon-close pub_i2"
v-if="item.type == 'false'"
></i>
<span>{{ index + 1 + ": " + item.title }}</span> <span>{{ index + 1 + ": " + item.title }}</span>
</div> </div>
<div class="xx-div"> <div class="xx-div">
<div v-for="(items, indexs) in item.content" class="xx-dic"> <div v-for="(items, indexs) in item.content" class="xx-dic">
<el-radio <el-radio disabled v-model="item._correct" :label="items" :key="indexs">{{ items }}</el-radio>
disabled
v-model="item._correct"
:label="items"
:key="indexs"
>{{ items }}</el-radio
>
</div> </div>
</div> </div>
<div v-if="item.type == 'false'" class="zqxx"> <div v-if="item.type == 'false'" class="zqxx">
...@@ -346,153 +245,96 @@ ...@@ -346,153 +245,96 @@
}}</el-radio> }}</el-radio>
</div> </div>
<span style="color: #0a8dea">错题正确描述:</span> <span style="color: #0a8dea">错题正确描述:</span>
<span style="color: #0a8dea">{{item.remark}}</span> <span style="color: #0a8dea">{{ item.remark }}</span>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<el-dialog <el-dialog title="新增试卷" :visible.sync="dialogVisible_sj" center width="550px">
title="新增试卷" <span style="color: red;font-size: 17px;margin-left: 200px;">{{ '当前总分:' + sum_zfs }}</span>
:visible.sync="dialogVisible_sj" <el-form style="margin-top:10px" ref="form" :model="form_add_type" :ref="form_add_type" label-width="100px">
center
width="550px"
>
<span style="color: red;font-size: 17px;margin-left: 200px;">{{'当前总分:'+sum_zfs}}</span>
<el-form
style="margin-top:10px"
ref="form"
:model="form_add_type"
:ref="form_add_type"
label-width="100px"
>
<el-form-item label="试卷名称:" style="text-align: center"> <el-form-item label="试卷名称:" style="text-align: center">
<el-input v-model="form_add_type.name"></el-input> <el-input v-model="form_add_type.name"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="时间设置:" style="text-align: center"> <el-form-item label="时间设置:" style="text-align: center">
<el-date-picker <el-date-picker v-model="form_add_type.time_qj" type="datetimerange" value-format="yyyy-MM-dd HH:mm:ss"
v-model="form_add_type.time_qj" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期">
type="datetimerange"
value-format="yyyy-MM-dd HH:mm:ss"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="单选题:" style="text-align: center"> <el-form-item label="单选题:" style="text-align: center">
<el-col class="line" :span="6">题数量:</el-col> <el-col class="line" :span="6">题数量:</el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item <el-form-item prop="singleNum" :rules="[
prop="singleNum"
:rules="[
{ required: true, message: '题数不能为空' }, { required: true, message: '题数不能为空' },
{ type: 'number', message: '题数必须为数字值' }, { type: 'number', message: '题数必须为数字值' },
]" ]">
> <el-input type="singleNum" v-model.number="form_add_type.singleNum"></el-input>
<el-input
type="singleNum"
v-model.number="form_add_type.singleNum"
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col class="line" :span="6">分值:</el-col> <el-col class="line" :span="6">分值:</el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item <el-form-item prop="singlePointValue" :rules="[
prop="singlePointValue"
:rules="[
{ required: true, message: '分值不能为空' }, { required: true, message: '分值不能为空' },
{ type: 'number', message: '分值必须为数字值' }, { type: 'number', message: '分值必须为数字值' },
]" ]">
> <el-input type="singlePointValue" v-model.number="form_add_type.singlePointValue"></el-input>
<el-input
type="singlePointValue"
v-model.number="form_add_type.singlePointValue"
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-form-item> </el-form-item>
<el-form-item label="多选题:" style="text-align: center"> <el-form-item label="多选题:" style="text-align: center">
<el-col class="line" :span="6">题数量:</el-col> <el-col class="line" :span="6">题数量:</el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item <el-form-item prop="multiNum" :rules="[
prop="multiNum"
:rules="[
{ required: true, message: '题数不能为空' }, { required: true, message: '题数不能为空' },
{ type: 'number', message: '题数必须为数字值' }, { type: 'number', message: '题数必须为数字值' },
]" ]">
> <el-input type="multiNum" v-model.number="form_add_type.multiNum"></el-input>
<el-input
type="multiNum"
v-model.number="form_add_type.multiNum"
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col class="line" :span="6">分值:</el-col> <el-col class="line" :span="6">分值:</el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item <el-form-item prop="multiPointValue" :rules="[
prop="multiPointValue"
:rules="[
{ required: true, message: '分值不能为空' }, { required: true, message: '分值不能为空' },
{ type: 'number', message: '分值必须为数字值' }, { type: 'number', message: '分值必须为数字值' },
]" ]">
> <el-input type="multiPointValue" v-model.number="form_add_type.multiPointValue"></el-input>
<el-input
type="multiPointValue"
v-model.number="form_add_type.multiPointValue"
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-form-item> </el-form-item>
<el-form-item label="判断题:" style="text-align: center"> <el-form-item label="判断题:" style="text-align: center">
<el-col class="line" :span="6">题数量:</el-col> <el-col class="line" :span="6">题数量:</el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item <el-form-item prop="judgeNum" :rules="[
prop="judgeNum"
:rules="[
{ required: true, message: '题数不能为空' }, { required: true, message: '题数不能为空' },
{ type: 'number', message: '题数必须为数字值' }, { type: 'number', message: '题数必须为数字值' },
]" ]">
> <el-input type="judgeNum" v-model.number="form_add_type.judgeNum"></el-input>
<el-input
type="judgeNum"
v-model.number="form_add_type.judgeNum"
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col class="line" :span="6">分值:</el-col> <el-col class="line" :span="6">分值:</el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item <el-form-item prop="judgePointValue" :rules="[
prop="judgePointValue"
:rules="[
{ required: true, message: '分值不能为空' }, { required: true, message: '分值不能为空' },
{ type: 'number', message: '分值必须为数字值' }, { type: 'number', message: '分值必须为数字值' },
]" ]">
> <el-input type="judgePointValue" v-model.number="form_add_type.judgePointValue"></el-input>
<el-input
type="judgePointValue"
v-model.number="form_add_type.judgePointValue"
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="mini" @click="dialogVisible_sj = false" <el-button size="mini" @click="dialogVisible_sj = false">取 消</el-button>
>取 消</el-button <el-button size="mini" type="primary" @click="sj_submit()" :disabled="sum_zfs != 100">确 定</el-button>
>
<el-button size="mini" type="primary" @click="sj_submit()"
:disabled="sum_zfs!=100"
>确 定</el-button
>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { get, post, startLoading, endLoading,delete_util } from "../../util/http_util"; import { get, post, startLoading, endLoading, delete_util } from "../../util/http_util";
import {} from "../../util/data_util"; import { } from "../../util/data_util";
import { queryExame, createExame, removeExame } from '../../api/xxxl/llkh';
export default { export default {
data() { data() {
return { return {
...@@ -526,16 +368,16 @@ export default { ...@@ -526,16 +368,16 @@ export default {
judgeNum: "", judgeNum: "",
judgePointValue: "", judgePointValue: "",
}, },
single_score:'', single_score: '',
multiple_score:'', multiple_score: '',
judge_score:'', judge_score: '',
multipleSelection:[], multipleSelection: [],
}; };
}, },
methods: { methods: {
handleSelectionChange(item){ handleSelectionChange(item) {
this.multipleSelection = []; this.multipleSelection = [];
item.forEach((item)=>{ item.forEach((item) => {
this.multipleSelection.push(item.id); this.multipleSelection.push(item.id);
}) })
// this.multipleSelection = item; // this.multipleSelection = item;
...@@ -545,32 +387,28 @@ export default { ...@@ -545,32 +387,28 @@ export default {
// this.delete(paramDatas); // this.delete(paramDatas);
}, },
//批量删除试卷 //批量删除试卷
delete_sj(){ delete_sj() {
this.delete(this.multipleSelection); this.delete(this.multipleSelection);
}, },
//删除题目 //删除题目
handleDelete(item) { handleDelete(item) {
this.delete([item.id]); this.delete([item.id]);
}, },
delete(paramDatas){ delete(paramDatas) {
let _this = this; let _this = this;
if(paramDatas.length==0){ if (paramDatas.length == 0) {
this.$message({ this.$message({
message: "无删除项,请选择!!!", message: "无删除项,请选择!!!",
type: "warning", type: "warning",
}); });
}else{ } else {
this.$confirm("此操作将永久删除该记录, 是否继续?", "提示", { this.$confirm("此操作将永久删除该记录, 是否继续?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
}) })
.then(() => { .then(() => {
delete_util( removeExame(paramDatas).then((data) => {
"api_exame/user/questionBank/removeExame",
paramDatas
)
.then((data) => {
this.$message({ this.$message({
type: "success", type: "success",
message: "删除成功", message: "删除成功",
...@@ -629,31 +467,8 @@ export default { ...@@ -629,31 +467,8 @@ export default {
) { ) {
this.$message.warning("试卷名称或时间都不能为空!"); this.$message.warning("试卷名称或时间都不能为空!");
} else { } else {
get( createExame(this.form_add_type.name, 10, this.form_add_type.time_qj[0], this.form_add_type.time_qj[1], this.form_add_type.singleNum, this.form_add_type.multiNum, this.form_add_type.judgeNum,
"api_exame/user/questionBank/createExame?name=" + this.form_add_type.singlePointValue, this.form_add_type.multiPointValue, this.form_add_type.judgePointValue).then((data) => {
this.form_add_type.name +
"&suggestTime=" +
10 +
"&startTime=" +
this.form_add_type.time_qj[0] +
"&endTime=" +
this.form_add_type.time_qj[1] +
"&singleNum=" +
this.form_add_type.singleNum +
"&multiNum=" +
this.form_add_type.multiNum +
"&judgeNum=" +
this.form_add_type.judgeNum +
"&singlePointValue=" +
this.form_add_type.singlePointValue +
"&multiPointValue=" +
this.form_add_type.multiPointValue +
"&judgePointValue=" +
this.form_add_type.judgePointValue
// paramDatas
)
.then((data) => {
this.dialogVisible_sj = false; this.dialogVisible_sj = false;
this.$message.success("试卷新增成功!"); this.$message.success("试卷新增成功!");
this.handleCurrentChange_qw(1); this.handleCurrentChange_qw(1);
...@@ -669,16 +484,7 @@ export default { ...@@ -669,16 +484,7 @@ export default {
let _this = this; let _this = this;
// startLoading(); // startLoading();
_this.tableData = []; _this.tableData = [];
get( queryExame(pageNum, _this.pageRow, this.$store.state.userInfo.account).then((data) => {
"api_exame/user/questionBank/queryExame?pageNum=" +
pageNum +
"&pageSize=" +
_this.pageRow +
"&account=" +
this.$store.state.userInfo.account
// paramDatas
)
.then((data) => {
if (data.list.length > 0) { if (data.list.length > 0) {
_this.tableData = data.list; _this.tableData = data.list;
_this.totals = data.total; _this.totals = data.total;
...@@ -729,7 +535,7 @@ export default { ...@@ -729,7 +535,7 @@ export default {
_correct: item.correct, _correct: item.correct,
correct: item.correct.split("&|&"), correct: item.correct.split("&|&"),
content: item.content.split("&|&"), content: item.content.split("&|&"),
remark:item.remark, remark: item.remark,
}); });
}); });
_this.show_s = false; _this.show_s = false;
...@@ -739,11 +545,11 @@ export default { ...@@ -739,11 +545,11 @@ export default {
mounted() { mounted() {
this.handleCurrentChange_qw(1); this.handleCurrentChange_qw(1);
}, },
computed:{ computed: {
sum_zfs(){ sum_zfs() {
let sum = this.form_add_type.singleNum*this.form_add_type.singlePointValue+ let sum = this.form_add_type.singleNum * this.form_add_type.singlePointValue +
this.form_add_type.multiNum*this.form_add_type.multiPointValue+ this.form_add_type.multiNum * this.form_add_type.multiPointValue +
this.form_add_type.judgeNum*this.form_add_type.judgePointValue; this.form_add_type.judgeNum * this.form_add_type.judgePointValue;
return sum return sum
} }
}, },
...@@ -757,27 +563,33 @@ export default { ...@@ -757,27 +563,33 @@ export default {
overflow: hidden; overflow: hidden;
background-image: url("../../assets/img/xxxl/01.png"); background-image: url("../../assets/img/xxxl/01.png");
background-size: 100% 100%; background-size: 100% 100%;
.table_lb { .table_lb {
width: 100%; width: 100%;
height: 100%; height: 100%;
.top-div { .top-div {
width: calc(100% - 40px); width: calc(100% - 40px);
height: 80px; height: 80px;
margin-left: 20px; margin-left: 20px;
margin-right: 20px; margin-right: 20px;
.el-select { .el-select {
float: left; float: left;
margin-left: 20px; margin-left: 20px;
width: 150px !important; width: 150px !important;
.el-input { .el-input {
width: unset !important; width: unset !important;
} }
} }
.el-input { .el-input {
float: left; float: left;
width: 225px; width: 225px;
margin-left: 0px; margin-left: 0px;
margin-top: 30px; margin-top: 30px;
.el-input__inner { .el-input__inner {
background: none; background: none;
color: #ffff; color: #ffff;
...@@ -785,6 +597,7 @@ export default { ...@@ -785,6 +597,7 @@ export default {
box-shadow: 0 0 10px #1b6097; box-shadow: 0 0 10px #1b6097;
} }
} }
.button-discuss { .button-discuss {
margin-top: 35px; margin-top: 35px;
width: 100px; width: 100px;
...@@ -799,6 +612,7 @@ export default { ...@@ -799,6 +612,7 @@ export default {
background-size: 100% 100%; background-size: 100% 100%;
margin-left: 20px; margin-left: 20px;
} }
.xjzt-div { .xjzt-div {
margin-top: 35px; margin-top: 35px;
float: right; float: right;
...@@ -816,12 +630,14 @@ export default { ...@@ -816,12 +630,14 @@ export default {
background-size: 100% 100%; background-size: 100% 100%;
} }
} }
.bottom-div { .bottom-div {
width: calc(100% - 40px); width: calc(100% - 40px);
height: calc(100% - 115px); height: calc(100% - 115px);
box-shadow: 0 0 10px #1b6097; box-shadow: 0 0 10px #1b6097;
margin-left: 20px; margin-left: 20px;
margin-right: 20px; margin-right: 20px;
.table-div { .table-div {
width: 100%; width: 100%;
height: calc(100% - 70px); height: calc(100% - 70px);
...@@ -840,7 +656,7 @@ export default { ...@@ -840,7 +656,7 @@ export default {
background-size: 100% 100%; background-size: 100% 100%;
} }
.el-table th{ .el-table th {
background-color: transparent; background-color: transparent;
} }
...@@ -893,6 +709,7 @@ export default { ...@@ -893,6 +709,7 @@ export default {
} }
} }
} }
.sjtms { .sjtms {
width: calc(100% - 60px) !important; width: calc(100% - 60px) !important;
height: calc(100% - 50px) !important; height: calc(100% - 50px) !important;
...@@ -900,11 +717,13 @@ export default { ...@@ -900,11 +717,13 @@ export default {
background-color: white; background-color: white;
position: relative; position: relative;
border-radius: 7px; border-radius: 7px;
.fh { .fh {
position: absolute; position: absolute;
right: 50px; right: 50px;
top: 20px; top: 20px;
} }
.pub-class-div { .pub-class-div {
width: 80%; width: 80%;
margin-left: 10%; margin-left: 10%;
...@@ -916,55 +735,69 @@ export default { ...@@ -916,55 +735,69 @@ export default {
word-break: break-all; word-break: break-all;
white-space: normal; white-space: normal;
line-height: 23px; line-height: 23px;
.tm_dt { .tm_dt {
width: 100%; width: 100%;
height: 100%; height: 100%;
.title-class { .title-class {
text-align: center; text-align: center;
color: black; color: black;
.title-div { .title-div {
font-size: 22px; font-size: 22px;
font-weight: 800; font-weight: 800;
} }
} }
.pub_dt_div { .pub_dt_div {
width: 70px; width: 70px;
float: left; float: left;
} }
.pub-div { .pub-div {
.tit-div { .tit-div {
font-size: 19px; font-size: 19px;
.pub-span { .pub-span {
font-size: 13px; font-size: 13px;
} }
} }
.tm-xx { .tm-xx {
margin-top: 20px; margin-top: 20px;
.tm-div { .tm-div {
margin-left: 40px; margin-left: 40px;
margin-right: 30px; margin-right: 30px;
.xx-div { .xx-div {
margin-left: 30px; margin-left: 30px;
margin-top: 13px; margin-top: 13px;
margin-right: 30px; margin-right: 30px;
.xx-dic { .xx-dic {
width: 100%; width: 100%;
margin-bottom: 20px; margin-bottom: 20px;
.el-radio__label { .el-radio__label {
word-break: break-all; word-break: break-all;
white-space: normal; white-space: normal;
line-height: 23px; line-height: 23px;
} }
.el-checkbox__label { .el-checkbox__label {
word-break: break-all; word-break: break-all;
white-space: normal; white-space: normal;
line-height: 23px; line-height: 23px;
} }
.is-checked .el-radio__label { .is-checked .el-radio__label {
color: #00c546; color: #00c546;
font-weight: 900; font-weight: 900;
font-size: 16px; font-size: 16px;
} }
.is-checked .el-checkbox__label { .is-checked .el-checkbox__label {
color: #00c546; color: #00c546;
font-weight: 900; font-weight: 900;
...@@ -976,30 +809,36 @@ export default { ...@@ -976,30 +809,36 @@ export default {
} }
} }
} }
.ckda { .ckda {
.pub_i1 { .pub_i1 {
color: #22ea00; color: #22ea00;
font-size: 25px; font-size: 25px;
} }
.pub_i2 { .pub_i2 {
color: red; color: red;
font-size: 25px; font-size: 25px;
} }
.xx-dic { .xx-dic {
.is-checked { .is-checked {
.el-radio__label { .el-radio__label {
color: #424242; color: #424242;
} }
.el-checkbox__label { .el-checkbox__label {
color: #424242; color: #424242;
} }
} }
} }
.zqxx { .zqxx {
.is-disabled { .is-disabled {
.el-radio__label { .el-radio__label {
color: #22ea00; color: #22ea00;
} }
.el-checkbox__label { .el-checkbox__label {
color: #22ea00; color: #22ea00;
} }
...@@ -1007,29 +846,36 @@ export default { ...@@ -1007,29 +846,36 @@ export default {
} }
} }
} }
.pub-class-div::-webkit-scrollbar-thumb { .pub-class-div::-webkit-scrollbar-thumb {
background: #cccccc; background: #cccccc;
} }
.pub-class-div::-webkit-scrollbar-track { .pub-class-div::-webkit-scrollbar-track {
background: #e4e4e4; background: #e4e4e4;
} }
} }
.el-dialog { .el-dialog {
.el-dialog__body{ .el-dialog__body {
padding: 0px 25px 18px; padding: 0px 25px 18px;
} }
.el-range-input { .el-range-input {
color: white; color: white;
background-color: transparent; background-color: transparent;
} }
.el-range-separator { .el-range-separator {
color: white; color: white;
} }
input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { input[type="number"]::-webkit-outer-spin-button {
-webkit-appearance: none; -webkit-appearance: none;
margin: 0; margin: 0;
} }
input[type="number"] { input[type="number"] {
-moz-appearance: textfield; -moz-appearance: textfield;
} }
......
...@@ -72,6 +72,7 @@ ...@@ -72,6 +72,7 @@
<script> <script>
import { delete_util, get, post } from '../../util/http_util' import { delete_util, get, post } from '../../util/http_util'
import { queryAttention, updateAttention, removeAttention, addAttention } from '../../api/sjgl/tsbj';
export default { export default {
data() { data() {
return { return {
...@@ -92,7 +93,7 @@ export default { ...@@ -92,7 +93,7 @@ export default {
methods: { methods: {
//查询数据 //查询数据
queryAttention() { queryAttention() {
get('api/rest/resource/queryAttention?pageNum=' + this.currentPage + '&pageSize=' + this.everySize).then(res => { queryAttention(this.currentPage, this.everySize).then(res => {
this.attentionList = res.list; this.attentionList = res.list;
this.total = res.totals; this.total = res.totals;
}).catch(err => { }).catch(err => {
...@@ -119,7 +120,7 @@ export default { ...@@ -119,7 +120,7 @@ export default {
//确定编辑数据 //确定编辑数据
defineEditAttention() { defineEditAttention() {
if (this.selectAttention.content) { if (this.selectAttention.content) {
post('api/rest/resource/updateAttention', this.selectAttention).then(res => { updateAttention(this.selectAttention).then(res => {
if (res == 1) { if (res == 1) {
this.$message.success('状态编辑成功!'); this.$message.success('状态编辑成功!');
this.dialogVisible = false; this.dialogVisible = false;
...@@ -142,7 +143,7 @@ export default { ...@@ -142,7 +143,7 @@ export default {
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
delete_util('api/rest/resource/removeAttention/' + item.id).then(res => { removeAttention(item.id).then(res => {
if (res == 1) { if (res == 1) {
this.$message.success('删除成功!'); this.$message.success('删除成功!');
this.queryAttention(); this.queryAttention();
...@@ -174,7 +175,7 @@ export default { ...@@ -174,7 +175,7 @@ export default {
//确定新增关注 //确定新增关注
defineAddAttention() { defineAddAttention() {
if (this.newAttention.content) { if (this.newAttention.content) {
post('api/rest/resource/addAttention', this.newAttention).then(res => { addAttention(this.newAttention).then(res => {
if (res == 1) { if (res == 1) {
this.$message.success('新增成功!'); this.$message.success('新增成功!');
this.dialogVisible = false; this.dialogVisible = false;
...@@ -194,7 +195,7 @@ export default { ...@@ -194,7 +195,7 @@ export default {
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
post('api/rest/resource/updateAttention', { visualizing: item.visualizing, id: item.id }).then(res => { updateAttention({ visualizing: item.visualizing, id: item.id }).then(res => {
if (res == 1) { if (res == 1) {
this.$message.success('状态编辑成功!'); this.$message.success('状态编辑成功!');
this.queryAttention(); this.queryAttention();
......
...@@ -35,8 +35,8 @@ ...@@ -35,8 +35,8 @@
</el-table-column> </el-table-column>
<el-table-column label="文件名" align="center" show-overflow-tooltip> <el-table-column label="文件名" align="center" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
<span><span <span><span style="font-size:12px;color:red;">{{ scope.row.stick != null ? '[置顶]' : ''
style="font-size:12px;color:red;">{{ scope.row.stick != null ? '[置顶]' : '' }}</span>{{ scope.row.originName }}</span> }}</span>{{ scope.row.originName }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="createTime" label="日期" align="center"> <el-table-column prop="createTime" label="日期" align="center">
...@@ -52,8 +52,8 @@ ...@@ -52,8 +52,8 @@
<el-button size="mini" type="danger" @click="deleteLiterature(scope.row)">删除</el-button> <el-button size="mini" type="danger" @click="deleteLiterature(scope.row)">删除</el-button>
<el-button size="mini" type="danger" @click="deleteLiteratureImg(scope.row)" <el-button size="mini" type="danger" @click="deleteLiteratureImg(scope.row)"
:disabled="scope.row.image == null || scope.row.image == '' ? true : false">删除图片</el-button> :disabled="scope.row.image == null || scope.row.image == '' ? true : false">删除图片</el-button>
<el-button size="mini" type="success" <el-button size="mini" type="success" @click="top(scope.row)">{{ scope.row.stick == null ?
@click="top(scope.row)">{{ scope.row.stick == null ? '置顶' : '取消置顶' }}</el-button> '置顶' : '取消置顶' }}</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -106,8 +106,8 @@ ...@@ -106,8 +106,8 @@
<el-form ref="form" label-width="120px"> <el-form ref="form" label-width="120px">
<el-form-item label="转移到:"> <el-form-item label="转移到:">
<el-radio-group v-model="radio"> <el-radio-group v-model="radio">
<el-radio v-for="(item, index) in transferRadios" :label="item.id" border <el-radio v-for="(item, index) in transferRadios" :label="item.id" border :key="index">{{
:key="index">{{ item.name }}</el-radio> item.name }}</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item align="center"> <el-form-item align="center">
...@@ -582,6 +582,10 @@ import navs_tm from "../xxxl/tmlb.vue"; ...@@ -582,6 +582,10 @@ import navs_tm from "../xxxl/tmlb.vue";
import navs_sj from "./sjlb.vue"; import navs_sj from "./sjlb.vue";
import export_doc_util from '../../util/export_doc_util'; import export_doc_util from '../../util/export_doc_util';
import { uuid } from "../../util/data_util"; import { uuid } from "../../util/data_util";
import {
queryLiterature, uploadLiterature, removeLiterature, addPictureToLiterature, bulkStickLiterature, removeLiteratureByBatch, bulkChangeLiteratureFolder,
updateLiteratureFolder, queryLiteratureFolder, previewPdf
} from "../../api/xxxl/llxx"
export default { export default {
name: 'xxxlgl', name: 'xxxlgl',
inject: ['reload'], inject: ['reload'],
...@@ -716,10 +720,10 @@ export default { ...@@ -716,10 +720,10 @@ export default {
}, },
//查询上传的文件 //查询上传的文件
queryLiterature(pageNum, pageSize, title, type) { queryLiterature(pageNum, pageSize, title, type) {
let titleUrl = (title != '' && title != null) ? ('&origin_name=' + title) : ''; let titleUrl = title == '' ? null : title;
let typeUrl = (type != '' && type != null) ? ('&folder=' + type) : ''; let typeUrl = type == '' ? null : type;;
let type_stick = this.valueSelectFile_type == "1"; let type_stick = this.valueSelectFile_type == "1";
get('api/rest/document/queryLiterature?module=学习训练&stick=' + type_stick + '&pageNum=' + pageNum + '&pageSize=' + pageSize + titleUrl + typeUrl).then(res => { queryLiterature('学习训练', pageNum, pageSize, titleUrl, typeUrl, type_stick).then(res => {
this.literatureList = res.list; this.literatureList = res.list;
this.total = res.totals; this.total = res.totals;
this.currentPage = pageNum; this.currentPage = pageNum;
...@@ -736,7 +740,7 @@ export default { ...@@ -736,7 +740,7 @@ export default {
fd.append("folder", this.value); fd.append("folder", this.value);
fd.append("module", '学习训练'); fd.append("module", '学习训练');
this.imgList.length == 1 && fd.append('image', this.imgList[0].raw); this.imgList.length == 1 && fd.append('image', this.imgList[0].raw);
fileUpload('api/rest/document/uploadLiterature', fd).then(res => { uploadLiterature(fd).then(res => {
if (res == 1) { if (res == 1) {
this.$message.success('上传成功!'); this.$message.success('上传成功!');
this.valueSelectFile_type = '2'; this.valueSelectFile_type = '2';
...@@ -779,11 +783,15 @@ export default { ...@@ -779,11 +783,15 @@ export default {
}, },
//以pdf形式预览 //以pdf形式预览
viewLiterature(item) { viewLiterature(item) {
window.open('api/rest/document/viewLiterature/' + item.folder + '/' + item.name); previewPdf('LiteraturePDF', item.name);
}, },
//下载文件 //下载文件
downFile(item) { downFile(item) {
download('api/rest/document/downloadLiterature/' + item.folder + '/' + item.name, item.originName); if (item.path) {
window.open(item.path);
} else {
alert('暂未找到文件!');
}
}, },
//删除文件 //删除文件
deleteLiterature(item) { deleteLiterature(item) {
...@@ -792,7 +800,7 @@ export default { ...@@ -792,7 +800,7 @@ export default {
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
delete_util('api/rest/document/removeLiterature?folder=' + item.folder + '&name=' + item.name).then(res => { removeLiterature(item.folder, item.name).then(res => {
if (res == 1) { if (res == 1) {
this.$message.success('删除成功!'); this.$message.success('删除成功!');
this.queryLiterature(this.currentPage, this.everySize, this.input, this.valueSelect); this.queryLiterature(this.currentPage, this.everySize, this.input, this.valueSelect);
...@@ -831,7 +839,7 @@ export default { ...@@ -831,7 +839,7 @@ export default {
let fd = new FormData(); let fd = new FormData();
fd.append('name', item.name); fd.append('name', item.name);
fd.append('folder', item.folder); fd.append('folder', item.folder);
fileUpload('api/rest/document/addPictureToLiterature', fd).then(res => { addPictureToLiterature(fd).then(res => {
if (res == 1) { if (res == 1) {
this.$message.success('图片删除成功!'); this.$message.success('图片删除成功!');
this.dialogVisibleImg = false; this.dialogVisibleImg = false;
...@@ -872,7 +880,7 @@ export default { ...@@ -872,7 +880,7 @@ export default {
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
delete_util('api/rest/document/removeLiteratureByBatch', this.multipleSelection).then(res => { removeLiteratureByBatch(this.multipleSelection).then(res => {
if (res == this.multipleSelection.length) { if (res == this.multipleSelection.length) {
this.$message.success('删除成功!'); this.$message.success('删除成功!');
this.queryLiterature(this.currentPage, this.everySize, this.input, this.valueSelect); this.queryLiterature(this.currentPage, this.everySize, this.input, this.valueSelect);
...@@ -917,7 +925,7 @@ export default { ...@@ -917,7 +925,7 @@ export default {
obj.oldFolder = res.bucket; obj.oldFolder = res.bucket;
list.push(obj); list.push(obj);
}) })
post('api/rest/document/bulkChangeLiteratureFolder', list).then(res => { bulkChangeLiteratureFolder(list).then(res => {
if (res == list.length) { if (res == list.length) {
this.$message.success('转移成功!'); this.$message.success('转移成功!');
this.queryLiterature(this.currentPage, this.everySize, this.input, this.valueSelect); this.queryLiterature(this.currentPage, this.everySize, this.input, this.valueSelect);
...@@ -976,7 +984,7 @@ export default { ...@@ -976,7 +984,7 @@ export default {
fd.append('name', this.selectFile.name); fd.append('name', this.selectFile.name);
fd.append('folder', this.selectFile.folder); fd.append('folder', this.selectFile.folder);
fd.append('file', this.fileListImg[0].raw); fd.append('file', this.fileListImg[0].raw);
fileUpload('api/rest/document/addPictureToLiterature', fd).then(res => { addPictureToLiterature(fd).then(res => {
if (res == 1) { if (res == 1) {
this.$message.success('新增图片成功!'); this.$message.success('新增图片成功!');
this.dialogVisibleImg = false; this.dialogVisibleImg = false;
...@@ -1012,7 +1020,7 @@ export default { ...@@ -1012,7 +1020,7 @@ export default {
obj.id = row.id; obj.id = row.id;
obj.stick = row.stick == null ? 1 : 0; obj.stick = row.stick == null ? 1 : 0;
let message = obj.stick == 1 ? '置顶' : '取消置顶'; let message = obj.stick == 1 ? '置顶' : '取消置顶';
post('api/rest/document/bulkStickLiterature', [obj]).then(res => { bulkStickLiterature([obj]).then(res => {
if (res == 1) { if (res == 1) {
this.search(); this.search();
this.$message.success(message + '成功!'); this.$message.success(message + '成功!');
...@@ -1034,7 +1042,7 @@ export default { ...@@ -1034,7 +1042,7 @@ export default {
tmpList.push(obj); tmpList.push(obj);
}) })
});; });;
post('api/rest/document/updateLiteratureFolder', tmpList).then(res => { updateLiteratureFolder(tmpList).then(res => {
if (res == tmpList.length) { if (res == tmpList.length) {
this.$message.success('模块名称修改成功!'); this.$message.success('模块名称修改成功!');
this.dialogVisibleModule = false; this.dialogVisibleModule = false;
...@@ -1705,7 +1713,7 @@ export default { ...@@ -1705,7 +1713,7 @@ export default {
//#region +++++++++++++++++++++++++++++++理论学习+++++++++++++++++++++++++++++++ //#region +++++++++++++++++++++++++++++++理论学习+++++++++++++++++++++++++++++++
//查询板块名称 //查询板块名称
get('api/rest/document/queryLiteratureFolder?module=学习训练').then(res => { queryLiteratureFolder('学习训练').then(res => {
this.moduleList = res; this.moduleList = res;
this.transferRadios = res; this.transferRadios = res;
let arrListModule = [ let arrListModule = [
...@@ -2851,4 +2859,5 @@ export default { ...@@ -2851,4 +2859,5 @@ export default {
.el-tabs__content { .el-tabs__content {
height: calc(100% - 60px); height: calc(100% - 60px);
} }
}</style> }
\ No newline at end of file </style>
\ No newline at end of file
...@@ -331,6 +331,7 @@ import { ...@@ -331,6 +331,7 @@ import {
isDuringDate, isDuringDate,
} from "../../util/http_util"; } from "../../util/http_util";
import { } from "../../util/data_util"; import { } from "../../util/data_util";
import { queryExame, createRecord, queryRecord, queryDetails } from '../../api/xxxl/llkh';
export default { export default {
data() { data() {
return { return {
...@@ -387,7 +388,7 @@ export default { ...@@ -387,7 +388,7 @@ export default {
}, },
ckjl(item) { ckjl(item) {
let _this = this; let _this = this;
post("api_exame/admin/TRecordDetails/queryDetails", { queryDetails({
erId: item.id, erId: item.id,
}) })
.then((data) => { .then((data) => {
...@@ -679,7 +680,7 @@ export default { ...@@ -679,7 +680,7 @@ export default {
tRecordDetails: arr_tRecordDetails, tRecordDetails: arr_tRecordDetails,
}; };
// return // return
post("api_exame/admin/TExameRecord/createRecord", paramDatas) createRecord(paramDatas)
.then((data) => { .then((data) => {
_this.handleCurrentChange_qw(1); _this.handleCurrentChange_qw(1);
if (data != 1) { if (data != 1) {
...@@ -747,17 +748,7 @@ export default { ...@@ -747,17 +748,7 @@ export default {
let _this = this; let _this = this;
startLoading(); startLoading();
_this.tableData = []; _this.tableData = [];
get( queryExame(pageNum, _this.pageRow, _this.$store.state.userInfo.account, _this.input).then(data => {
"api_exame/user/questionBank/queryExame?pageNum=" +
pageNum +
"&pageSize=" +
_this.pageRow +
"&account=" +
this.$store.state.userInfo.account +
"&name=" +
this.input
)
.then((data) => {
if (data.list.length > 0) { if (data.list.length > 0) {
data.list.forEach((item) => { data.list.forEach((item) => {
let types = isDuringDate(item.limitStartTime, item.limitEndTime); // 1时间没到,2时间已过,3可以考试 let types = isDuringDate(item.limitStartTime, item.limitEndTime); // 1时间没到,2时间已过,3可以考试
...@@ -804,8 +795,7 @@ export default { ...@@ -804,8 +795,7 @@ export default {
pageNum: pagenum, pageNum: pagenum,
pageRow: this.pageRow_lsjl, pageRow: this.pageRow_lsjl,
}; };
post("api_exame/admin/TExameRecord/queryRecord", paramDatas) queryRecord(paramDatas).then((data) => {
.then((data) => {
if (data.list.length > 0) { if (data.list.length > 0) {
this.dialogVisible_lsjl = true; this.dialogVisible_lsjl = true;
this.tableData_history = data.list; this.tableData_history = data.list;
...@@ -843,6 +833,7 @@ export default { ...@@ -843,6 +833,7 @@ export default {
// background-image: url("../../assets/img/xxxl/01.png"); // background-image: url("../../assets/img/xxxl/01.png");
// background-size: 100% 100%; // background-size: 100% 100%;
color: white; color: white;
.table_lb { .table_lb {
width: 100%; width: 100%;
height: 100%; height: 100%;
......
...@@ -22,16 +22,14 @@ ...@@ -22,16 +22,14 @@
<div class="businessTheory-content"> <div class="businessTheory-content">
<div class="content-card bk-animation" v-for="(item, index) in businessTheory"> <div class="content-card bk-animation" v-for="(item, index) in businessTheory">
<div class="card-title"> <div class="card-title">
<!-- <img :src="titleImg[0]" alt=""> -->
<span v-text="item.title"></span> <span v-text="item.title"></span>
<!-- <img :src="titleImg[1]" alt=""> -->
<span class="el-icon-more" @click="showList(item)"></span> <span class="el-icon-more" @click="showList(item)"></span>
</div> </div>
<div class="card-content"> <div class="card-content">
<div class="content-img"> <div class="content-img">
<div v-for="(item1, index1) in item.img"> <div v-for="(item1, index1) in item.img">
<img :src="LiteraturePictureUrl + item1.folder + '/' + item1.image" alt="" @click="viewLiterature(item1)" <img :src="item1.coverUrl" alt=""
@contextmenu.prevent.stop="showInfo(item1)" /> @click="viewLiterature(item1)" @contextmenu.prevent.stop="showInfo(item1)" />
</div> </div>
</div> </div>
<div class="content-list"> <div class="content-list">
...@@ -66,8 +64,8 @@ ...@@ -66,8 +64,8 @@
<div class="card-content"> <div class="card-content">
<div class="content-img"> <div class="content-img">
<div v-for="(item1, index1) in item.img"> <div v-for="(item1, index1) in item.img">
<img :src="LiteraturePictureUrl + item1.folder + '/' + item1.image" alt="" @click="viewLiterature(item1)" <img :src="item1.coverUrl" alt=""
@contextmenu.prevent.stop="showInfo(item1)" /> @click="viewLiterature(item1)" @contextmenu.prevent.stop="showInfo(item1)" />
</div> </div>
</div> </div>
<div class="content-list"> <div class="content-list">
...@@ -103,8 +101,8 @@ ...@@ -103,8 +101,8 @@
<div class="card-content"> <div class="card-content">
<div class="content-img"> <div class="content-img">
<div v-for="(item1, index1) in item.img"> <div v-for="(item1, index1) in item.img">
<img :src="LiteraturePictureUrl + item1.folder + '/' + item1.image" alt="" @click="viewLiterature(item1)" <img :src="item1.coverUrl" alt=""
@contextmenu.prevent.stop="showInfo(item1)" /> @click="viewLiterature(item1)" @contextmenu.prevent.stop="showInfo(item1)" />
</div> </div>
</div> </div>
<div class="content-list"> <div class="content-list">
...@@ -330,6 +328,7 @@ ...@@ -330,6 +328,7 @@
box-sizing: border-box; box-sizing: border-box;
overflow-y: hidden; overflow-y: hidden;
color: white; color: white;
.search { .search {
width: 100%; width: 100%;
height: 50px; height: 50px;
...@@ -1465,6 +1464,10 @@ import leftTitle from "../../assets/img/flfg/leftTitle.png"; ...@@ -1465,6 +1464,10 @@ import leftTitle from "../../assets/img/flfg/leftTitle.png";
import rightTitle from "../../assets/img/flfg/rightTitle.png"; import rightTitle from "../../assets/img/flfg/rightTitle.png";
import "animate.css"; import "animate.css";
import { LiteraturePictureUrl } from "../../api/publicUrl"; import { LiteraturePictureUrl } from "../../api/publicUrl";
import {
queryLiterature, queryLiteratureFolder, multiQueryLiterature, addRelatedInfo, addLiteratureLabel, queryCollectionFolder, addCollection,
addCollectionFolder, removeCollectionFolder, queryRecommendLiterature, searchLiterature, queryLiteratureById, previewPdf
} from "../../api/xxxl/llxx"
export default { export default {
data() { data() {
return { return {
...@@ -1593,15 +1596,7 @@ export default { ...@@ -1593,15 +1596,7 @@ export default {
}, },
//根据文本信息查询文件 //根据文本信息查询文件
searchLiterature() { searchLiterature() {
post( searchLiterature("学习训练", this.fulltextPagination.currentPage, this.fulltextPagination.everySize, this.input).then((res) => {
"api/rest/fulltext/searchLiterature?pageNum=" +
this.fulltextPagination.currentPage +
"&pageSize=" +
this.fulltextPagination.everySize +
"&module=学习训练",
this.input
)
.then((res) => {
res.list.forEach((item) => { res.list.forEach((item) => {
item.createTime = dateChangeFormat( item.createTime = dateChangeFormat(
"YYYY-mm-dd HH:MM:SS", "YYYY-mm-dd HH:MM:SS",
...@@ -1643,15 +1638,7 @@ export default { ...@@ -1643,15 +1638,7 @@ export default {
}, },
//查询上传的文件 //查询上传的文件
queryLiterature(pageNum, pageSize, title) { queryLiterature(pageNum, pageSize, title) {
get( queryLiterature("学习训练", pageNum, pageSize, title).then((res) => {
"api/rest/document/queryLiterature?module=学习训练&pageNum=" +
pageNum +
"&pageSize=" +
pageSize +
"&origin_name=" +
title
)
.then((res) => {
this.literatureList = res.list; this.literatureList = res.list;
this.total = res.totals; this.total = res.totals;
}) })
...@@ -1665,20 +1652,10 @@ export default { ...@@ -1665,20 +1652,10 @@ export default {
}, },
//以pdf形式预览 //以pdf形式预览
viewLiterature(item) { viewLiterature(item) {
window.open( previewPdf('LiteraturePDF', item.name);
"api/rest/document/viewLiterature/" + item.folder + "/" + item.name
);
}, },
queryLiteratureKinds(pageNum, pageSize, type) { queryLiteratureKinds(pageNum, pageSize, type) {
get( queryLiterature("学习训练", pageNum, pageSize, null, type).then((res) => {
"api/rest/document/queryLiterature?module=学习训练&pageNum=" +
pageNum +
"&pageSize=" +
pageSize +
"&folder=" +
type
)
.then((res) => {
this.literatureListKinds = res.list; this.literatureListKinds = res.list;
this.totalKinds = res.totals; this.totalKinds = res.totals;
}) })
...@@ -1698,8 +1675,7 @@ export default { ...@@ -1698,8 +1675,7 @@ export default {
showInfo(item) { showInfo(item) {
this.xgtj_news_data = []; this.xgtj_news_data = [];
this.xgtj_news(item.id); this.xgtj_news(item.id);
get("api/rest/fulltext/queryLiteratureById?id=" + item.name) queryLiteratureById(item.name).then((res) => {
.then((res) => {
this.flag = 4; this.flag = 4;
this.pickObj = res; this.pickObj = res;
this.literatureObj = item; this.literatureObj = item;
...@@ -1709,7 +1685,7 @@ export default { ...@@ -1709,7 +1685,7 @@ export default {
}); });
}, },
xgtj_news(id) { xgtj_news(id) {
post("api/rest/fulltext/queryRecommendLiterature?id=" + id) queryRecommendLiterature(id)
.then((res) => { .then((res) => {
if (res.length > 0) { if (res.length > 0) {
this.xgtj_news_data = res; this.xgtj_news_data = res;
...@@ -1881,7 +1857,7 @@ export default { ...@@ -1881,7 +1857,7 @@ export default {
obj["subject"] = this.pickItem.address; obj["subject"] = this.pickItem.address;
obj["relation"] = this.personType; obj["relation"] = this.personType;
obj["objectType"] = "文献"; obj["objectType"] = "文献";
post(`api/rest/resource/addRelatedInfo`, obj) addRelatedInfo(obj)
.then((res) => { .then((res) => {
if (res == 1) { if (res == 1) {
this.$message.success("关联人员成功!"); this.$message.success("关联人员成功!");
...@@ -1910,7 +1886,7 @@ export default { ...@@ -1910,7 +1886,7 @@ export default {
obj["subject"] = this.pickItem.address; obj["subject"] = this.pickItem.address;
obj["relation"] = this.organizationType; obj["relation"] = this.organizationType;
obj["objectType"] = "文献"; obj["objectType"] = "文献";
post(`api/rest/resource/addRelatedInfo`, obj) addRelatedInfo(obj)
.then((res) => { .then((res) => {
if (res == 1) { if (res == 1) {
this.$message.success("关联机构成功!"); this.$message.success("关联机构成功!");
...@@ -1949,11 +1925,7 @@ export default { ...@@ -1949,11 +1925,7 @@ export default {
//确定新增标签 //确定新增标签
defineAddTag() { defineAddTag() {
let labels = this.dynamicTags; let labels = this.dynamicTags;
post( addLiteratureLabel(this.literatureObj.id, labels).then((res) => {
"api/rest/document/addLiteratureLabel?id=" + this.literatureObj.id,
labels
)
.then((res) => {
if (res == 1) { if (res == 1) {
this.$message.success("添加标签成功!"); this.$message.success("添加标签成功!");
this.dialogVisibleTag = false; this.dialogVisibleTag = false;
...@@ -1972,10 +1944,7 @@ export default { ...@@ -1972,10 +1944,7 @@ export default {
//收藏 //收藏
//查询收藏目录 //查询收藏目录
searchCollectionFolder() { searchCollectionFolder() {
get( queryCollectionFolder(this.userInfo.account).then((res) => {
"api/rest/resource/queryCollectionFolder?collector=" +
this.userInfo.account
).then((res) => {
this.collectionFolder = res; this.collectionFolder = res;
}); });
}, },
...@@ -1995,7 +1964,7 @@ export default { ...@@ -1995,7 +1964,7 @@ export default {
//选择收藏夹完成上传 //选择收藏夹完成上传
defineAddCollection() { defineAddCollection() {
if (this.collectionData.folderId != undefined) { if (this.collectionData.folderId != undefined) {
post("api/rest/resource/addCollection", this.collectionData).then( addCollection(this.collectionData).then(
(res) => { (res) => {
if (res == 1) { if (res == 1) {
this.$message.success("收藏成功!"); this.$message.success("收藏成功!");
...@@ -2015,7 +1984,7 @@ export default { ...@@ -2015,7 +1984,7 @@ export default {
//新增收藏夹名称 //新增收藏夹名称
addCollectionFolder() { addCollectionFolder() {
if (this.collectionName != "" && this.collectionName != null) { if (this.collectionName != "" && this.collectionName != null) {
post("api/rest/resource/addCollectionFolder", { addCollectionFolder({
name: this.collectionName, name: this.collectionName,
collector: this.userInfo.account, collector: this.userInfo.account,
}) })
...@@ -2036,8 +2005,7 @@ export default { ...@@ -2036,8 +2005,7 @@ export default {
}, },
//删除收藏夹目录 //删除收藏夹目录
delectCollectionFolder(id) { delectCollectionFolder(id) {
delete_util("api/rest/resource/removeCollectionFolder?folderId=" + id) removeCollectionFolder(id).then((res) => {
.then((res) => {
if (res == 1) { if (res == 1) {
this.$message.success("删除成功!"); this.$message.success("删除成功!");
this.searchCollectionFolder(); this.searchCollectionFolder();
...@@ -2084,7 +2052,7 @@ export default { ...@@ -2084,7 +2052,7 @@ export default {
//查询板块名称 //查询板块名称
//所有版块id集合 //所有版块id集合
let ids = []; let ids = [];
get("api/rest/document/queryLiteratureFolder?module=学习训练") queryLiteratureFolder("学习训练")
.then((res) => { .then((res) => {
this.moduleList = res; this.moduleList = res;
this.treeData = [ this.treeData = [
...@@ -2104,23 +2072,17 @@ export default { ...@@ -2104,23 +2072,17 @@ export default {
}, },
]; ];
this.activeName = res[0] && res[0].id; this.activeName = res[0] && res[0].id;
res res.filter((item) => item.remark == "舆论战心理战法律战业务理论").forEach((item, index) => {
.filter((item) => item.remark == "舆论战心理战法律战业务理论")
.forEach((item, index) => {
this.businessTheory[index].title = item.name; this.businessTheory[index].title = item.name;
this.businessTheory[index].id = item.id; this.businessTheory[index].id = item.id;
this.treeData[0].children.push({ label: item.name, id: item.id }); this.treeData[0].children.push({ label: item.name, id: item.id });
}); });
res res.filter((item) => item.remark == "国际政治社会环境").forEach((item, index) => {
.filter((item) => item.remark == "国际政治社会环境")
.forEach((item, index) => {
this.socialEnvironment[index].title = item.name; this.socialEnvironment[index].title = item.name;
this.socialEnvironment[index].id = item.id; this.socialEnvironment[index].id = item.id;
this.treeData[1].children.push({ label: item.name, id: item.id }); this.treeData[1].children.push({ label: item.name, id: item.id });
}); });
res res.filter((item) => item.remark == "舆论战心理战法律战支撑信息").forEach((item, index) => {
.filter((item) => item.remark == "舆论战心理战法律战支撑信息")
.forEach((item, index) => {
this.supportingInformation[index].title = item.name; this.supportingInformation[index].title = item.name;
this.supportingInformation[index].id = item.id; this.supportingInformation[index].id = item.id;
this.treeData[2].children.push({ label: item.name, id: item.id }); this.treeData[2].children.push({ label: item.name, id: item.id });
...@@ -2131,10 +2093,7 @@ export default { ...@@ -2131,10 +2093,7 @@ export default {
}) })
.then(() => { .then(() => {
//多板块文献资料查询 //多板块文献资料查询
post( multiQueryLiterature("学习训练", false, ids).then((res) => {
"api/rest/document/multiQueryLiterature?module=学习训练",
ids
).then((res) => {
//三战业务理论 //三战业务理论
this.businessTheory[0].lawList = res[16]; this.businessTheory[0].lawList = res[16];
this.businessTheory[1].lawList = res[17]; this.businessTheory[1].lawList = res[17];
...@@ -2151,10 +2110,7 @@ export default { ...@@ -2151,10 +2110,7 @@ export default {
}); });
//多板块文献资料图片查询 //多板块文献资料图片查询
post( multiQueryLiterature("学习训练", true, ids).then((res) => {
"api/rest/document/multiQueryLiterature?showPic=true&module=学习训练",
ids
).then((res) => {
//三战业务理论 //三战业务理论
this.businessTheory[0].img = res[16]; this.businessTheory[0].img = res[16];
this.businessTheory[1].img = res[17]; this.businessTheory[1].img = res[17];
......
...@@ -101,6 +101,7 @@ ...@@ -101,6 +101,7 @@
<script> <script>
import { post, startLoading, endLoading } from "../../util/http_util"; import { post, startLoading, endLoading } from "../../util/http_util";
import back from "../../assets/img/setting/back.png"; import back from "../../assets/img/setting/back.png";
import { addQuestionBank, updateQuestionBankById, deleteQuestionBankById, listQuestionBank } from '../../api/xxxl/llkh';
export default { export default {
data() { data() {
return { return {
...@@ -158,10 +159,7 @@ export default { ...@@ -158,10 +159,7 @@ export default {
questionsName: _this.form_add.name, questionsName: _this.form_add.name,
createBy: "admin", createBy: "admin",
}; };
post( addQuestionBank(form_datas).then((data) => {
"api_exame/admin/questionBank/addQuestionBank",
form_datas
).then((data) => {
if (data == 1) { if (data == 1) {
this.$message({ this.$message({
type: "success", type: "success",
...@@ -184,10 +182,7 @@ export default { ...@@ -184,10 +182,7 @@ export default {
id: _this.form_edit.id, id: _this.form_edit.id,
updateBy: "admin", updateBy: "admin",
}; };
post( updateQuestionBankById(form_datas).then((data) => {
"api_exame/admin/questionBank/updateQuestionBankById",
form_datas
).then((data) => {
if (data == 1) { if (data == 1) {
this.$message({ this.$message({
type: "success", type: "success",
...@@ -224,10 +219,7 @@ export default { ...@@ -224,10 +219,7 @@ export default {
type: "warning", type: "warning",
}) })
.then(() => { .then(() => {
post( deleteQuestionBankById(paramDatas)
"api_exame/admin/questionBank/deleteQuestionBankById",
paramDatas
)
.then((data) => { .then((data) => {
this.$message({ this.$message({
type: "success", type: "success",
...@@ -261,10 +253,7 @@ export default { ...@@ -261,10 +253,7 @@ export default {
}; };
// startLoading(); // startLoading();
_this.tableData = []; _this.tableData = [];
post( listQuestionBank(paramDatas)
"api_exame/admin/questionBank/listQuestionBank",
paramDatas
)
.then((data) => { .then((data) => {
if (data.list.length > 0) { if (data.list.length > 0) {
_this.tableData = data.list; _this.tableData = data.list;
...@@ -295,6 +284,7 @@ export default { ...@@ -295,6 +284,7 @@ export default {
background-image: url("../../assets/img/xxxl/01.png"); background-image: url("../../assets/img/xxxl/01.png");
background-size: 100% 100%; background-size: 100% 100%;
color: white; color: white;
.top-div { .top-div {
width: calc(100% - 40px); width: calc(100% - 40px);
height: 80px; height: 80px;
......
...@@ -239,6 +239,7 @@ import { ...@@ -239,6 +239,7 @@ import {
endLoading, endLoading,
download, download,
} from "../../util/http_util"; } from "../../util/http_util";
import {addTExameContent,updateTExameContent,deleteTExameContent,listTExameContent,listQuestionBank} from '../../api/xxxl/llkh';
export default { export default {
data() { data() {
return { return {
...@@ -459,10 +460,7 @@ export default { ...@@ -459,10 +460,7 @@ export default {
type: _this.form_add.region_tmlx, //题类型 type: _this.form_add.region_tmlx, //题类型
qbId: _this.form_add.region_tklx, //题库id qbId: _this.form_add.region_tklx, //题库id
}; };
post( addTExameContent(paramDatas)
"api_exame/admin/TExameContent/addTExameContent",
paramDatas
)
.then((data) => { .then((data) => {
_this.centerDialogVisible_add = false; _this.centerDialogVisible_add = false;
this.$message({ this.$message({
...@@ -595,10 +593,7 @@ export default { ...@@ -595,10 +593,7 @@ export default {
qbId: _this.form_edit.region_tklx, //题库id qbId: _this.form_edit.region_tklx, //题库id
}; };
console.log(1); console.log(1);
post( updateTExameContent(paramDatas)
"api_exame/admin/TExameContent/updateTExameContent",
paramDatas
)
.then((data) => { .then((data) => {
_this.centerDialogVisible_edit = false; _this.centerDialogVisible_edit = false;
this.$message({ this.$message({
...@@ -632,10 +627,7 @@ export default { ...@@ -632,10 +627,7 @@ export default {
type: "warning", type: "warning",
}) })
.then(() => { .then(() => {
post( deleteTExameContent(paramDatas)
"api_exame/admin/TExameContent/deleteTExameContent",
paramDatas
)
.then((data) => { .then((data) => {
this.$message({ this.$message({
type: "success", type: "success",
...@@ -667,10 +659,7 @@ export default { ...@@ -667,10 +659,7 @@ export default {
}; };
// startLoading(); // startLoading();
_this.tableData = []; _this.tableData = [];
post( listTExameContent(paramDatas)
"api_exame/admin/TExameContent/listTExameContent",
paramDatas
)
.then((data) => { .then((data) => {
if (data.list.length > 0) { if (data.list.length > 0) {
data.list.forEach((item) => { data.list.forEach((item) => {
...@@ -722,10 +711,7 @@ export default { ...@@ -722,10 +711,7 @@ export default {
}; };
_this.options = []; _this.options = [];
// _this.totals = 0; // _this.totals = 0;
post( listQuestionBank(paramDatas)
"api_exame/admin/questionBank/listQuestionBank",
paramDatas
)
.then((data) => { .then((data) => {
if (data.list.length > 0) { if (data.list.length > 0) {
data.list.forEach((item) => { data.list.forEach((item) => {
......
...@@ -169,9 +169,9 @@ export default { ...@@ -169,9 +169,9 @@ export default {
methods: { methods: {
//历史记录弹框 //历史记录弹框
history_div(row) { history_div(row) {
debugger
this.dialogVisible_lsjl = true; this.dialogVisible_lsjl = true;
queryAnswerQuestionRecord(row.id, 1, 10) queryAnswerQuestionRecord(row.id, 1, 10).then((res) => {
.then((res) => {
this.tableData_history = res.list.map((e) => { this.tableData_history = res.list.map((e) => {
return { return {
qkfx: e.fullAnalysis, qkfx: e.fullAnalysis,
...@@ -687,7 +687,7 @@ export default { ...@@ -687,7 +687,7 @@ export default {
background-size: 100% 100%; background-size: 100% 100%;
.el-dialog__header { .el-dialog__header {
padding: 35px 0px 0px; padding: 45px 0px 0px 40px;
.el-dialog__headerbtn { .el-dialog__headerbtn {
top: 40px; top: 40px;
......
...@@ -86,7 +86,7 @@ module.exports = { ...@@ -86,7 +86,7 @@ module.exports = {
//后台代理 //后台代理
proxy: { proxy: {
'/api/': { '/api/': {
target: 'http://192.168.168.106:8081', target: 'http://192.168.168.110:8081',
ws: true, ws: true,
secure: false, secure: false,
changeOrigin: true, changeOrigin: true,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment