feat:添加外链接口对接 完善添加直播

This commit is contained in:
songwc
2022-11-01 12:21:18 +08:00
parent 2c3edeaf24
commit 06633222be
4 changed files with 1167 additions and 912 deletions

View File

@@ -0,0 +1,19 @@
import http from "./config";
//创建外链接口
export const createExternalChain = (obj) => http.post('/link/createLinks', obj)
//外链信息删除接口
export const deleteLink = (obj) => http.post('/link/deleteLink', { params: obj })
//获取外链详细信息接口
export const getLink = (obj) => http.post('/link/getOne', { params: obj })
// 更新外链数据
export const updateLinks = (obj) => http.post('/link/updateLinks', obj)
//修改为必修的接口
export const updateToCompulsory = (obj) => http.post('/link/updateToCompulsory', { params: obj })
//修改为选修的接口
export const updateToElective = (obj) => http.post('/link/updateToElective', { params: obj })

View File

@@ -65,7 +65,6 @@
<a-range-picker
style="width: 424px"
v-model:value="time"
format="YYYY-MM-DD HH:MM"
:placeholder="[' 开始时间', ' 结束时间']"
/>
</div>
@@ -110,7 +109,7 @@
<div class="signbox">
<span style="margin-right: 3px">直播封面</span>
</div>
<div class="textarea">
<div class="textarea" style="overflow: hidden">
<a-upload
v-model:file-list="fileList"
name="avatar"
@@ -279,7 +278,7 @@
</div>
</div>
<div class="main_btns">
<button class="btn1">取消</button>
<button class="btn1" @click="closeDrawer">取消</button>
<button class="btn2" @click="createLiveBroadcast">确定</button>
</div>
</div>
@@ -289,6 +288,13 @@
import { reactive, toRefs, ref } from "vue";
import { message } from "ant-design-vue";
import * as api from "../../api/indexLiveBroadcast";
import { toDate } from "@/api/method";
function getBase64(img, callback) {
const reader = new FileReader();
reader.addEventListener("load", () => callback(reader.result));
reader.readAsDataURL(img);
}
const options1 = ref([
{
value: "value1",
@@ -465,6 +471,8 @@ export default {
inputV8: "", //结束前多少分钟开始签退
textV1: "",
radioV1: "", //标准设置的单选
imageUrl: "", //上传图片地址
loading: false,
switchC1: "",
checkedC1: "",
checkedC2: true,
@@ -474,6 +482,18 @@ export default {
ctx.emit("update:addliveVisible", false);
state.radioV1 = "";
state.playback = false;
state.inputV6 = "";
state.inputV7 = "";
state.inputV2 = "";
state.inputV3 = "";
state.inputV1 = "";
state.inputV4 = "";
state.inputV5 = "";
state.inputV8 = "";
state.time = "";
state.textV1 = "";
state.switchC1 = "";
state.imageUrl = "";
};
const afterVisibleChange = (bool) => {
console.log("state", bool);
@@ -487,23 +507,66 @@ export default {
state.radioV1 = "";
}
};
const handleChange = (info) => {
if (info.file.status === "uploading") {
state.loading = true;
return;
}
if (info.file.status === "done") {
// Get this url from response in real world.
getBase64(info.file.originFileObj, (base64Url) => {
state.imageUrl = base64Url;
state.loading = false;
});
}
if (info.file.status === "error") {
state.loading = false;
message.error("upload error");
}
};
const beforeUpload = (file) => {
const isJpgOrPng =
file.type === "image/jpeg" || file.type === "image/png";
if (!isJpgOrPng) {
message.error("You can only upload JPG file!");
}
const isLt2M = file.size / 1024 / 1024 < 2;
if (!isLt2M) {
message.error("Image must smaller than 2MB!");
}
return isJpgOrPng && isLt2M;
};
//创建直播
const createLiveBroadcast = () => {
if (!state.inputV1) return message.info("请输入直播名称");
if (!state.time) return message.info("请输入直播时间");
if (!state.inputV2) return message.info("请输入直播时长");
if (!state.inputV1) return message.warning("请输入直播名称");
if (!state.time) return message.warning("请输入直播时间");
if (!state.inputV2) return message.warning("请输入直播时长");
const regular = /^[+]{0,1}(\d+)$/;
if (!regular.test(state.inputV2)) {
return message.info("直播时长需大于0");
return message.warning("直播时长需大于0");
}
// if (!state.inputV3) return message.info("请输入授课老师");
let check = state.checkedC2 * 1;
let startTime = state.time[0].$d;
let endTime = state.time[1].$d;
console.log(startTime); //时间需要处理
console.log(endTime);
// let startTime = state.time[0].$d;
// let endTime = state.time[1].$d;
// console.log(startTime); //时间需要处理
// console.log(endTime);
let startTime = toDate(
new Date(state.time[0].$d).getTime() / 1000,
"Y-M-D"
);
let endTime = toDate(
new Date(state.time[1].$d).getTime() / 1000,
"Y-M-D"
);
let obj = {
afterSignIn: state.inputV6,
beforeSignIn: state.inputV7,
@@ -511,8 +574,8 @@ export default {
createUser: 0,
// liveCover: state.fileList,//直播封面
liveDuration: state.inputV2,
// liveEndTime: endTime,
// liveStartTime: startTime,
liveEndTime: endTime,
liveStartTime: startTime,
liveExplain: state.textV1,
liveFlag: "",
liveId: 0,
@@ -532,6 +595,11 @@ export default {
.createLiveBroadcast(obj)
.then((res) => {
console.log(res.data.data, 1111);
console.log(state, 2222);
message.success("提交成功");
closeDrawer();
// state = {}
})
.catch((err) => {
console.log(err, 2222);
@@ -548,6 +616,8 @@ export default {
rowSelection,
cloradio1,
createLiveBroadcast,
handleChange,
beforeUpload,
};
},
};

View File

@@ -67,18 +67,19 @@
/>
</div>
</div>
</div>
</div>
<div class="main_btns">
<button class="btn1">取消</button>
<button class="btn2">确定</button>
<button class="btn1" @click="closeDrawer">取消</button>
<button class="btn2" @click="createExternalChain">确定</button>
</div>
</div>
</a-drawer>
</template>
<script>
import { reactive, toRefs, ref } from "vue";
import * as api from "../../api/indexExternalChain";
import { message } from "ant-design-vue";
const rowSelection = ref({
checkStrictly: false,
onChange: (selectedRowKeys, selectedRows) => {
@@ -113,15 +114,46 @@
});
const closeDrawer = () => {
ctx.emit("update:addrefVisible", false);
state.inputV2 = "";
state.inputV1 = "";
state.textV1 = "";
};
const afterVisibleChange = (bool) => {
console.log("state", bool);
};
const createExternalChain = () => {
console.log(Object.prototype.toString.call(state.inputV1));
console.log(Object.prototype.toString.call(state.inputV2));
console.log(Object.prototype.toString.call(state.textV1));
let obj = {
createUser: 0,
createTime: "",
linkAddress: state.inputV2,
linkDescription: state.textV1,
linkFlag: "",
linkId: 0,
linkName: state.inputV1,
linkTag: "",
updateTime: "",
updateUser: 0,
};
api
.createExternalChain(obj)
.then((res) => {
console.log(res.data.data);
message.success("提交成功");
closeDrawer();
})
.catch((err) => {
console.log(err);
});
};
return {
...toRefs(state),
afterVisibleChange,
closeDrawer,
rowSelection,
createExternalChain,
};
},
};

View File

@@ -11,32 +11,58 @@
<div class="main">
<div class="name">
<div class="namebox">
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
<img
class="nameimg"
src="../../assets/images/basicinfo/asterisk.png"
/>
<div class="inname">项目名称</div>
</div>
<div class="in">
<a-input v-model:value="projectName" placeholder="请输入项目名称" show-count :maxlength="30" />
<a-input
v-model:value="projectName"
placeholder="请输入项目名称"
show-count
:maxlength="30"
/>
</div>
</div>
<div class="name">
<div class="namebox">
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
<img
class="nameimg"
src="../../assets/images/basicinfo/asterisk.png"
/>
<div class="inname">分类</div>
</div>
<div class="in select">
<a-select :getPopupContainer="triggerNode => {
return triggerNode.parentNode || document.body
}" v-model:value="classifySelect" placeholder="四个养成" style="width: 100%" :options="classifyList"
@change="classificationChange" allowClear showSearch>
<a-select
:getPopupContainer="
(triggerNode) => {
return triggerNode.parentNode || document.body;
}
"
v-model:value="classifySelect"
placeholder="四个养成"
style="width: 100%"
:options="classifyList"
@change="classificationChange"
allowClear
showSearch
>
</a-select>
</div>
</div>
<div class="name">
<div class="namebox">
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
<img
class="nameimg"
src="../../assets/images/basicinfo/asterisk.png"
/>
<div class="inname">封面图</div>
</div>
<div class="box" style="
<div
class="box"
style="
width: 100px;
height: 100px;
border: 1px solid rgba(78, 166, 255, 1);
@@ -44,11 +70,29 @@
cursor: pointer;
position: relative;
overflow: hidden;
">
<a-upload v-model:file-list="fileList" name="file" list-type="picture-card" class="avatar-uploader"
:show-upload-list="false" action="/api/file/upload" :before-upload="beforeUpload" @change="handleChange">
<img style="width: 100px;height: 100px;margin-bottom: 4px;margin-right: 4px;" v-if="imageUrl"
:src="imageUrl" alt="avatar" />
"
>
<a-upload
v-model:file-list="fileList"
name="file"
list-type="picture-card"
class="avatar-uploader"
:show-upload-list="false"
action="/api/file/upload"
:before-upload="beforeUpload"
@change="handleChange"
>
<img
style="
width: 100px;
height: 100px;
margin-bottom: 4px;
margin-right: 4px;
"
v-if="imageUrl"
:src="imageUrl"
alt="avatar"
/>
<div v-else>
<!-- <loading-outlined v-if="loading"></loading-outlined> -->
<!-- <plus-outlined v-else></plus-outlined> -->
@@ -61,31 +105,55 @@
</div>
<div class="name">
<div class="namebox">
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
<img
class="nameimg"
src="../../assets/images/basicinfo/asterisk.png"
/>
<div class="inname">项目时间</div>
</div>
<div class="in">
<a-range-picker separator="至" :placeholder="[' 开始时间', ' 结束时间']"
style="width: 100%; height: 40px; border-radius: 5px" show-time @change="onRangeChange" />
<a-range-picker
separator="至"
:placeholder="[' 开始时间', ' 结束时间']"
style="width: 100%; height: 40px; border-radius: 5px"
show-time
@change="onRangeChange"
/>
</div>
</div>
<div class="name">
<div class="namebox">
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
<img
class="nameimg"
src="../../assets/images/basicinfo/asterisk.png"
/>
<div class="inname">项目经理</div>
</div>
<div class="in select">
<a-select :getPopupContainer="triggerNode => {
return triggerNode.parentNode || document.body
}" :value="classifySelect1" placeholder="请选择项目经理" style="width: 100%" :options="classifyList1"
@change="classificationChange1" allowClear showSearch>
<a-select
:getPopupContainer="
(triggerNode) => {
return triggerNode.parentNode || document.body;
}
"
:value="classifySelect1"
placeholder="请选择项目经理"
style="width: 100%"
:options="classifyList1"
@change="classificationChange1"
allowClear
showSearch
>
</a-select>
</div>
</div>
<div class="name">
<div class="namebox">
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
<img
class="nameimg"
src="../../assets/images/basicinfo/asterisk.png"
/>
<div class="inname">资源归属</div>
</div>
@@ -98,7 +166,13 @@
<div class="inname" style="margin-top: 13px">项目说明</div>
</div>
<div class="in">
<a-textarea v-model:value="remark" style="height: 80px" placeholder="请输入说明" show-count :maxlength="200" />
<a-textarea
v-model:value="remark"
style="height: 80px"
placeholder="请输入说明"
show-count
:maxlength="200"
/>
</div>
</div>
<div class="name name2">
@@ -106,57 +180,99 @@
<div class="inname">同步学习记录</div>
</div>
<div class="in">
<a-radio @click="changeChecked" v-model:checked="checked"><span style="
<a-radio @click="changeChecked" v-model:checked="checked"
><span
style="
width: 100%;
color: rgba(109, 117, 132, 1);
font-size: 14px;
">同步课程学习记录如学员在课程库中拥有课程的学习记录自动免修该课程</span></a-radio>
"
>同步课程学习记录如学员在课程库中拥有课程的学习记录自动免修该课程</span
></a-radio
>
</div>
</div>
<div class="name">
<div class="namebox">
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
<img
class="nameimg"
src="../../assets/images/basicinfo/asterisk.png"
/>
<div class="inname">项目级别</div>
</div>
<div class="in">
<a-input v-model:value="valueE1" placeholder="集团级/组织级/现地级/部门级" />
<a-input
v-model:value="valueE1"
placeholder="集团级/组织级/现地级/部门级"
/>
</div>
</div>
<div class="name">
<div class="namebox">
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
<img
class="nameimg"
src="../../assets/images/basicinfo/asterisk.png"
/>
<div class="inname">培训体系</div>
</div>
<div class="in">
<a-input v-model:value="valueE2" placeholder="集团级/组织级/现地级/部门级" />
<a-input
v-model:value="valueE2"
placeholder="集团级/组织级/现地级/部门级"
/>
</div>
</div>
<div class="name">
<div class="namebox">
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
<img
class="nameimg"
src="../../assets/images/basicinfo/asterisk.png"
/>
<div class="inname">是否BOEU实施</div>
</div>
<div class="in">
<a-radio @click="changeChecked1" v-model:checked="checked1"><span style="
<a-radio @click="changeChecked1" v-model:checked="checked1"
><span
style="
width: 100%;
color: rgba(109, 117, 132, 1);
font-size: 14px;
">BOEU实施</span></a-radio>
"
>BOEU实施</span
></a-radio
>
</div>
</div>
<div class="name name2">
<div class="namebox" style="margin-top: 8px">
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
<img
class="nameimg"
src="../../assets/images/basicinfo/asterisk.png"
/>
<div class="inname">附件</div>
</div>
<div class="filebox">
<div>
<img v-if="fileList1.length < 6" class="fileimg" src="../../assets/images/projectadd/enclosure.png" />
<a-upload :disabled="fileList1.length > 5" :before-upload="beforeUpload1" v-model:file-list="fileList1"
@remove="removeFile" name="file" action="/api/file/upload" :headers="headers" @change="handleChange1">
<img
v-if="fileList1.length < 6"
class="fileimg"
src="../../assets/images/projectadd/enclosure.png"
/>
<a-upload
:disabled="fileList1.length > 5"
:before-upload="beforeUpload1"
v-model:file-list="fileList1"
@remove="removeFile"
name="file"
action="/api/file/upload"
:headers="headers"
@change="handleChange1"
>
<!-- <a-button> -->
<!-- <upload-outlined></upload-outlined> -->
<span v-if="fileList1.length > 5" class="filetext">上传数量已经达到最大值</span>
<span v-if="fileList1.length > 5" class="filetext"
>上传数量已经达到最大值</span
>
<span v-else class="filetext">上传附件</span>
<!-- </a-button> -->
</a-upload>
@@ -171,7 +287,13 @@
<div class="name">
<div class="inname" style="width: 50px">模板</div>
<div class="in select" style="margin-left: 2px">
<a-select v-model:value="value1" placeholder="请选择模板" :size="size" style="width: 100%" :options="options">
<a-select
v-model:value="value1"
placeholder="请选择模板"
:size="size"
style="width: 100%"
:options="options"
>
</a-select>
</div>
</div>
@@ -179,7 +301,9 @@
</div>
<div class="footer">
<div class="btn">
<a-button v-on:click="createProject" type="primary" class="btn1">确定</a-button>
<a-button v-on:click="createProject" type="primary" class="btn1"
>确定</a-button
>
<a-button class="btn2">取消</a-button>
</div>
</div>
@@ -187,7 +311,7 @@
</template>
<script>
import { reactive, toRefs, ref } from "vue";
import { message } from 'ant-design-vue';
import { message } from "ant-design-vue";
import * as api from "../../api/index";
export default {
@@ -200,15 +324,15 @@ export default {
checked1: false,
valueE: null,
valueE1: null,
valueE2: null
valueE2: null,
});
const projectName = ref('');
const projectName = ref("");
const classifyList = ref([
{ value: 1, label: '管理者' },
{ value: 2, label: '领军者' },
{ value: 3, label: '产业人' },
{ value: 1, label: "管理者" },
{ value: 2, label: "领军者" },
{ value: 3, label: "产业人" },
]);
let projectType = "";
@@ -220,23 +344,23 @@ export default {
function getBase64(img, callback) {
const reader = new FileReader();
reader.addEventListener('load', () => callback(reader.result));
reader.addEventListener("load", () => callback(reader.result));
reader.readAsDataURL(img);
}
const fileList = ref([]);
const fileList1 = ref([]);
const loading = ref(false);
const imageUrl = ref('');
let picUrl = '';
const imageUrl = ref("");
let picUrl = "";
const handleChange = (info) => {
if (info.file.status === 'uploading') {
if (info.file.status === "uploading") {
loading.value = true;
return;
}
if (info.file.status === 'done') {
console.log('上传图片返回的信息 %o', info)
if (info.file.status === "done") {
console.log("上传图片返回的信息 %o", info);
picUrl = info.file.response.data;
// Get this url from response in real world.
getBase64(info.file.originFileObj, (base64Url) => {
@@ -244,9 +368,9 @@ export default {
loading.value = false;
});
}
if (info.file.status === 'error') {
if (info.file.status === "error") {
loading.value = false;
message.error('upload error');
message.error("upload error");
}
};
@@ -255,12 +379,17 @@ export default {
let attach = "";
let attachData = "";
const handleChange1 = (info) => {
if (info.file.status === 'uploading') {
if (info.file.status === "uploading") {
loading.value = true;
return;
}
if (info.file.status === 'done') {
console.log('上传附件返回的信息 %o', info, info.fileList.length, uplodaFileCount)
if (info.file.status === "done") {
console.log(
"上传附件返回的信息 %o",
info,
info.fileList.length,
uplodaFileCount
);
let attachStr = "";
attachData = info.fileList;
@@ -268,10 +397,10 @@ export default {
if (attachData.length - 1 == i) {
attachStr += attachData[i].response.data;
} else {
attachStr += attachData[i].response.data + ',';
attachStr += attachData[i].response.data + ",";
}
}
console.log(attachStr)
console.log(attachStr);
attach = attachStr;
if (info.fileList.length > 5) {
@@ -280,20 +409,21 @@ export default {
uplodaFileCount = false;
}
}
if (info.file.status === 'error') {
if (info.file.status === "error") {
loading.value = false;
message.error('upload error');
message.error("upload error");
}
};
const beforeUpload = (file) => {
const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png';
const isJpgOrPng =
file.type === "image/jpeg" || file.type === "image/png";
if (!isJpgOrPng) {
message.error('You can only upload JPG file!');
message.error("You can only upload JPG file!");
}
const isLt2M = file.size / 1024 / 1024 < 1;
if (!isLt2M) {
message.error('Image must smaller than 1MB!');
message.error("Image must smaller than 1MB!");
}
return isJpgOrPng && isLt2M;
};
@@ -301,59 +431,61 @@ export default {
const beforeUpload1 = () => {
return new Promise((resovle, reject) => {
if (uplodaFileCount) {
message.info("上传文件数量已达最大数量")
message.info("上传文件数量已达最大数量");
return reject(false);
}
return resovle(true);
})
});
};
let beginTime = "";
let endTime = "";
const onRangeChange = (value, dateString) => {
console.log('Selected Time: ', value);
console.log("Selected Time: ", value);
// 项目时间选择函数
console.log('Formatted Selected Time: ', dateString);
console.log('Formatted Selected TimeStamp', new Date(dateString[0]).getTime())
console.log("Formatted Selected Time: ", dateString);
console.log(
"Formatted Selected TimeStamp",
new Date(dateString[0]).getTime()
);
beginTime = new Date(dateString[0]).getTime();
endTime = new Date(dateString[1]).getTime();
};
// 项目经理 后续接口调用
const classifyList1 = ref([
{ value: 1, label: '李俊国' },
{ value: 2, label: '将小米' },
{ value: 3, label: '刘孟君' },
{ value: 1, label: "李俊国" },
{ value: 2, label: "将小米" },
{ value: 3, label: "刘孟君" },
]);
let manager = "";
let managerId = "";
const classificationChange1 = (key) => {
console.log(`selected ${key}`);
console.log(classifyList1.value[key - 1].label)
manager = String(classifyList1.value[key - 1].label)
managerId = String(key)
console.log(classifyList1.value[key - 1].label);
manager = String(classifyList1.value[key - 1].label);
managerId = String(key);
};
// 资源归属 sourceBelongId 后续给接口
// 项目说明
const remark = ref('');
const remark = ref("");
let courseSyncFlag = 0;
const changeChecked = () => {
console.log(state.checked)
state.checked ? state.checked = false : state.checked = true;
console.log(state.checked);
state.checked ? (state.checked = false) : (state.checked = true);
courseSyncFlag = state.checked ? 1 : 0;
}
};
let boeFlag = 0;
const changeChecked1 = () => {
console.log(state.checked1)
state.checked1 ? state.checked1 = false : state.checked1 = true;
console.log(state.checked1);
state.checked1 ? (state.checked1 = false) : (state.checked1 = true);
boeFlag = state.checked1 ? 1 : 0;
}
};
const removeFile = (file) => {
const index = fileList1.value.indexOf(file);
@@ -366,70 +498,72 @@ export default {
attachStr = "";
}
for (let i = 0; i < fileList1["value"].length; i++) {
console.log(fileList1["value"][i].response.data)
console.log(fileList1["value"][i].response.data);
if (fileList1["value"].length - 1 == i) {
attachStr += fileList1["value"][i].response.data;
} else {
attachStr += fileList1["value"][i].response.data + ',';
attachStr += fileList1["value"][i].response.data + ",";
}
}
attach = attachStr;
}
};
const errorMsgs = {
"name": "请输入项目名称",
"type": "请选择项目分类",
"picUrl": "请上传项目封面图",
"beginTime": "请选择项目开始时间",
"endTime": "请选择项目结束时间",
"manager": "请选择项目经理",
"managerId": "请选择项目经理",
"sourceBelongId": "请选择资源归属",
"level": "请填写项目级别",
"systemId": "请填写项目培训体系",
"boeFlag": "请选择是否BOE实施",
"attach": "请上传附件"
}
name: "请输入项目名称",
type: "请选择项目分类",
picUrl: "请上传项目封面图",
beginTime: "请选择项目开始时间",
endTime: "请选择项目结束时间",
manager: "请选择项目经理",
managerId: "请选择项目经理",
sourceBelongId: "请选择资源归属",
level: "请填写项目级别",
systemId: "请填写项目培训体系",
boeFlag: "请选择是否BOE实施",
attach: "请上传附件",
};
const createProject = () => {
let obj = {
"name": projectName["value"],
"type": projectType,
"picUrl": picUrl,
"beginTime": beginTime,
"endTime": endTime,
"manager": manager,
"managerId": managerId,
"sourceBelongId": 11,
"remark": remark["value"],
"courseSyncFlag": courseSyncFlag,
"level": 3,
"systemId": 4,
"boeFlag": boeFlag,
"attach": attach,
"templateId": 10,
name: projectName["value"],
type: projectType,
picUrl: picUrl,
beginTime: beginTime,
endTime: endTime,
manager: manager,
managerId: managerId,
sourceBelongId: 11,
remark: remark["value"],
courseSyncFlag: courseSyncFlag,
level: 3,
systemId: 4,
boeFlag: boeFlag,
attach: attach,
templateId: 10,
"category": 0,
"notice": "",
"noticeFlag": 0,
"status": 0
}
console.log('提交的数据格式 %o', obj)
category: 0,
notice: "",
noticeFlag: 0,
status: 0,
};
console.log("提交的数据格式 %o", obj);
for (let i in errorMsgs) {
console.log(obj[i])
console.log(obj[i]);
if (obj[i] === "") {
message.destroy()
message.warning(errorMsgs[i])
return
message.destroy();
message.warning(errorMsgs[i]);
return;
}
}
api.createProject(obj).then(res => {
console.log(res)
}).catch(err => {
console.log(err)
api
.createProject(obj)
.then((res) => {
console.log(res);
})
.catch((err) => {
console.log(err);
});
};
return {
@@ -453,9 +587,9 @@ export default {
changeChecked1,
uplodaFileCount,
createProject,
removeFile
removeFile,
};
}
},
};
</script>
<style lang="scss">
@@ -726,8 +860,8 @@ export default {
width: 100px;
height: 40px;
border-radius: 8px;
background: #409EFF;
color: #FFFFFF;
background: #409eff;
color: #ffffff;
margin-right: 14px;
}
@@ -738,9 +872,9 @@ export default {
width: 100px;
height: 40px;
border-radius: 8px;
border: 1px solid #409EFF;
background: #FFFFFF;
color: #409EFF;
border: 1px solid #409eff;
background: #ffffff;
color: #409eff;
}
}