Merge branch 'bjxz-dev' of http://139.9.66.234:18023/dhp/zhgdyun into bjxz-rain
This commit is contained in:
commit
fcd77ab949
@ -18,6 +18,5 @@ export const getProjectExtendInfoApi = data => post('xmgl/projectExtend/getProje
|
|||||||
export const editProjectExtendApi = data => post('xmgl/projectExtend/editProjectExtend', data); //编辑项目信息扩展信息
|
export const editProjectExtendApi = data => post('xmgl/projectExtend/editProjectExtend', data); //编辑项目信息扩展信息
|
||||||
export const getSafeEducationDataApi = data => post('xmgl/safeEducationQuestion/selectSafeEducationCoursePage', data); //获取安全教育培训数据列表
|
export const getSafeEducationDataApi = data => post('xmgl/safeEducationQuestion/selectSafeEducationCoursePage', data); //获取安全教育培训数据列表
|
||||||
|
|
||||||
|
export const configWeekVideoSaveApi = data => post('xmgl/educationConfigWeekVideo/save', data); //保存现场大屏视频数据
|
||||||
|
export const configWeekVideoListApi = data => get('xmgl/educationConfigWeekVideo/list', data); //获取现场大屏视频数据列表
|
||||||
|
|
||||||
@ -187,6 +187,7 @@ if (process.env.NODE_ENV == "development") {
|
|||||||
// axios.defaults.baseURL = 'http://47.93.215.234:11211/'//鞍钢测试地址(弃用)
|
// axios.defaults.baseURL = 'http://47.93.215.234:11211/'//鞍钢测试地址(弃用)
|
||||||
// axios.defaults.baseURL = 'http://42.180.188.17:11211/' //鞍钢测试地址
|
// axios.defaults.baseURL = 'http://42.180.188.17:11211/' //鞍钢测试地址
|
||||||
// axios.defaults.baseURL = 'http://8.136.222.164:8808/' //中科安信正式地址
|
// axios.defaults.baseURL = 'http://8.136.222.164:8808/' //中科安信正式地址
|
||||||
|
axios.defaults.baseURL = 'http://1.13.185.209:9820/' //中科佳成正式地址
|
||||||
} else if (process.env.NODE_ENV == "debug") {
|
} else if (process.env.NODE_ENV == "debug") {
|
||||||
axios.defaults.baseURL = "https://www.ceshi.com";
|
axios.defaults.baseURL = "https://www.ceshi.com";
|
||||||
} else if (process.env.NODE_ENV == "production") {
|
} else if (process.env.NODE_ENV == "production") {
|
||||||
|
|||||||
@ -1178,7 +1178,7 @@ export default {
|
|||||||
if (!arr2.length) {
|
if (!arr2.length) {
|
||||||
if (this.loginType == 1) {
|
if (this.loginType == 1) {
|
||||||
// this.$router.push("/projectIndex");
|
// this.$router.push("/projectIndex");
|
||||||
if (!this.$store.state.userInfo.personMail) {
|
if (!this.$store.state.userInfo.personMail && this.company == 'agjt') {
|
||||||
this.checkInfoComplete();
|
this.checkInfoComplete();
|
||||||
}
|
}
|
||||||
this.$router.push("/workSpace");
|
this.$router.push("/workSpace");
|
||||||
@ -1196,7 +1196,7 @@ export default {
|
|||||||
) {
|
) {
|
||||||
if (this.loginType == 1) {
|
if (this.loginType == 1) {
|
||||||
// this.$router.push("/projectIndex");
|
// this.$router.push("/projectIndex");
|
||||||
if (!this.$store.state.userInfo.personMail) {
|
if (!this.$store.state.userInfo.personMail && this.company == 'agjt') {
|
||||||
this.checkInfoComplete();
|
this.checkInfoComplete();
|
||||||
}
|
}
|
||||||
this.$router.push("/workSpace");
|
this.$router.push("/workSpace");
|
||||||
|
|||||||
@ -338,6 +338,32 @@
|
|||||||
type="textarea"
|
type="textarea"
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
label="配置现场大屏视频"
|
||||||
|
>
|
||||||
|
<div class="videoBtn">
|
||||||
|
<div class="videoInner" v-for="(item, index) in dialogInfo.videoUploadList" :key="index" >
|
||||||
|
<el-upload
|
||||||
|
ref="upload"
|
||||||
|
class="upload-demo"
|
||||||
|
:action="$store.state.UPLOADURL"
|
||||||
|
:on-success="file => handleSuccess(file, index)"
|
||||||
|
:beforeUpload="handleBeforeUploadVideo"
|
||||||
|
name="files"
|
||||||
|
:show-file-list="false"
|
||||||
|
>
|
||||||
|
<el-button type="primary" size="medium">{{item.title}}<i class="el-icon-upload"></i></el-button>
|
||||||
|
</el-upload>
|
||||||
|
</div>
|
||||||
|
<!-- <div class="videoInner" @click="uploadVideo(1)"><el-button type="primary" size="medium">{{item.title}}<i class="el-icon-upload"></i></el-button></div>
|
||||||
|
<div class="videoInner" @click="uploadVideo(2)"><el-button type="primary" size="medium">{{item.title}}<i class="el-icon-upload"></i></el-button></div>
|
||||||
|
<div class="videoInner" @click="uploadVideo(3)"><el-button type="primary" size="medium">{{item.title}}<i class="el-icon-upload"></i></el-button></div>
|
||||||
|
<div class="videoInner" @click="uploadVideo(4)"><el-button type="primary" size="medium">{{item.title}}<i class="el-icon-upload"></i></el-button></div>
|
||||||
|
<div class="videoInner" @click="uploadVideo(5)"><el-button type="primary" size="medium">{{item.title}}<i class="el-icon-upload"></i></el-button></div>
|
||||||
|
<div class="videoInner" @click="uploadVideo(6)"><el-button type="primary" size="medium">{{item.title}}<i class="el-icon-upload"></i></el-button></div>
|
||||||
|
<div class="videoInner" @click="uploadVideo(7)"><el-button type="primary" size="medium">{{item.title}}<i class="el-icon-upload"></i></el-button></div> -->
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
<el-button
|
<el-button
|
||||||
@ -367,12 +393,20 @@
|
|||||||
import {
|
import {
|
||||||
getProjectExtendInfoApi,
|
getProjectExtendInfoApi,
|
||||||
editProjectExtendApi,
|
editProjectExtendApi,
|
||||||
getSafeEducationDataApi
|
getSafeEducationDataApi,
|
||||||
|
configWeekVideoListApi,
|
||||||
|
configWeekVideoSaveApi
|
||||||
} from "@/assets/js/api/baseInfo.js";
|
} from "@/assets/js/api/baseInfo.js";
|
||||||
|
import axios from "axios";
|
||||||
export default {
|
export default {
|
||||||
name: "extendInfo",
|
name: "extendInfo",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
videoConfigData:'',
|
||||||
|
dialogInfo:{
|
||||||
|
postData:'',
|
||||||
|
videoUploadList:[{id:1,title:'周一'},{id:1,title:'周二'},{id:1,title:'周三'},{id:1,title:'周四'},{id:1,title:'周五'},{id:1,title:'周六'},{id:1,title:'周日'}],
|
||||||
|
},
|
||||||
projectDialogTitle: this.$t("message.extendInfo.editProjectInfo"),
|
projectDialogTitle: this.$t("message.extendInfo.editProjectInfo"),
|
||||||
editProjectDialog: false,
|
editProjectDialog: false,
|
||||||
editProjectForm: {
|
editProjectForm: {
|
||||||
@ -411,10 +445,88 @@ export default {
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.projectSn = this.$store.state.projectSn;
|
this.projectSn = this.$store.state.projectSn;
|
||||||
|
console.log(axios.defaults.baseURL,"777777777777777")
|
||||||
this.getProjectExtendInfo();
|
this.getProjectExtendInfo();
|
||||||
this.getEducationListFn();
|
this.getEducationListFn();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
async configWeekVideoListFn(){
|
||||||
|
let data = {
|
||||||
|
projectSn: ''
|
||||||
|
}
|
||||||
|
if(axios.defaults.baseURL == 'http://182.90.224.237:51234/' || axios.defaults.baseURL == 'http://192.168.34.221:9111/') data.projectSn = 'BD3137498CB84BF0969979E0342CDBCA'
|
||||||
|
if(axios.defaults.baseURL == 'http://42.180.188.17:9809/' || axios.defaults.baseURL == 'http://42.180.188.17:11211/') data.projectSn = '471568F45EB247A3912A0D10EA1BFCEB'
|
||||||
|
await configWeekVideoListApi(data).then(res =>{
|
||||||
|
if (res.result) {
|
||||||
|
this.videoConfigData = res.result;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
async configWeekVideoEditFn(url,weekIndex){
|
||||||
|
console.log(url);
|
||||||
|
let requestData = {
|
||||||
|
// projectSn: this.$store.state.projectSn,
|
||||||
|
projectSn: "",
|
||||||
|
type: 3
|
||||||
|
};
|
||||||
|
if(axios.defaults.baseURL == 'http://182.90.224.237:51234/' || axios.defaults.baseURL == 'http://192.168.34.221:9111/') requestData.projectSn = 'BD3137498CB84BF0969979E0342CDBCA'
|
||||||
|
if(axios.defaults.baseURL == 'http://42.180.188.17:9809/' || axios.defaults.baseURL == 'http://42.180.188.17:11211/') requestData.projectSn = '471568F45EB247A3912A0D10EA1BFCEB'
|
||||||
|
// 星期参数
|
||||||
|
console.log("=============================")
|
||||||
|
console.log(weekIndex,"weekIndex")
|
||||||
|
console.log("=============================")
|
||||||
|
// const today = weekIndex == 6 ? 0 : weekIndex + 1;
|
||||||
|
// const weekParamsKey = ["sun", "mon", "tues", "wed", "thur", "fri", "sat"];
|
||||||
|
// requestData[weekParamsKey[+today]] = url;
|
||||||
|
if(weekIndex == 0) requestData.mon = url
|
||||||
|
if(weekIndex == 1) requestData.tues = url
|
||||||
|
if(weekIndex == 2) requestData.wed = url
|
||||||
|
if(weekIndex == 3) requestData.thur = url
|
||||||
|
if(weekIndex == 4) requestData.fri = url
|
||||||
|
if(weekIndex == 5) requestData.sat = url
|
||||||
|
if(weekIndex == 6) requestData.sun = url
|
||||||
|
|
||||||
|
// type参数
|
||||||
|
// 项目看板:1 总览大屏:2 现场大屏:3
|
||||||
|
requestData.type = 3
|
||||||
|
// id参数
|
||||||
|
if (this.videoConfigData && this.videoConfigData.length) {
|
||||||
|
requestData.id = this.videoConfigData[0].id;
|
||||||
|
}
|
||||||
|
const res = await configWeekVideoSaveApi(requestData);
|
||||||
|
if (res.success) {
|
||||||
|
console.log("修改成功", res);
|
||||||
|
this.$message({
|
||||||
|
showClose: true,
|
||||||
|
message: "上传成功",
|
||||||
|
type: "success"
|
||||||
|
});
|
||||||
|
// configWeekVideoListFn(true);
|
||||||
|
// emits("updateConfig");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleSuccess(file,index){
|
||||||
|
if (file.code == 200 || file.status == "SUCCESS") {
|
||||||
|
console.log(file, "上传成功");
|
||||||
|
let url = file.data[0].imageUrl;
|
||||||
|
// this.imgUrl = url;
|
||||||
|
this.configWeekVideoEditFn( url, index);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleBeforeUploadVideo(file){
|
||||||
|
console.log(file, "上传之前");
|
||||||
|
let fileType = file.type.split("/")[0];
|
||||||
|
if (fileType == "video") {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
this.$message({
|
||||||
|
showClose: true,
|
||||||
|
message: "请选择正确的视频文件",
|
||||||
|
type: "warning"
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
},
|
||||||
getEducationListFn() {
|
getEducationListFn() {
|
||||||
let requestData = {
|
let requestData = {
|
||||||
projectSn: this.projectSn,
|
projectSn: this.projectSn,
|
||||||
@ -527,6 +639,14 @@ export default {
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
.videoBtn{
|
||||||
|
width: 320px;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
.videoInner{
|
||||||
|
width: 80px;
|
||||||
|
}
|
||||||
|
}
|
||||||
.flex {
|
.flex {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user