Commit 065ad852 authored by liuyuping's avatar liuyuping

'2022-2-23'

parent 28d2c5cb
......@@ -2,10 +2,12 @@ ENV = 'development'
# 接口地址
# VUE_APP_BASE_API = 'http://localhost:8000'
VUE_APP_BASE_API = 'https://safe.c-icc.cn:8035'
# VUE_APP_BASE_API = 'https://safe.c-icc.cn:8035'
# VUE_APP_BASE_API = 'http://localhost:8000'
# VUE_APP_BASE_API = 'https://192.168.3.188:8035'
# VUE_APP_BASE_API = 'http://39.102.232.151:8030'
# VUE_APP_BASE_API = 'https://8.143.198.78:8035'
VUE_APP_BASE_API = 'https://www.kuangshanzhixing.cn:8035'
VUE_APP_WS_API = 'ws://localhost:8000'
# 是否启用 babel-plugin-dynamic-import-node插件
......
......@@ -3,6 +3,8 @@ ENV = 'production'
# 如果使用 Nginx 代理后端接口,那么此处需要改为 '/',文件查看 Docker 部署篇,Nginx 配置
# 接口地址,注意协议,如果你没有配置 ssl,需要将 https 改为 http
# VUE_APP_BASE_API = 'http://localhost:8000'
VUE_APP_BASE_API = 'https://safe.c-icc.cn:8035'
# VUE_APP_BASE_API = 'https://safe.c-icc.cn:8035'
# VUE_APP_BASE_API = 'https://8.143.198.78:8035'
VUE_APP_BASE_API = 'https://www.kuangshanzhixing.cn:8035'
# 如果接口是 http 形式, wss 需要改为 ws
VUE_APP_WS_API = 'wss://el-admin.xin'
......@@ -3,10 +3,10 @@
border: 1px solid #010823;
background: #010823;
}
.el-popper[x-placement^=bottom] .popper__arrow::after {
border-bottom-color:black;
.el-popper[x-placement^="bottom"] .popper__arrow::after {
border-bottom-color: black;
}
.el-popper[x-placement^=bottom] .popper__arrow {
.el-popper[x-placement^="bottom"] .popper__arrow {
border-bottom-color: black;
}
.el-picker-panel__icon-btn {
......@@ -25,11 +25,14 @@
}
.el-select-dropdown__item {
color: #fff;
background-color:#010823!important;
background-color: #010823 !important;
}
.el-select-dropdown__item.selected {
background-color:#03507E!important;
background-color: #03507e !important;
}
.el-select-dropdown__item:hover {
background-color:#03507E!important;
}
\ No newline at end of file
background-color: #03507e !important;
}
/* .el-image-viewer__actions {
display: none;
} */
......@@ -33,3 +33,15 @@ export function analyzeCertify(params) {
params
})
}
/**
* 删除证书 enterpriseCertificate:del
*/
export function deleteEnterCertify(data) {
return request({
url: '/api/enterpriseCertificate',
method: 'delete',
data
})
}
\ No newline at end of file
......@@ -107,10 +107,11 @@ export function updateCourse(data, updateFunc) {
* pid 课程id
* 修改课时
*/
export function updateLesson(data) {
export function updateLesson(data, updateFunc) {
return requestFile({
url: 'api/onlineTraining/updateLesson',
method: 'POST',
onUploadProgress: updateFunc,
data
})
}
import request from '@/utils/request'
import requestFile from '@/utils/requestfile'
import qs from 'qs'
export function homePageAnalyze() {
return request({
url: 'api/homePage/analyze',
method: 'get'
})
}
......@@ -555,10 +555,45 @@ export function deleteRiskStandingBookType(ids) {
})
}
/**
* 后台获取企业风险数量
*/
export function getriskNumAnalysisBackend(companyId) {
return request({
url: 'api/thRisk/countRisk',
method: 'GET',
params: {
companyId
}
})
}
// 获取企业风险数量统计
export function getriskNumAnalysis(companyId) {
return request({
url: 'api/thRiskNumAnalysis',
// return new Promise((resolve) => {
// resolve({
// content: [
// {
// rnaLevel: '重大风险',
// rnaNum: 0
// },
// {
// rnaLevel: '较大风险',
// rnaNum: 0
// },
// {
// rnaLevel: '一般风险',
// rnaNum: 0
// },
// {
// rnaLevel: '低风险',
// rnaNum: 0
// }
// ]
// })
// })
return request({
url: 'api/thRisk/countByCompanyId',
method: 'GET',
params: {
companyId
......@@ -808,7 +843,7 @@ export function countEachLevelRiskNum(county, dimTwoIndustries, town) {
export function rankHdNum(currentSelectOption, curArg, level, startTime, endTime) {
let queryString = ''
if (currentSelectOption === 1) {
queryString = qs.stringify({
queryString = stringify({
town: curArg,
level,
startTime,
......@@ -1298,6 +1333,21 @@ export function verifyEnterpriseManager(userId) {
})
}
/**
* 发布通知公告
* companyIds: [],
* noticeContent: "string",
* noticeTitle: "string"
*/
export function publishNotice(data) {
return request({
url: 'api/notice',
method: 'post',
data
})
}
/**
*
*/
......
import request from '@/utils/request'
/**
* 企业安全所属分类、检查内容管理
*/
/**
* 查询服务: 企业安全所属分类、检查内容 enterpriseSafetyInspectionContent:list
* params: {
* level: 层级1: 所属分类 2: 检查内容
* page: 页码(0...N)
* pid
* size 每页显示的数目
* sort 以下列格式排序标准: property[,asc | desc]。默认排序顺序为升序。支持多种排序条件: 如: id,asc
* }
*/
export function getEnterpriseSafetyInspectionContent(params) {
return request({
url: 'api/enterpriseSafetyInspectionContent',
method: 'get',
params
})
}
/**
* id
* level 层级 1: 所属分类 2:检查内容
* name string 类别 /所属分类/检查内容
* pid integer($int32)
* type string 类别[安全资料类|现场检查类]
*/
export function postEnterpriseSafetyInspectionContent(data) {
return request({
url: 'api/enterpriseSafetyInspectionContent',
method: 'post',
data
})
}
/**
* id
* level 层级 1: 所属分类 2:检查内容
* name string 类别 /所属分类/检查内容
* pid integer($int32)
* type string 类别[安全资料类|现场检查类]
*/
export function putEnterpriseSafetyInspectionContent(data) {
return request({
url: 'api/enterpriseSafetyInspectionContent',
method: 'put',
data
})
}
/**
* [
* {
* id: 0,
* level: 0
* }
* ]
*/
export function deleteEnterpriseSafetyInspectionContent(data) {
return request({
url: 'api/enterpriseSafetyInspectionContent',
method: 'delete',
data
})
}
/**
* 企业安全发现问题管理
*/
/**
* inspectionContentId
* page
* size
* sort
*
* enterpriseSafetyMatter:list
*/
export function getEnterpriseSafetyMatter(params) {
return request({
url: 'api/enterpriseSafetyMatter',
method: 'get',
params
})
}
/**
* basis 检查依据
* id id
* inspectionContentId 检查内容id
* name 问题名称
* suggestion 整改建议
*/
export function postEnterpriseSafetyMatter(data) {
return request({
url: 'api/enterpriseSafetyMatter',
method: 'post',
data
})
}
/**
* basis 检查依据
* id id
* inspectionContentId 检查内容
* name 问题名称
* suggestion 整改建议
*/
export function putEnterpriseSafetyMatter(data) {
return request({
url: 'api/enterpriseSafetyMatter',
method: 'put',
data
})
}
/**
* []
*/
export function deleteEnterpriseSafetyMatter(data) {
return request({
url: 'api/enterpriseSafetyMatter',
method: 'delete',
data
})
}
/**
* 查询企业安全信息
*/
export function findMattsByEnterpriseId(enterpriseId) {
return request({
url: 'api/enterpriseSafetyMatter/findByEnterpriseId',
method: 'get',
params: {
enterpriseId
}
})
}
/**
* 预览企业安全管理模板
*/
export function previewTemplate() {
return request({
url: 'api/enterpriseSafetyMatter/previewTemplate',
method: 'get'
})
}
/**
* 企业安全管理评星
*/
export function enterSafetyMatterStar(enterpriseId) {
// return request({
// url: 'api/enterpriseSafetyMatter/star',
// method: 'get',
// params: {
// enterpriseId
// }
// })
return new Promise((resolve) => {
resolve(4)
})
}
/**
* 获取所有待审核隐患
*/
export function getAllDangerToVerify(params) {
return request({
url: 'api/hiddenDangerToVerify',
method: 'get',
params
})
}
/**
* 待审核隐患修改
*/
export function verifyDanger(params) {
return request({
url: 'api/hiddenDangerToVerify/verify',
method: 'get',
params
})
}
......@@ -16,13 +16,14 @@ export function getLawList(page, size, startTime, endTime, publisher, keyword) {
}
})
}
export function postLaw(lawPublisher, lawTitle, thLawChapterDtoList) {
export function postLaw(lawPublisher, lawTitle, lawDate, thLawChapterDtoList) {
return request({
url: 'api/thLaw',
method: 'POST',
data: {
lawPublisher,
lawTitle,
lawDate,
thLawChapterDtoList
}
})
......
......@@ -67,7 +67,7 @@ export function deleteExamLibraryCategory(data) {
*/
export function getExamLibrary(params) {
return request({
url: 'api/onlineExamLibrary',
url: 'api/onlineExamLibrary/page',
method: 'get',
params
})
......@@ -112,3 +112,214 @@ export function deleteExamLibrary(data) {
data
})
}
/**
* difficulty 难度
* exclusiveIds 排除的题目 id
* libraryId 题库id
* page
* question 题干
* size 每页显示的题目
* sort 默认排序顺序为升序
* type 单选题|多选题|判断题
* 获取在线考试题
*/
export function getOnlineExamSubject(params) {
const queryString = qs.stringify(params, {
indices: false
})
console.log(params, queryString)
return request({
url: 'api/onlineExamSubject?' + queryString,
method: 'GET'
})
}
/**
* analysis 答案分析
* answer 答案[A|B|C|D] 多选题 A、B 判断题[对|错]
* difficulty 难度[简单|一般|困难]
* id id
* libraryId 题库id
* optiona 选项A
* optionb 选项B
* optionc 选项C
* optiond 选项d
* question 题干
* type 类型[单选题|多选题|判断题]
* 添加在线考试题
*/
export function postOnlineExamSubject(data) {
return request({
url: 'api/onlineExamSubject',
method: 'POST',
data
})
}
/**
* analysis 答案分析
* answer 答案 单选题[A|B|C|D] 多选题 A、B 判断题 [对|错]
* difficulty 难度 [简单|一般|困难]
* id id
* libraryId 题库id
* optiona 选项A
* optionb 选项B
* optionc 选项C
* optiond 选项D
* question 题干
* type 类型[单选题|多选题|判断题]
* 修改在线考试题
*/
export function putOnlineExamSubject(data) {
return request({
url: 'api/onlineExamSubject',
method: 'PUT',
data
})
}
/**
* 删除在线考试题
*/
export function deleteOnlineExamSubject(data) {
return request({
url: 'api/onlineExamSubject',
method: 'DELETE',
data
})
}
/**
* ids []
* 删除试卷
*/
export function deleteExamPaper(data) {
return request({
url: 'api/onlineExamPaper',
method: 'delete',
data
})
}
/**
* page 页码(0...N)
* paperId 试卷Id
* size 每页显示的数目
* sort
* type [单选题|多选题|判断题]
* 在线考试: 查询题目
*/
export function findPaperSubject(params) {
return request({
url: 'api/onlineExamPaper/findSubject',
method: 'get',
params
})
}
/**
* name: 试卷名称
* page: 页码
* size: 每页显示的数目
* sort: 以下列格式排序标准: property[,asc|desc]
* 在线考试: 查询试卷
*/
export function findPagePager(data) {
return request({
url: 'api/onlineExamPaper/page',
method: 'get',
data
})
}
/**
* {
* addJudgementIds: [
* "paperId": 0,
* "subjectId": 0
* ],
* addMultipleChoiceIds: [
* "paperId": 0,
* "subjectId": 0
* ],
* addSingleChoiceIds: [
* "pagerId": 0,
* "subjectId": 0
* ],
* deleteJudgementIds: [
* "pagerId": 0,
* "subjectId": 0
* ],
* deleteMultipleChoiceIds: [
* "paperId": 0,
* "subjectId": 0
* ],
* deleteSingleChoiceIds: [
* "paperId": 0,
* "subjectId": 0
* ],
* paperId: 0
* }
* 智能组卷后手动编辑保存
* */
export function savePaperAfterAutomatically(data) {
return request({
url: 'api/onlineExamPaper/saveAfterAutomatically',
method: 'post',
data
})
}
/**
* name
* description
* judgmentNum: 0
* judgmentScore: 0
* libraryIds: [],
* mode: 生成方式 随机|简单|一般|困难
* multipleChoiceNum: 0
* multipleChoiceScore: 0
* singleChoiceNum 单选题数量
* singleChoiceScore 单选题分值
* status 状态 [已发布|已关闭] 默认已关闭
* 智能组卷
*/
export function savePaperAutomatically(data) {
return request({
url: 'api/onlineExamPaper/saveAutomatically',
method: 'post',
data
})
}
/**
* name
* description
* status [已关闭|已发布]
* libraryIds: []
* addJudgementIds: []
* addMultipleChoiceIds: []
* addSingleChoiceIds: []
* singleChoiceScore
* multipleChoiceScore
* judgmentScore
* 手动组卷
*/
export function saveManully(data) {
return request({
url: 'api/onlineExamPaper/saveManually',
method: 'post',
data
})
}
export function changePaperStatus(data) {
return request({
url: 'api/onlineExamPaper/changeStatus',
method: 'put',
data
})
}
\ No newline at end of file
......@@ -106,14 +106,25 @@ export function getAllIndustry(params) {
})
}
/**
* 安全教育培训统计
*/
export function analyzeSafetyEducation(params) {
return request({
url: 'api/trainImage/analyzeSafetyEducation',
method: 'get',
params
})
}
/**
* 查询已参加培训的企业
*/
export function findTrainEnterprise() {
export function findTrainEnterprise(params) {
return request({
url: 'api/trainImage/findTrainEnterprise',
method: 'get'
method: 'get',
params
})
}
......
<template>
<div class="hello-ezuikit-js" style="width: 100%;height:100%;padding: 35px;">
<div id="ope-video-container" style="width:90%;height:90%"></div>
</div>
</template>
<script>
import EZUIKit from "ezuikit-js";
import axios from "axios";
const service = axios.create({});
export default {
name: "HelloWorld",
props: {
msg: String
},
mounted: async () => {
console.group("mounted 组件挂载完毕状态===============》");
let result = null;
// await getMonitor().then(res => {
// result = res[0];
// // const player = new EZUIKit.EZUIKitPlayer({
// // autoplay: true,
// // id: "ope-video-container",
// // accessToken:
// // "at.3bvmj4ycamlgdwgw1ig1jruma0wpohl6-48zifyb39c-13t5am6-yukyi86mz" ||
// // res[0].appsecret,
// // url: "ezopen://open.ys7.com/203751922/1.live" || res[0].channel,
// // template: "simple" // simple - 极简版;standard-标准版;security - 安防版(预览回放);voice-语音版;
// // // 视频上方头部控件
// // //header: ["capturePicture", "save", "zoom"], // 如果templete参数不为simple,该字段将被覆盖
// // //plugin: ['talk'], // 加载插件,talk-对讲
// // // 视频下方底部控件
// // // footer: ["talk", "broadcast", "hd", "fullScreen"], // 如果template参数不为simple,该字段将被覆盖
// // // audio: 1, // 是否默认开启声音 0 - 关闭 1 - 开启
// // // openSoundCallBack: data => console.log("开启声音回调", data),
// // // closeSoundCallBack: data => console.log("关闭声音回调", data),
// // // startSaveCallBack: data => console.log("开始录像回调", data),
// // // stopSaveCallBack: data => console.log("录像回调", data),
// // // capturePictureCallBack: data => console.log("截图成功回调", data),
// // // fullScreenCallBack: data => console.log("全屏回调", data),
// // // getOSDTimeCallBack: data => console.log("获取OSDTime回调", data),
// // // width: 600,
// // // height: 400
// // });
// // player.play();
// });
// let dataJson = "appKey=" + result.appkey + "&appSecret=" + result.appsecret;
// service.defaults.headers["Content-Type"] =
// "application/x-www-form-urlencoded; charset=UTF-8";
// let result2 = null;
// await service
// .post("https://open.ys7.com/api/lapp/token/get", dataJson)
// .then(res1 => {
// console.log(res1, "service post");
// result2 = res1;
// });
// if (result2.data.code === "200") {
// const player = new EZUIKit.EZUIKitPlayer({
// autoplay: true,
// id: "ope-video-container",
// accessToken: result2.data.data.accessToken,
// url: `ezopen://open.ys7.com/${result.mid}/${result.channel}`,
// template: "simple", // simple - 极简版;standard-标准版;security - 安防版(预览回放);voice-语音版;
// // footer: ["fullScreen"],
// // 视频上方头部控件
// // header: ["capturePicture", "save", "zoom"] // 如果templete参数不为simple,该字段将被覆盖
// // plugin: ['talk'], // 加载插件,talk-对讲
// // 视频下方底部控件
// // footer: ["talk", "broadcast", "hd", "fullScreen"], // 如果template参数不为simple,该字段将被覆盖
// // audio: 1, // 是否默认开启声音 0 - 关闭 1 - 开启
// // openSoundCallBack: data => console.log("开启声音回调", data),
// // closeSoundCallBack: data => console.log("关闭声音回调", data),
// // startSaveCallBack: data => console.log("开始录像回调", data),
// // stopSaveCallBack: data => console.log("录像回调", data),
// // capturePictureCallBack: data => console.log("截图成功回调", data),
// // fullScreenCallBack: data => console.log("全屏回调", data),
// // getOSDTimeCallBack: data => console.log("获取OSDTime回调", data),
// // width: 600,
// // height: 400
// });
// player.play();
// }
// console.log("player", player);
// setTimeout(()=>{
// player.stop(); // 方法调用示例,10秒后关闭视频
// },10000)
},
methods: {}
};
</script>
<style lang="scss" scoped>
.hello-ezuikit-js {
display: flex;
align-items: center;
justify-content: center;
}
.ope-video-container {
width: 96%;
height: 70%;
}
</style>
......@@ -72,6 +72,8 @@ const trainimageenter = () => import('../views/trainimage/index.vue')
const trainimg = () => import('../views/trainimage/trainimg.vue')
const trainstatistics = () => import('../views/trainimage/statistics.vue')
const hdverify = () => import('../views/hiddendanger/hdverify.vue')
Vue.use(Router)
export const constantRouterMap = [
......@@ -297,6 +299,13 @@ export const constantRouterMap = [
meta: { title: '隐患管理' },
hidden: true
},
{
path: 'hidedanger/verify',
component: hdverify,
name: '隐患审核',
meta: { title: '隐患审核' },
hidden: true
},
{
path: 'hidedanger/vocabulary',
component: vocabulary,
......@@ -716,6 +725,18 @@ export const constantRouterMap = [
name: '在线考试',
meta: { title: '在线考试' }
},
{
path: 'maketesterauto',
component: () => import('../views/exam/maketesterauto.vue'),
name: '智能组卷',
meta: { title: '智能组卷' }
},
{
path: 'maketestersave/:name',
component: () => import('../views/exam/maketesterautosave.vue'),
name: '智能组卷后保存',
meta: { title: '智能组卷后保存' }
},
{
path: 'manage/:name',
component: manage,
......
......@@ -23,6 +23,7 @@ const getters = {
sidebarRouters: state => state.permission.sidebarRouters,
curLawItem: state => state.law.curLawItem,
curAdviceItem: state => state.advice.curAdviceItem,
course: state => state.course.course
course: state => state.course.course,
subject: state => state.tester.subject
}
export default getters
const tester = {
state: {
subject: []
},
mutations: {
SET_SUBJECT: (state, subject) => {
state.subject = [...subject]
}
},
actions: {
// 设置试卷题目
setSubjects({ commit }, subject) {
commit('SET_SUBJECT', subject)
}
}
}
export default tester
\ No newline at end of file
export default [
{
isMonitor: true,
riskId: 1956,
appKey: "ad5ce203b2a7432cb771c0005f3257bd",
appSecret: "39f36e1cb37ef981bb52820f50ed779f",
filename: "1.hd.live",
devNumber: "G96386473"
},
{
isMonitor: true,
riskId: 1957,
appKey: "ad5ce203b2a7432cb771c0005f3257bd",
appSecret: "39f36e1cb37ef981bb52820f50ed779f",
filename: "2.hd.live",
devNumber: "G96386473"
},
{
isMonitor: true,
riskId: 1958,
appKey: "ad5ce203b2a7432cb771c0005f3257bd",
appSecret: "39f36e1cb37ef981bb52820f50ed779f",
filename: "3.hd.live",
devNumber: "G96386473"
},
{
isMonitor: true,
riskId: 1959,
appKey: "ad5ce203b2a7432cb771c0005f3257bd",
appSecret: "39f36e1cb37ef981bb52820f50ed779f",
filename: "4.hd.live",
devNumber: "G96386473"
},
{
isMonitor: true,
riskId: 1960,
appKey: "ad5ce203b2a7432cb771c0005f3257bd",
appSecret: "39f36e1cb37ef981bb52820f50ed779f",
filename: "5.hd.live",
devNumber: "G96386473"
},
{
isMonitor: true,
riskId: 1961,
appKey: "ad5ce203b2a7432cb771c0005f3257bd",
appSecret: "39f36e1cb37ef981bb52820f50ed779f",
filename: "6.hd.live",
devNumber: "G96386473"
},
{
isMonitor: true,
riskId: 63,
appKey: "90174687eb6c4d4184a38940d5117382",
appSecret: "734efd3233ce3e6d3e087d093be84924",
filename: "6.live",
devNumber: "797723880"
},
{
isMonitor: true,
riskId: 53,
appKey: "f0b1cb6115fb4862be8479e3fe02a1c7",
appSecret: "37bdc8da580a8c10c2c4964b86764007",
filename: "7.hd.live",
devNumber: "102186935"
},
{
isMonitor: true,
riskId: 58,
appKey: "f0b1cb6115fb4862be8479e3fe02a1c7",
appSecret: "37bdc8da580a8c10c2c4964b86764007",
filename: "2.hd.live",
devNumber: "755529214"
},
{
isMonitor: true,
riskId: 108,
appKey: "ad5ce203b2a7432cb771c0005f3257bd",
appSecret: "39f36e1cb37ef981bb52820f50ed779f",
filename: "5.hd.live",
devNumber: "C07694100"
},
{
isMonitor: true,
riskId: 165,
appKey: "69af1b5a89c54536a111da46b5b48c59",
appSecret: "1f23dc385ed328d383a685e2d231c0cd",
filename: "6.hd.live",
devNumber: "126043484"
},
{
isMonitor: true,
riskId: 1939,
appKey: "ad5ce203b2a7432cb771c0005f3257bd",
appSecret: "39f36e1cb37ef981bb52820f50ed779f",
filename: "3.hd.live",
devNumber: "249046082"
},
{
isMonitor: true,
riskId: 1964,
appKey: "ad5ce203b2a7432cb771c0005f3257bd",
appSecret: "39f36e1cb37ef981bb52820f50ed779f",
filename: "1.hd.live",
devNumber: "C51248243"
}
]
\ No newline at end of file
This diff is collapsed.
<template>
<div class="total-wrapper">
<el-form
ref="addform"
:model="formInfo"
:rules="rules"
>
<el-form ref="addform" :model="formInfo" :rules="rules">
<el-form-item label="通知通告标题" :label-width="'120px'" prop="title">
<el-input v-model="formInfo.title" :maxlength="50" style="width: 500px" />
<el-input
v-model="formInfo.title"
:maxlength="50"
style="width: 500px"
/>
</el-form-item>
<el-form-item label="通知公司" :label-width="'120px'" prop="depart">
<el-select
......@@ -17,12 +17,14 @@
reserve-keyword
placeholder="请输入关键词"
:remote-method="remoteFetchMethod"
:loading="fetchLoading">
:loading="fetchLoading"
>
<el-option
v-for="item in companys"
:key="item.companyId"
:label="item.companyName"
:value="item.companyId">
:value="item.companyId"
>
</el-option>
</el-select>
</el-form-item>
......@@ -48,159 +50,166 @@
<div class="pulish-wrapper">
<el-button type="info" @click="clearContent">清空</el-button>
<el-button type="success" @click="saveStorage">保存</el-button>
<el-button type="primary" @click="publishLaw" v-loading="publishLoading">发布</el-button>
<el-button type="primary" @click="publishLaw" v-loading="publishLoading"
>发布</el-button
>
</div>
</div>
</template>
<script>
import { getAllCompanyInfo } from '@/api/industry.js'
import { postNotice } from '@/api/opeAdvice.js'
import Editor from '@tinymce/tinymce-vue'
import { getAllCompanyInfo } from "@/api/industry.js";
import { postNotice } from "@/api/opeAdvice.js";
import Editor from "@tinymce/tinymce-vue";
export default {
components: {
'editor': Editor
editor: Editor
},
data() {
return {
formInfo: {
title: '',
depart: '',
time: '',
content: ''
title: "",
depart: "",
time: "",
content: ""
},
rules: {
title: [
{
required: true,
message: '请输入标题',
trigger: 'blur'
message: "请输入标题",
trigger: "blur"
}
],
depart: [
{
required: true,
message: '请选择通知公司',
trigger: 'change'
message: "请选择通知公司",
trigger: "change"
}
],
]
},
// 经法局列表
departList: [
{
value: '经发局(应急局)',
label: '经发局(应急局)'
value: "经发局(应急局)",
label: "经发局(应急局)"
},
{
value: '建设局',
label: '建设局'
value: "建设局",
label: "建设局"
},
{
value: '市场监督管理局',
label: '市场监督管理局'
value: "市场监督管理局",
label: "市场监督管理局"
},
{
value: '生态环境局',
label: '生态环境局'
value: "生态环境局",
label: "生态环境局"
},
{
value: '商务局',
label: '商务局'
value: "商务局",
label: "商务局"
}
],
companys: [],
fetchLoading: false,
publishLoading: false
}
};
},
mounted() {
const curLawItem = localStorage.getItem('curAdviceItem')
const curLawItem = localStorage.getItem("curAdviceItem");
if (curLawItem) {
// localStorage.setItem('curLawItem', )
this.formInfo = { ...JSON.parse(curLawItem) }
this.formInfo = { ...JSON.parse(curLawItem) };
}
},
methods: {
publishLaw() {
// 校验
this.$refs.addform.validate((valid) => {
this.$refs.addform.validate(valid => {
if (valid) {
// 发布
// 调用 axios
// 调用 localStorage 的removeItem()方法去掉 curLawItem
this.publishLoading = true
this.publishLoading = true;
postNotice({
companyIds: this.formInfo.depart,
noticeContent: this.formInfo.content,
noticeTitle: this.formInfo.title
}).then(res => {
this.$message({
type: 'success',
message: '添加成功'
})
this.publishLoading = false
localStorage.removeItem('curAdviceItem')
}).catch(() => {
this.$message.error('添加失败')
this.publishLoading = false
})
.then(res => {
this.$message({
type: "success",
message: "添加成功"
});
this.publishLoading = false;
localStorage.removeItem("curAdviceItem");
})
.catch(() => {
this.$message.error("添加失败");
this.publishLoading = false;
});
} else {
this.$message.error('请输入信息')
this.$message.error("请输入信息");
}
})
});
},
clearContent() {
this.formInfo.title = ''
this.formInfo.depart = ''
this.formInfo.time = ''
this.formInfo.content = ''
this.formInfo.title = "";
this.formInfo.depart = "";
this.formInfo.time = "";
this.formInfo.content = "";
// 调用 localStorage 的removeItem()方法去掉 curLawItem
localStorage.removeItem('curAdviceItem')
localStorage.removeItem("curAdviceItem");
},
saveStorage() {
//
// localStorage.getItem
localStorage.setItem('curAdviceItem', JSON.stringify(this.formInfo))
localStorage.setItem("curAdviceItem", JSON.stringify(this.formInfo));
},
remoteFetchMethod(query) {
if (query !== '') {
if (query !== "") {
this.fetchLoading = true;
getAllCompanyInfo({
page: 0,
size: 10,
companyName: query
}).then(res => {
this.companys = [...res.content]
this.fetchLoading = false
this.formInfo = {
title: '',
depart: '',
time: '',
content: ''
}).then(
res => {
this.companys = [...res.content];
this.fetchLoading = false;
this.formInfo = {
title: "",
depart: "",
time: "",
content: ""
};
},
() => {
this.fetchLoading = false;
}
},() => {
this.fetchLoading = false
})
);
} else {
this.companys = []
this.companys = [];
}
}
}
}
};
</script>
<style lang="scss">
.editor-wrapper {
padding: 10px 20px;
}
.pulish-wrapper {
margin-top: 20px;
display: flex;
justify-content: flex-end;
margin-right: 20px;
margin-bottom: 10px;
}
.total-wrapper {
padding: 20px;
}
<style lang="scss" scoped>
.editor-wrapper {
padding: 10px 20px;
}
.pulish-wrapper {
margin-top: 20px;
display: flex;
justify-content: flex-end;
margin-right: 20px;
margin-bottom: 10px;
}
.total-wrapper {
padding: 20px;
}
</style>
<template>
<div class="total-wrapper">
<el-form
ref="addform"
:model="formInfo"
:rules="rules"
>
<el-form ref="addform" :model="formInfo" :rules="rules">
<el-form-item label="通知通告标题" :label-width="'120px'" prop="title">
<el-input v-model="formInfo.title" :maxlength="50" style="width: 500px" />
<el-input
v-model="formInfo.title"
:maxlength="50"
style="width: 500px"
/>
</el-form-item>
<!-- <el-form-item label="发布部门" :label-width="'120px'" prop="depart">
<el-input v-model="formInfo.depart" :maxlength="50" style="width: 500px" />
<el-select v-model="formInfo.depart" placeholder="请选择部门">
......@@ -53,117 +53,125 @@
</template>
<script>
import Editor from '@tinymce/tinymce-vue'
import { putNotice } from '@/api/opeAdvice.js'
import Editor from "@tinymce/tinymce-vue";
import { putNotice } from "@/api/opeAdvice.js";
export default {
components: {
'editor': Editor
editor: Editor
},
data() {
return {
formInfo: {
title: '',
depart: '',
time: '',
content: ''
title: "",
depart: "",
time: "",
content: ""
},
rules: {
title: [
{
required: true,
message: '请输入标题',
trigger: 'blur'
message: "请输入标题",
trigger: "blur"
}
]
},
// 经法局列表
departList: [
{
value: '经发局(应急局)',
label: '经发局(应急局)'
value: "经发局(应急局)",
label: "经发局(应急局)"
},
{
value: '建设局',
label: '建设局'
value: "建设局",
label: "建设局"
},
{
value: '市场监督管理局',
label: '市场监督管理局'
value: "市场监督管理局",
label: "市场监督管理局"
},
{
value: '生态环境局',
label: '生态环境局'
value: "生态环境局",
label: "生态环境局"
},
{
value: '商务局',
label: '商务局'
value: "商务局",
label: "商务局"
}
]
}
};
},
mounted() {
const curLawItem = localStorage.getItem('curAdviceItem1')
const curLawItem = localStorage.getItem("curAdviceItem1");
if (curLawItem) {
// localStorage.setItem('curLawItem', )
this.formInfo = { ...JSON.parse(curLawItem) }
this.formInfo = { ...JSON.parse(curLawItem) };
} else {
console.log(this.$store.getters.curAdviceItem, 'this.$store.getters.curAdviceItem')
this.formInfo = { ...this.$store.getters.curAdviceItem }
console.log(
this.$store.getters.curAdviceItem,
"this.$store.getters.curAdviceItem"
);
this.formInfo = { ...this.$store.getters.curAdviceItem };
}
},
methods: {
publishLaw() {
// 校验
this.$refs.addform.validate((valid) => {
this.$refs.addform.validate(valid => {
if (valid) {
// 发布
// 调用 axios
// 调用 localStorage 的removeItem()方法去掉 curLawItem
putNotice({...this.formInfo, noticeTitle: this.formInfo.title,noticeContent: this.formInfo.content})
.then(res => {
console.log(res, 'putNotice')
this.$message({
type: 'success',
message: '修改成功'
})
localStorage.removeItem('curAdviceItem1')
window.history.back()
}).catch(() => {
this.$message.error('修改失败')
putNotice({
...this.formInfo,
noticeTitle: this.formInfo.title,
noticeContent: this.formInfo.content
})
.then(res => {
console.log(res, "putNotice");
this.$message({
type: "success",
message: "修改成功"
});
localStorage.removeItem("curAdviceItem1");
window.history.back();
})
.catch(() => {
this.$message.error("修改失败");
});
} else {
this.$message.error('请输入信息')
this.$message.error("请输入信息");
}
})
});
},
clearContent() {
this.formInfo.title = ''
this.formInfo.depart = ''
this.formInfo.time = ''
this.formInfo.content = ''
this.formInfo.title = "";
this.formInfo.depart = "";
this.formInfo.time = "";
this.formInfo.content = "";
// 调用 localStorage 的removeItem()方法去掉 curLawItem
localStorage.removeItem('curAdviceItem1')
localStorage.removeItem("curAdviceItem1");
},
saveStorage() {
//
// localStorage.getItem
localStorage.setItem('curAdviceItem1', JSON.stringify(this.formInfo))
localStorage.setItem("curAdviceItem1", JSON.stringify(this.formInfo));
}
}
}
};
</script>
<style lang="scss">
.editor-wrapper {
padding: 10px 20px;
}
.pulish-wrapper {
margin-top: 20px;
display: flex;
justify-content: flex-end;
margin-right: 20px;
}
.total-wrapper {
padding: 30px;
}
<style lang="scss" scoped>
.editor-wrapper {
padding: 10px 20px;
}
.pulish-wrapper {
margin-top: 20px;
display: flex;
justify-content: flex-end;
margin-right: 20px;
}
.total-wrapper {
padding: 30px;
}
</style>
......@@ -2,8 +2,12 @@
<div class="total-wrpaper">
<div class="tool-wrapper">
<el-button type="primary" @click="addDialogShow">新增</el-button>
<el-button :disabled="isEditable" type="warning" @click="editAdvices">编辑</el-button>
<el-button :disabled="isDeleteable" type="danger" @click="deleteAdvices">删除</el-button>
<el-button :disabled="isEditable" type="warning" @click="editAdvices"
>编辑</el-button
>
<el-button :disabled="isDeleteable" type="danger" @click="deleteAdvices"
>删除</el-button
>
</div>
<div class="table-wrapper">
<el-table
......@@ -12,23 +16,10 @@
border
@selection-change="handleSelectionChange"
>
<el-table-column
type="selection"
width="55"
/>
<el-table-column
prop="title"
label="标题"
width="780"
/>
<el-table-column
prop="depart"
label="发布人"
/>
<el-table-column
prop="time"
label="发布时间"
/>
<el-table-column type="selection" width="55" />
<el-table-column prop="title" label="标题" width="780" />
<el-table-column prop="depart" label="发布人" />
<el-table-column prop="time" label="发布时间" />
</el-table>
<el-pagination
:current-page="currentPage"
......@@ -44,15 +35,19 @@
</template>
<script>
import { getNotice, postNotice, putNotice, deleteNotice} from '@/api/opeAdvice.js'
import {
getNotice,
postNotice,
putNotice,
deleteNotice
} from "@/api/opeAdvice.js";
export default {
data() {
return {
tableData: [
],
inputDate: '',
keyword: '',
publishPerson: '',
tableData: [],
inputDate: "",
keyword: "",
publishPerson: "",
multipleSelection: [],
isEditable: true,
isDeleteable: true,
......@@ -60,32 +55,32 @@ export default {
addDialogFormVisible: false,
// form
formInfo: {
title: '',
depart: '',
time: '',
content: ''
title: "",
depart: "",
time: "",
content: ""
},
// 经发局列表
departList: [
{
value: '经发局(应急局)',
label: '经发局(应急局)'
value: "经发局(应急局)",
label: "经发局(应急局)"
},
{
value: '建设局',
label: '建设局'
value: "建设局",
label: "建设局"
},
{
value: '市场监督管理局',
label: '市场监督管理局'
value: "市场监督管理局",
label: "市场监督管理局"
},
{
value: '生态环境局',
label: '生态环境局'
value: "生态环境局",
label: "生态环境局"
},
{
value: '商务局',
label: '商务局'
value: "商务局",
label: "商务局"
}
],
// 规则
......@@ -99,50 +94,50 @@ export default {
title: [
{
required: true,
message: '请输入标题',
trigger: 'blur'
message: "请输入标题",
trigger: "blur"
}
],
depart: [
{
required: true,
message: '请选择经管部门',
trigger: 'change'
message: "请选择经管部门",
trigger: "change"
}
],
time: [
{
required: true,
message: '请选择发布时间',
trigger: 'change'
message: "请选择发布时间",
trigger: "change"
}
],
content: [
{
required: true,
message: '请输入内容',
trigger: 'blur'
message: "请输入内容",
trigger: "blur"
}
]
},
currentPage: 1,
curPageSize: 10,
totalColumn: 40
}
};
},
mounted() {
this.initAllNotices()
this.initAllNotices();
},
methods: {
handleSelectionChange(val) {
this.multipleSelection = val
this.isEditable = true
this.isDeleteable = true
this.multipleSelection = val;
this.isEditable = true;
this.isDeleteable = true;
if (this.multipleSelection.length === 1) {
this.isEditable = false
this.isEditable = false;
}
if (this.multipleSelection.length > 0) {
this.isDeleteable = false
this.isDeleteable = false;
}
},
// 显示增加对话框
......@@ -153,41 +148,45 @@ export default {
// this.formInfo.content = ''
// this.addDialogFormVisible = true
this.$router.push({
path: '/train/advice/addadvice'
})
path: "/train/advice/addadvice"
});
},
// 发布通知通告
publishAdvice() {
this.$refs['addform'].validate((valid) => {
this.$refs["addform"].validate(valid => {
if (valid) {
// 发布
} else {
this.$message.error('请输入信息')
this.$message.error("请输入信息");
}
})
});
},
// 编辑通知通告
editAdvices() {
// console.log(this.multipleSelection, '当前选择的通知通告')
// console.log(this.$store.advice.curAdviceItem, 'this.$store.advice.curAdviceItem')
this.$store.dispatch('setAdviceItem', this.multipleSelection[0]).then(() => {
this.$router.push({
path: '/train/advice/editadvice'
})
})
this.$store
.dispatch("setAdviceItem", this.multipleSelection[0])
.then(() => {
this.$router.push({
path: "/train/advice/editadvice"
});
});
},
// 删除通知通告
deleteAdvices() {
deleteNotice(this.multipleSelection.map(item => item.noticeId))
.then(res => {
this.$message({
type: 'success',
message: '删除成功'
})
this.initAllNotices()
}, () => {
this.$message.error('删除失败')
})
deleteNotice(this.multipleSelection.map(item => item.noticeId)).then(
res => {
this.$message({
type: "success",
message: "删除成功"
});
this.initAllNotices();
},
() => {
this.$message.error("删除失败");
}
);
},
// 搜索通知通告
searchAdvice() {
......@@ -195,59 +194,57 @@ export default {
},
handleSizeChange(val) {
// 每页多少条
this.curPageSize = val
this.curPageSize = val;
},
handleCurrentChange(val) {
// 当前是多少页
this.currentPage = val
this.currentPage = val;
},
initAllNotices() {
getNotice({
page: this.currentPage - 1,
size: this.curPageSize,
sort: 'noticeId,desc'
}).then(res => {
console.log(res, 'getNotice initALlNotices')
res.content.forEach(item => {
item.title = item.noticeTitle
item.depart = item.noticePublisher
item.time = item.updateTime
item.content = item.noticeContent
sort: "noticeId,desc"
})
.then(res => {
console.log(res, "getNotice initALlNotices");
res.content.forEach(item => {
item.title = item.noticeTitle;
item.depart = item.noticePublisher;
item.time = item.updateTime;
item.content = item.noticeContent;
});
this.tableData = [...res.content];
this.totalColumn = res.totalElements;
})
this.tableData = [...res.content]
}).catch(() => {})
.catch(() => {});
}
}
}
};
</script>
<style lang="scss" scoped>
.total-wrpaper {
margin: 30px auto;
width: 80%;
box-shadow: 0 0 9px 1px #eee;
border-radius: 20px;
padding: 20px;
.tool-wrapper {
width: 80%;
margin: 30px auto;
box-shadow: 0 0 9px 1px #eee;
border-radius: 10px;
padding: 10px;
}
.law-search-wrapper {
width: 80%;
margin: 30px auto;
box-shadow: 0 0 9px 1px #eee;
border-radius: 10px;
padding: 10px;
}
.table-wrapper {
width: 80%;
margin: 30px auto;
box-shadow: 0 0 9px 1px #eee;
border-radius: 15px;
padding: 15px;
}
.total-wrpaper {
margin: 10px 10px;
border-radius: 5px;
padding: 10px;
.tool-wrapper {
margin: 10px 10px;
border-radius: 5px;
padding: 10px;
background: #fff;
}
.law-search-wrapper {
margin: 10px 10px;
border-radius: 5px;
padding: 10px;
background: #fff;
}
.table-wrapper {
margin: 10px 10px;
border-radius: 5px;
padding: 10px;
background: #fff;
}
}
</style>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<template>
<div
class="hello-ezuikit-js"
style="width: 100%;height:100%;padding: 35px;display: flex; justify-content: center;"
>
<div
ref="monitordom"
id="ope-video-container"
style="width:90%;height:90%"
></div>
</div>
</template>
<script>
import EZUIKit from "ezuikit-js";
import axios from "axios";
const service = axios.create({});
export default {
name: "HelloWorld",
props: {
msg: String,
appKey: String,
appSecret: String,
filename: String,
devNumber: String
},
async mounted() {
console.group("mounted 组件挂载完毕状态===============》");
// let result = null;
let dataJson = "appKey=" + this.appKey + "&appSecret=" + this.appSecret;
service.defaults.headers["Content-Type"] =
"application/x-www-form-urlencoded; charset=UTF-8";
let result2 = null;
await service
.post("https://open.ys7.com/api/lapp/token/get", dataJson)
.then(res1 => {
console.log(res1, "service post");
result2 = res1;
});
if (result2.data.code === "200") {
const iframeText = this.getIframeText(
"ysOpenDevice",
this.devNumber,
this.filename,
result2.data.data.accessToken
);
this.$refs.monitordom.innerHTML = iframeText;
// this.$refs.monitordom.innerHTML = `<iframe src="https://open.ys7.com/ezopen/h5/iframe_se?url=ezopen://open.ys7.com/${
// this.devNumber
// }/${this.filename}&autoplay=1&audio=1&accessToken=${
// result2.data.data.accessToken
// }&templete=2"id="'${"ysOpenDevice"}'" width="100%" height="100%" frameborder="no" border="0" allowfullscreen> </iframe>`;
// const player = new EZUIKit.EZUIKitPlayer({
// autoplay: true,
// id: "ope-video-container",
// accessToken: result2.data.data.accessToken,
// url: `ezopen://open.ys7.com/${this.devNumber}/${this.filename}`,
// template: "simple" // simple - 极简版;standard-标准版;security - 安防版(预览回放);voice-语音版;
// // footer: ["fullScreen"],
// // 视频上方头部控件
// // header: ["capturePicture", "save", "zoom"] // 如果templete参数不为simple,该字段将被覆盖
// // plugin: ['talk'], // 加载插件,talk-对讲
// // 视频下方底部控件
// // footer: ["talk", "broadcast", "hd", "fullScreen"], // 如果template参数不为simple,该字段将被覆盖
// // audio: 1, // 是否默认开启声音 0 - 关闭 1 - 开启
// // openSoundCallBack: data => console.log("开启声音回调", data),
// // closeSoundCallBack: data => console.log("关闭声音回调", data),
// // startSaveCallBack: data => console.log("开始录像回调", data),
// // stopSaveCallBack: data => console.log("录像回调", data),
// // capturePictureCallBack: data => console.log("截图成功回调", data),
// // fullScreenCallBack: data => console.log("全屏回调", data),
// // getOSDTimeCallBack: data => console.log("获取OSDTime回调", data),
// // width: 600,
// // height: 400
// });
// player.play();
}
// console.log("player", player);
// setTimeout(()=>{
// player.stop(); // 方法调用示例,10秒后关闭视频
// },10000)
},
methods: {
getIframeText(idName, filename, devNumber, accessToken) {
return (
'<iframe src="https://open.ys7.com/ezopen/h5/iframe_se?url=ezopen://open.ys7.com/' +
devNumber +
"/" +
filename +
"&autoplay=1&audio=1&accessToken=" +
accessToken +
'&templete=2" id="' +
idName +
'" width="100%" height="100%" frameborder="no" border="0" allowfullscreen> </iframe>'
);
}
},
getAccessToken(appKey, appSecret) {
var dataJson = "appKey=" + appKey + "&appSecret=" + appSecret;
var request = axios.create({});
request.defaults.headers["Content-Type"] =
"application/x-www-form-urlencoded; charset=UTF-8";
return request
.post("https://open.ys7.com/api/lapp/token/get", dataJson)
.then(res => {
var data = res.data || {};
if (data["code"] == "200") {
return data["data"]["accessToken"];
} else {
return null;
}
})
.catch(err => {
console.log(err);
return err;
});
}
};
</script>
<style lang="scss" scoped>
.hello-ezuikit-js {
display: flex;
align-items: center;
justify-content: center;
}
.ope-video-container {
width: 96%;
height: 70%;
}
</style>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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