-- 项目名称校验

This commit is contained in:
yuping
2022-12-10 21:00:42 +08:00
parent 0a8e7c3651
commit f74c68fc25
6 changed files with 1031 additions and 814 deletions

View File

@@ -131,6 +131,7 @@ export const addStudentCourse = (obj) => http.post("/admin/offcourse/addStudent"
// 获取组织结构树 // 获取组织结构树
export const orgtree = () => http.get("/org/tree"); export const orgtree = () => http.get("/org/tree");
export const saveStu = obj => http.post("/admin/student/addStudent", obj); export const saveStu = obj => http.post("/admin/student/addStudent", obj);
export const validateName = obj => http.post("/admin/validate/validateName", obj);
//获取积分列表 //获取积分列表
export const noticeList = (projectId) => export const noticeList = (projectId) =>

View File

@@ -0,0 +1,58 @@
<template>
<a-input
v-model:value="modelV"
placeholder="请输入项目名称"
:show-count="showCount"
:maxlength="maxlength"
@blur="validateProName"
/>
<div style="color:red;font-size: 10px" v-if="value && !validate">名称重复请重新输入</div>
</template>
<script setup>
import {defineProps, defineEmits, watch, ref} from "vue";
import {validateName} from "@/api/index1";
const props = defineProps({
value: {
type: String,
},
validate: {
type: Boolean,
default: true
},
type: {
type: Number,
default: 1
},
maxlength: {
type: Number,
default: 30
},
showCount: {
type: Boolean,
default: false
}
})
const emit = defineEmits({})
const modelV = ref()
watch(() => props.value, () => {
if (props.value !== modelV.value) {
modelV.value = props.value
}
})
watch(modelV, () => {
emit('update:value', modelV.value)
})
function validateProName() {
console.log(props.value)
props.value && validateName({name: props.value, type: props.type}).then(res => {
emit('update:validate', res.data.data !== 1)
})
}
</script>

View File

@@ -132,16 +132,17 @@
</div> </div>
<span style="margin-right: 3px">课程名称</span> <span style="margin-right: 3px">课程名称</span>
</div> </div>
<div class="b_input"> <div class="in b_input">
<a-input <NameInput placeholder="请输入课程名称" v-model:value="xzinputV1" v-model:validate="validate" :maxlength="20" show-count :type="2"></NameInput>
v-model:value="xzinputV1" <!-- <a-input-->
maxlength="20" <!-- v-model:value="xzinputV1"-->
style="width: 440px; height: 40px; border-radius: 8px" <!-- maxlength="20"-->
placeholder="请输入课程名称" <!-- style="width: 440px; height: 40px; border-radius: 8px"-->
/> <!-- placeholder="请输入课程名称"-->
<div class="inp_num"> <!-- />-->
<span style="color: #c7cbd2">{{ xzinputV1.length }}/20</span> <!-- <div class="inp_num">-->
</div> <!-- <span style="color: #c7cbd2">{{ xzinputV1.length }}/20</span>-->
<!-- </div>-->
</div> </div>
</div> </div>
<div class="b_sub"> <div class="b_sub">
@@ -336,14 +337,15 @@
<span style="margin-right: 14px">课程名称</span> <span style="margin-right: 14px">课程名称</span>
</div> </div>
<div class="item_inp"> <div class="item_inp">
<div class="i1_input"> <div class="in i1_input">
<a-input <!-- <a-input-->
aria-readonly="true" <!-- aria-readonly="true"-->
v-model:value="qdms_inputV1" <!-- v-model:value="qdms_inputV1"-->
maxlength="90" <!-- maxlength="90"-->
style="width: 440px; height: 40px; border-radius: 8px" <!-- style="width: 440px; height: 40px; border-radius: 8px"-->
placeholder="请输入课程名称" <!-- placeholder="请输入课程名称"-->
/> <!-- />-->
<NameInput placeholder="请输入课程名称" v-model:value="qdms_inputV1" v-model:validate="validate" :maxlength="20" show-count :type="2"></NameInput>
<div class="inp_num"> <div class="inp_num">
<span style="color: #c7cbd2"> <span style="color: #c7cbd2">
{{ qdms_inputV1.length }}/90 {{ qdms_inputV1.length }}/90
@@ -2752,6 +2754,7 @@ import { useRouter, useRoute } from "vue-router";
import addOnlineCourse from "../../components/Modals/addOnlineCourse.vue"; import addOnlineCourse from "../../components/Modals/addOnlineCourse.vue";
import ProjOwnerShip from "../../components/drawers/ProjectOwn"; import ProjOwnerShip from "../../components/drawers/ProjectOwn";
import NameInput from "../../components/project/NameInput";
import ProjPowerList from "../../components/drawers/ProjPowerList"; import ProjPowerList from "../../components/drawers/ProjPowerList";
import ProjCheckShip from "../../components/drawers/ProjCheckPower"; import ProjCheckShip from "../../components/drawers/ProjCheckPower";
import AssessmentList from "../../components/drawers/AssessmentList.vue"; import AssessmentList from "../../components/drawers/AssessmentList.vue";
@@ -3305,6 +3308,7 @@ export default defineComponent({
ProjPowerList, ProjPowerList,
ProjCheckShip, ProjCheckShip,
AssessmentList, AssessmentList,
NameInput,
// VNodes: (_, {attrs}) => { // VNodes: (_, {attrs}) => {
// return attrs.vnodes; // return attrs.vnodes;
// }, // },
@@ -3535,6 +3539,7 @@ export default defineComponent({
imageUrl: "", imageUrl: "",
imgList: [], imgList: [],
validate:true,
pageSize2: 10, pageSize2: 10,
currentPage2: 0, currentPage2: 0,
@@ -4481,6 +4486,10 @@ export default defineComponent({
message.destroy(); message.destroy();
return message.warning("请输入必填项"); return message.warning("请输入必填项");
} }
if (!state.validate) {
message.destroy();
return message.warning("路径图名称重复");
}
console.log( console.log(
"state.bs_hs && state.valueE1 == 2", "state.bs_hs && state.valueE1 == 2",
state.bs_hs, state.bs_hs,
@@ -4594,7 +4603,10 @@ export default defineComponent({
} else { } else {
state.addLoading = true; state.addLoading = true;
} }
if (!state.validate) {
message.destroy();
return message.warning("路径图名称重复");
}
edit(postData).then((res) => { edit(postData).then((res) => {
if (res.data.code === 200) { if (res.data.code === 200) {
getTableDate(); getTableDate();

View File

@@ -144,13 +144,15 @@
</div> </div>
<div class="inname">路径图名称</div> <div class="inname">路径图名称</div>
<div class="in"> <div class="in">
<a-input <!-- <a-input-->
v-model:value="pathName" <!-- v-model:value="pathName"-->
maxlength="20" <!-- maxlength="20"-->
style="border-radius: 4px" <!-- style="border-radius: 4px"-->
placeholder="请输入学习路径名称" <!-- placeholder="请输入学习路径名称"-->
/> <!-- />-->
<div class="showcount">{{ pathName.length }}/20</div> <!-- <div class="showcount">{{ pathName.length }}/20</div>-->
<NameInput placeholder="请输入路径名称" v-model:value="pathName" v-model:validate="validate"
:maxlength="20" show-count :type="3"></NameInput>
</div> </div>
</div> </div>
<div class="name" style="margin-left: 27px"> <div class="name" style="margin-left: 27px">
@@ -263,13 +265,15 @@
</div> </div>
<div class="inname">路径图名称</div> <div class="inname">路径图名称</div>
<div class="in"> <div class="in">
<a-input <!-- <a-input-->
v-model:value="pathName" <!-- v-model:value="pathName"-->
maxlength="20" <!-- maxlength="20"-->
style="border-radius: 4px" <!-- style="border-radius: 4px"-->
placeholder="请输入学习路径名称" <!-- placeholder="请输入学习路径名称"-->
/> <!-- />-->
<div class="showcount">{{ pathName.length }}/20</div> <!-- <div class="showcount">{{ pathName.length }}/20</div>-->
<NameInput placeholder="请输入路径名称" v-model:value="pathName" v-model:validate="validate"
:maxlength="20" show-count :type="3"></NameInput>
</div> </div>
</div> </div>
<div class="name" style="margin-left: 27px"> <div class="name" style="margin-left: 27px">
@@ -682,6 +686,8 @@ import {
import {storage} from "../../api/storage"; import {storage} from "../../api/storage";
import {useStore} from "vuex"; import {useStore} from "vuex";
import OrgClass from "@/components/project/OrgClass"; import OrgClass from "@/components/project/OrgClass";
import NameInput from "@/components/project/NameInput";
export default { export default {
name: "learningPath", name: "learningPath",
components: { components: {
@@ -691,6 +697,7 @@ export default {
// ManageRight, // ManageRight,
ProjOwnerShip, ProjOwnerShip,
OrgClass, OrgClass,
NameInput,
ProjPowerList, ProjPowerList,
ProjCheckShip, ProjCheckShip,
}, },
@@ -704,6 +711,7 @@ export default {
number: null, number: null,
selectTime: null, selectTime: null,
sh: false, sh: false,
validate: true,
tableData: [ tableData: [
// { // {
// key: 1, // key: 1,
@@ -1448,6 +1456,11 @@ export default {
message.destroy(); message.destroy();
return message.warning("请选择背景图"); return message.warning("请选择背景图");
} }
if (!state.validate) {
message.destroy();
message.warning("路径图名称重复");
return
}
state.lpLoading = true; state.lpLoading = true;
let obj = { let obj = {
name: state.pathName, name: state.pathName,
@@ -1612,6 +1625,10 @@ export default {
message.destroy(); message.destroy();
return message.warning("请选择背景图"); return message.warning("请选择背景图");
} }
if (!state.validate) {
message.destroy();
return message.warning("路径图名称重复");
}
// state.pathName = detail.name; // state.pathName = detail.name;
// state.pathBg = detail.picUrl; // state.pathBg = detail.picUrl;
// state.pathBgId = ""; // state.pathBgId = "";
@@ -1833,17 +1850,21 @@ export default {
display: block; display: block;
clear: both; clear: both;
} }
.CreatePath { .CreatePath {
.ant-modal { .ant-modal {
width: 680px !important; width: 680px !important;
height: 528px !important; height: 528px !important;
.ant-modal-content { .ant-modal-content {
width: 680px !important; width: 680px !important;
height: 528px !important; height: 528px !important;
.ant-modal-body { .ant-modal-body {
width: 680px !important; width: 680px !important;
height: 528px !important; height: 528px !important;
padding: 0 !important; padding: 0 !important;
.out { .out {
display: block; display: block;
position: absolute; position: absolute;
@@ -1856,6 +1877,7 @@ export default {
left: 50%; left: 50%;
top: 50%; top: 50%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
.top { .top {
width: 100%; width: 100%;
height: 68px; height: 68px;
@@ -1866,18 +1888,21 @@ export default {
); );
display: flex; display: flex;
align-items: center; align-items: center;
.topimg { .topimg {
width: 18px; width: 18px;
height: 18px; height: 18px;
margin-left: 27px; margin-left: 27px;
margin-top: -2px; margin-top: -2px;
} }
.topc { .topc {
color: #000000; color: #000000;
font-size: 16px; font-size: 16px;
margin-left: 8px; margin-left: 8px;
} }
} }
.mid { .mid {
width: 100%; width: 100%;
height: 100%; height: 100%;
@@ -1891,6 +1916,7 @@ export default {
// color: #ff4e4e; // color: #ff4e4e;
margin-left: -5px; margin-left: -5px;
} }
.name { .name {
width: 78%; width: 78%;
// background-color: lightcoral; // background-color: lightcoral;
@@ -1905,16 +1931,19 @@ export default {
font-size: 14px; font-size: 14px;
margin-left: 7px; margin-left: 7px;
} }
.in { .in {
margin-left: 14px; margin-left: 14px;
width: 81%; width: 81%;
position: relative; position: relative;
.ant-input { .ant-input {
border-radius: 5px; border-radius: 5px;
// height: 120%; // height: 120%;
width: 100%; width: 100%;
height: 40px; height: 40px;
} }
.showcount { .showcount {
position: absolute; position: absolute;
right: 10px; right: 10px;
@@ -1923,6 +1952,7 @@ export default {
} }
} }
} }
.bac { .bac {
width: 78%; width: 78%;
// background-color: lightcoral; // background-color: lightcoral;
@@ -1933,12 +1963,14 @@ export default {
margin-top: 18px; margin-top: 18px;
color: #ff4e4e; color: #ff4e4e;
} }
.inname { .inname {
color: #6f6f6f; color: #6f6f6f;
font-size: 14px; font-size: 14px;
margin-left: 7px; margin-left: 7px;
margin-top: 15px; margin-top: 15px;
} }
.in { .in {
margin-left: 14px; margin-left: 14px;
width: 81%; width: 81%;
@@ -1953,11 +1985,13 @@ export default {
cursor: pointer; cursor: pointer;
} }
} }
.learnBg { .learnBg {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
min-height: 110px; min-height: 110px;
max-height: 300px; max-height: 300px;
.learnBgItem { .learnBgItem {
border-radius: 8px; border-radius: 8px;
width: 136px; width: 136px;
@@ -1967,6 +2001,7 @@ export default {
margin-bottom: 20px; margin-bottom: 20px;
margin-right: 6px; margin-right: 6px;
} }
.learnBgMore { .learnBgMore {
display: flex; display: flex;
align-items: center; align-items: center;
@@ -1980,6 +2015,7 @@ export default {
} }
} }
} }
.info { .info {
width: 78%; width: 78%;
// background-color: lightcoral; // background-color: lightcoral;
@@ -1995,10 +2031,12 @@ export default {
margin-left: 26px; margin-left: 26px;
margin-top: 15px; margin-top: 15px;
} }
.in { .in {
margin-left: 14px; margin-left: 14px;
width: 81%; width: 81%;
position: relative; position: relative;
.ant-input { .ant-input {
border-radius: 5px; border-radius: 5px;
// height: 120%; // height: 120%;
@@ -2006,6 +2044,7 @@ export default {
height: 130px; height: 130px;
resize: none; resize: none;
} }
.showcount { .showcount {
position: absolute; position: absolute;
right: 10px; right: 10px;
@@ -2014,12 +2053,14 @@ export default {
} }
} }
} }
.btn { .btn {
width: 33%; width: 33%;
margin-top: 30px; margin-top: 30px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin-bottom: 30px; margin-bottom: 30px;
.samtn { .samtn {
width: 100px; width: 100px;
height: 40px; height: 40px;
@@ -2028,10 +2069,12 @@ export default {
border-radius: 8px; border-radius: 8px;
cursor: pointer; cursor: pointer;
} }
.btn1 { .btn1 {
background-color: #fff; background-color: #fff;
color: #4ea6ff; color: #4ea6ff;
} }
.btn2 { .btn2 {
background-color: #4ea6ff; background-color: #4ea6ff;
color: #fff; color: #fff;
@@ -2043,20 +2086,25 @@ export default {
} }
} }
} }
.learnBgMoreModal { .learnBgMoreModal {
.ant-modal { .ant-modal {
width: 680px !important; width: 680px !important;
height: 528px !important; height: 528px !important;
.ant-modal-content { .ant-modal-content {
width: 680px !important; width: 680px !important;
height: 528px !important; height: 528px !important;
.ant-modal-body { .ant-modal-body {
width: 680px !important; width: 680px !important;
height: 528px !important; height: 528px !important;
padding: 0 !important; padding: 0 !important;
.main { .main {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.top { .top {
padding-left: 51px; padding-left: 51px;
padding-right: 51px; padding-right: 51px;
@@ -2065,6 +2113,7 @@ export default {
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
cursor: pointer; cursor: pointer;
.topc { .topc {
font-size: 16px; font-size: 16px;
font-weight: bold; font-weight: bold;
@@ -2072,6 +2121,7 @@ export default {
line-height: 36px; line-height: 36px;
} }
} }
.imagesBox { .imagesBox {
display: flex; display: flex;
// justify-content: space-between; // justify-content: space-between;
@@ -2081,6 +2131,7 @@ export default {
margin-top: 20px; margin-top: 20px;
height: 350px; height: 350px;
overflow-y: auto; overflow-y: auto;
.learnBgItem { .learnBgItem {
border-radius: 8px; border-radius: 8px;
width: 136px; width: 136px;
@@ -2091,6 +2142,7 @@ export default {
margin-right: 10px; margin-right: 10px;
} }
} }
.btn { .btn {
width: 100%; width: 100%;
position: absolute; position: absolute;
@@ -2098,6 +2150,7 @@ export default {
margin-top: 30px; margin-top: 30px;
display: flex; display: flex;
justify-content: center; justify-content: center;
.samtn { .samtn {
width: 100px; width: 100px;
height: 40px; height: 40px;
@@ -2106,10 +2159,12 @@ export default {
border-radius: 8px; border-radius: 8px;
cursor: pointer; cursor: pointer;
} }
.btn1 { .btn1 {
background-color: #fff; background-color: #fff;
color: #4ea6ff; color: #4ea6ff;
} }
.btn2 { .btn2 {
background-color: #4ea6ff; background-color: #4ea6ff;
color: #fff; color: #fff;
@@ -2121,16 +2176,19 @@ export default {
} }
} }
} }
.pub { .pub {
.ant-modal { .ant-modal {
.ant-modal-body { .ant-modal-body {
padding: 0; padding: 0;
.modalHeader { .modalHeader {
background: linear-gradient( background: linear-gradient(
rgba(78, 166, 255, 0.2) 0%, rgba(78, 166, 255, 0.2) 0%,
rgba(78, 166, 255, 0) 100% rgba(78, 166, 255, 0) 100%
); );
} }
.modalMain { .modalMain {
.projectname { .projectname {
color: rgba(79, 81, 86, 1); color: rgba(79, 81, 86, 1);
@@ -2139,23 +2197,28 @@ export default {
margin-left: 62px; margin-left: 62px;
font-weight: 500; font-weight: 500;
} }
.projecttime { .projecttime {
margin-left: 221px; margin-left: 221px;
.timeti { .timeti {
color: rgba(153, 155, 163, 1); color: rgba(153, 155, 163, 1);
font-size: 14px; font-size: 14px;
line-height: 36px; line-height: 36px;
} }
.timeme { .timeme {
color: rgba(79, 81, 86, 1); color: rgba(79, 81, 86, 1);
font-size: 14px; font-size: 14px;
line-height: 36px; line-height: 36px;
} }
} }
.projectbox { .projectbox {
margin-top: 26px; margin-top: 26px;
display: flex; display: flex;
justify-content: center; justify-content: center;
.promessage { .promessage {
width: 280px; width: 280px;
height: 110px; height: 110px;
@@ -2166,6 +2229,7 @@ export default {
); );
border-radius: 10px; border-radius: 10px;
margin-right: 7px; margin-right: 7px;
.messageme { .messageme {
color: rgba(255, 182, 78, 1); color: rgba(255, 182, 78, 1);
font-size: 14px; font-size: 14px;
@@ -2173,12 +2237,14 @@ export default {
margin-top: 17px; margin-top: 17px;
margin-left: 30px; margin-left: 30px;
} }
.messagege { .messagege {
color: rgba(153, 155, 163, 1); color: rgba(153, 155, 163, 1);
font-size: 14px; font-size: 14px;
margin-left: 30px; margin-left: 30px;
} }
} }
.stumessage { .stumessage {
width: 280px; width: 280px;
height: 110px; height: 110px;
@@ -2188,6 +2254,7 @@ export default {
rgba(240, 248, 254, 1) rgba(240, 248, 254, 1)
); );
border-radius: 10px; border-radius: 10px;
.messageme1 { .messageme1 {
color: rgba(78, 166, 255, 1); color: rgba(78, 166, 255, 1);
font-size: 14px; font-size: 14px;
@@ -2195,6 +2262,7 @@ export default {
margin-top: 17px; margin-top: 17px;
margin-left: 30px; margin-left: 30px;
} }
.messagege1 { .messagege1 {
color: rgba(153, 155, 163, 1); color: rgba(153, 155, 163, 1);
font-size: 14px; font-size: 14px;
@@ -2202,26 +2270,32 @@ export default {
} }
} }
} }
.send { .send {
margin-top: 30px; margin-top: 30px;
margin-left: 61px; margin-left: 61px;
.sendtext { .sendtext {
margin-left: 11px; margin-left: 11px;
color: rgba(109, 117, 132, 1); color: rgba(109, 117, 132, 1);
font-size: 14px; font-size: 14px;
} }
} }
.ckb { .ckb {
margin-top: 20px; margin-top: 20px;
margin-left: 62px; margin-left: 62px;
.sendpeo { .sendpeo {
color: rgba(109, 117, 132, 1); color: rgba(109, 117, 132, 1);
font-size: 14px; font-size: 14px;
} }
.ant-checkbox-inner { .ant-checkbox-inner {
border-radius: 4px; border-radius: 4px;
} }
} }
.pubtn { .pubtn {
display: flex; display: flex;
justify-content: center; justify-content: center;
@@ -2240,6 +2314,7 @@ export default {
align-items: center; align-items: center;
background: rgba(255, 255, 255, 1); background: rgba(255, 255, 255, 1);
} }
.pubtn2 { .pubtn2 {
width: 100px; width: 100px;
height: 40px; height: 40px;
@@ -2257,17 +2332,21 @@ export default {
} }
} }
} }
.CopyModal { .CopyModal {
.ant-modal { .ant-modal {
width: 424px !important; width: 424px !important;
height: 258px !important; height: 258px !important;
.ant-modal-content { .ant-modal-content {
width: 424px !important; width: 424px !important;
height: 258px !important; height: 258px !important;
.ant-modal-body { .ant-modal-body {
width: 424px !important; width: 424px !important;
height: 258px !important; height: 258px !important;
padding: 0 !important; padding: 0 !important;
.delete { .delete {
z-index: 999; z-index: 999;
width: 424px; width: 424px;
@@ -2288,15 +2367,18 @@ export default {
rgba(78, 166, 255, 0) 100% rgba(78, 166, 255, 0) 100%
); );
} }
.del_main { .del_main {
width: 100%; width: 100%;
position: relative; position: relative;
.header { .header {
display: flex; display: flex;
align-items: center; align-items: center;
padding-top: 20px; padding-top: 20px;
padding-left: 26px; padding-left: 26px;
font-size: 16px; font-size: 16px;
.icon { .icon {
width: 16px; width: 16px;
height: 16px; height: 16px;
@@ -2304,6 +2386,7 @@ export default {
background-image: url(@/assets/images/taskpage/gan.png); background-image: url(@/assets/images/taskpage/gan.png);
background-size: 100% 100%; background-size: 100% 100%;
} }
.close_exit { .close_exit {
position: absolute; position: absolute;
right: 42px; right: 42px;
@@ -2314,6 +2397,7 @@ export default {
background-size: 100% 100%; background-size: 100% 100%;
} }
} }
.body { .body {
width: 100%; width: 100%;
margin: 34px auto 56px auto; margin: 34px auto 56px auto;
@@ -2323,6 +2407,7 @@ export default {
flex-direction: column; flex-direction: column;
// background-color: red; // background-color: red;
position: relative; position: relative;
.back { .back {
position: absolute; position: absolute;
top: 30px; top: 30px;
@@ -2331,10 +2416,12 @@ export default {
color: #666666; color: #666666;
} }
} }
.del_btnbox { .del_btnbox {
display: flex; display: flex;
margin: 30px auto; margin: 30px auto;
justify-content: center; justify-content: center;
.del_btn { .del_btn {
width: 100px; width: 100px;
height: 40px; height: 40px;
@@ -2346,17 +2433,20 @@ export default {
flex-shrink: 0; flex-shrink: 0;
cursor: pointer; cursor: pointer;
.btnText { .btnText {
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
line-height: 40px; line-height: 40px;
} }
} }
.btn1 { .btn1 {
border: 1px solid rgba(64, 158, 255, 1); border: 1px solid rgba(64, 158, 255, 1);
color: #4ea6ff; color: #4ea6ff;
margin-right: 14px; margin-right: 14px;
} }
.btn2 { .btn2 {
background-color: #4ea6ff; background-color: #4ea6ff;
color: #ffffff; color: #ffffff;
@@ -2368,6 +2458,7 @@ export default {
} }
} }
} }
.learningPath { .learningPath {
width: 100%; width: 100%;
// height: 100%; // height: 100%;
@@ -2382,22 +2473,26 @@ export default {
//background: red; //background: red;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
.nodata_box { .nodata_box {
width: 412px; width: 412px;
height: 212px; height: 212px;
position: relative; position: relative;
background: linear-gradient(180deg, #fef3dd, #fffaf0); background: linear-gradient(180deg, #fef3dd, #fffaf0);
border-radius: 10px; border-radius: 10px;
.left { .left {
position: absolute; position: absolute;
top: 18px; top: 18px;
left: 0; left: 0;
} }
.center { .center {
position: absolute; position: absolute;
top: 32px; top: 32px;
left: 170px; left: 170px;
} }
.text1 { .text1 {
position: absolute; position: absolute;
top: 128px; top: 128px;
@@ -2406,6 +2501,7 @@ export default {
color: #ffb64e; color: #ffb64e;
font-weight: 500; font-weight: 500;
} }
.text2 { .text2 {
position: absolute; position: absolute;
bottom: 32px; bottom: 32px;
@@ -2414,6 +2510,7 @@ export default {
color: #878b92; color: #878b92;
font-weight: 500; font-weight: 500;
} }
.right { .right {
position: absolute; position: absolute;
bottom: 18px; bottom: 18px;
@@ -2421,6 +2518,7 @@ export default {
} }
} }
} }
.filter { .filter {
margin-left: 35px; margin-left: 35px;
margin-right: 35px; margin-right: 35px;
@@ -2428,34 +2526,42 @@ export default {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
flex-wrap: wrap; flex-wrap: wrap;
.filterItems { .filterItems {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
.pathnameInp { .pathnameInp {
margin-right: 20px; margin-right: 20px;
margin-bottom: 20px; margin-bottom: 20px;
} }
.select { .select {
margin-right: 20px; margin-right: 20px;
margin-bottom: 20px; margin-bottom: 20px;
} }
.addTimeBox { .addTimeBox {
position: relative; position: relative;
display: flex; display: flex;
align-items: center; align-items: center;
.addTime { .addTime {
position: absolute; position: absolute;
z-index: 10; z-index: 10;
margin-left: 10px; margin-left: 10px;
color: rgba(0, 0, 0, 0.4); color: rgba(0, 0, 0, 0.4);
} }
.ant-picker { .ant-picker {
padding-left: 85px; padding-left: 85px;
} }
.ant-picker-range .ant-picker-active-bar { .ant-picker-range .ant-picker-active-bar {
margin-left: 85px; margin-left: 85px;
} }
} }
.btn { .btn {
padding: 0px 26px 0px 26px; padding: 0px 26px 0px 26px;
height: 38px; height: 38px;
@@ -2468,9 +2574,11 @@ export default {
margin-right: 14px; margin-right: 14px;
flex-shrink: 0; flex-shrink: 0;
cursor: pointer; cursor: pointer;
.search { .search {
background-size: 100%; background-size: 100%;
} }
.btnText { .btnText {
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
@@ -2479,6 +2587,7 @@ export default {
margin-left: 5px; margin-left: 5px;
} }
} }
.btnn { .btnn {
padding: 0px 26px 0px 26px; padding: 0px 26px 0px 26px;
height: 38px; height: 38px;
@@ -2491,9 +2600,11 @@ export default {
margin-right: 14px; margin-right: 14px;
flex-shrink: 0; flex-shrink: 0;
cursor: pointer; cursor: pointer;
.search { .search {
background-size: 100%; background-size: 100%;
} }
.btnText { .btnText {
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
@@ -2502,6 +2613,7 @@ export default {
margin-left: 5px; margin-left: 5px;
} }
} }
.btn1 { .btn1 {
.search { .search {
width: 15px; width: 15px;
@@ -2509,6 +2621,7 @@ export default {
background-image: url("../../assets/images/courseManage/search0.png"); background-image: url("../../assets/images/courseManage/search0.png");
} }
} }
.btn2 { .btn2 {
.search { .search {
width: 16px; width: 16px;
@@ -2516,25 +2629,32 @@ export default {
background-image: url("../../assets/images/courseManage/reset1.png"); background-image: url("../../assets/images/courseManage/reset1.png");
} }
} }
.btn1:hover { .btn1:hover {
background: rgba(64, 158, 255, 0.76); background: rgba(64, 158, 255, 0.76);
.search { .search {
background-image: url("../../assets/images/courseManage/search0.png"); background-image: url("../../assets/images/courseManage/search0.png");
} }
.btnText { .btnText {
color: #ffffff; color: #ffffff;
} }
} }
.btn1:active { .btn1:active {
background: #0982ff; background: #0982ff;
} }
.btn2:hover { .btn2:hover {
background: rgba(64, 158, 255, 0.1); background: rgba(64, 158, 255, 0.1);
} }
.btn2:active { .btn2:active {
background: rgba(64, 158, 255, 0.2); background: rgba(64, 158, 255, 0.2);
} }
} }
.btns { .btns {
display: flex; display: flex;
// flex-wrap: wrap; // flex-wrap: wrap;
@@ -2550,9 +2670,11 @@ export default {
margin-right: 14px; margin-right: 14px;
flex-shrink: 0; flex-shrink: 0;
cursor: pointer; cursor: pointer;
.search { .search {
background-size: 100%; background-size: 100%;
} }
.btnText { .btnText {
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
@@ -2561,28 +2683,35 @@ export default {
margin-left: 5px; margin-left: 5px;
} }
} }
.btn3 { .btn3 {
margin-right: 0px; margin-right: 0px;
.search { .search {
width: 17px; width: 17px;
height: 18px; height: 18px;
background-image: url("../../assets/images/courseManage/add0.png"); background-image: url("../../assets/images/courseManage/add0.png");
} }
} }
.btn3:hover { .btn3:hover {
background: rgba(64, 158, 255, 0.76); background: rgba(64, 158, 255, 0.76);
.search { .search {
background-image: url("../../assets/images/courseManage/add0.png"); background-image: url("../../assets/images/courseManage/add0.png");
} }
.btnText { .btnText {
color: #ffffff; color: #ffffff;
} }
} }
.btn3:active { .btn3:active {
background: #0982ff; background: #0982ff;
} }
} }
} }
.tableBox { .tableBox {
// margin: 20px 38px 30px; // margin: 20px 38px 30px;
margin: 10px 35px 0px 35px; margin: 10px 35px 0px 35px;
@@ -2597,8 +2726,10 @@ export default {
background: #f6f9fd; background: #f6f9fd;
} }
} }
.tableBox { .tableBox {
padding-bottom: 20px; padding-bottom: 20px;
.pa { .pa {
// position: absolute; // position: absolute;
// bottom: 20px; // bottom: 20px;
@@ -2613,13 +2744,16 @@ export default {
// bottom: -40px; // bottom: -40px;
} }
} }
.operation { .operation {
display: flex; display: flex;
justify-content: right; justify-content: right;
.nSelect { .nSelect {
.fb { .fb {
display: flex; display: flex;
white-space: nowrap; white-space: nowrap;
.jc { .jc {
color: #4ea6ff; color: #4ea6ff;
font-size: 14px; font-size: 14px;
@@ -2629,12 +2763,14 @@ export default {
} }
} }
} }
.tableSelect { .tableSelect {
// margin-right: 20px; // margin-right: 20px;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: right; justify-content: right;
white-space: nowrap; white-space: nowrap;
.g1 { .g1 {
color: #4ea6ff; color: #4ea6ff;
font-size: 14px; font-size: 14px;
@@ -2650,6 +2786,7 @@ export default {
.opa { .opa {
display: flex; display: flex;
justify-content: right; justify-content: right;
.opacation { .opacation {
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
@@ -2659,12 +2796,15 @@ export default {
.activecls { .activecls {
display: inline-block; display: inline-block;
} }
.errorCls { .errorCls {
display: none; display: none;
} }
.more { .more {
position: relative; position: relative;
height: 100%; height: 100%;
.moreArrow { .moreArrow {
width: 13px; width: 13px;
height: 7px; height: 7px;
@@ -2674,6 +2814,7 @@ export default {
margin: 2px; margin: 2px;
margin-left: 7px; margin-left: 7px;
} }
.moreItems { .moreItems {
width: 80px; width: 80px;
height: 70px; height: 70px;
@@ -2688,9 +2829,11 @@ export default {
z-index: 999; z-index: 999;
} }
} }
.more:hover .moreArrow { .more:hover .moreArrow {
background-image: url("../../assets/images/navtop/up.png"); background-image: url("../../assets/images/navtop/up.png");
} }
.more:hover .moreItems { .more:hover .moreItems {
display: block; display: block;
} }

View File

@@ -39,13 +39,7 @@
<div class="inname">项目名称</div> <div class="inname">项目名称</div>
</div> </div>
<div class="in"> <div class="in">
<a-input <NameInput placeholder="请输入项目名称" v-model:value="projectInfo.name" v-model:validate="projectInfo.validate" :maxlength="30" show-count></NameInput>
v-model:value="projectInfo.name"
placeholder="请输入项目名称"
show-count
:maxlength="30"
:disabled="viewDetail ? true : false"
/>
</div> </div>
</div> </div>
<div class="name flex-top"> <div class="name flex-top">
@@ -250,7 +244,8 @@
type="primary" type="primary"
class="btn1" class="btn1"
style="margin-left: 20px" style="margin-left: 20px"
>确定</a-button >确定
</a-button
> >
</div> </div>
</div> </div>
@@ -266,6 +261,7 @@ import { useStore } from "vuex";
import TrainClass from "@/components/project/TrainClass"; import TrainClass from "@/components/project/TrainClass";
import OrgClass from "@/components/project/OrgClass"; import OrgClass from "@/components/project/OrgClass";
import ProjectManager from "@/components/project/ProjectManagerNew"; import ProjectManager from "@/components/project/ProjectManagerNew";
import NameInput from "@/components/project/NameInput";
import ProjectLevel from "@/components/project/ProjectLevel"; import ProjectLevel from "@/components/project/ProjectLevel";
import {changeOwnership, scrollLoad} from "@/api/method"; import {changeOwnership, scrollLoad} from "@/api/method";
import {storage} from "../../api/storage"; import {storage} from "../../api/storage";
@@ -277,6 +273,7 @@ export default {
ProjectLevel, ProjectLevel,
// ProjectClass, // ProjectClass,
TrainClass, TrainClass,
NameInput,
OrgClass, OrgClass,
}, },
setup() { setup() {
@@ -422,6 +419,11 @@ export default {
if (!validate(state.projectInfo, errorMsgs)) { if (!validate(state.projectInfo, errorMsgs)) {
return; return;
} }
if (!state.projectInfo.validate) {
message.destroy();
message.warning('项目名称重复,请修改名称!');
return;
}
state.projectInfo.type = 3; state.projectInfo.type = 3;
state.projectInfo.courseSyncFlag = state.courseSyncFlag ? 1 : 0; state.projectInfo.courseSyncFlag = state.courseSyncFlag ? 1 : 0;
api.createProject(state.projectInfo).then((res) => { api.createProject(state.projectInfo).then((res) => {

View File

@@ -179,13 +179,7 @@
</div> </div>
<div class="inname">项目名称:</div> <div class="inname">项目名称:</div>
<div class="in"> <div class="in">
<a-input <NameInput placeholder="请输入项目名称" v-model:value="projectInfo.name" v-model:validate="projectInfo.validate" :maxlength="30" show-count></NameInput>
v-model:value="projectInfo.name"
show-count
:maxlength="30"
placeholder="请输入项目名称"
style="border-radius: 8px"
/>
</div> </div>
</div> </div>
<div class="name"> <div class="name">
@@ -828,6 +822,7 @@ import OrgClass from "@/components/project/OrgClass";
import dayjs from "dayjs"; import dayjs from "dayjs";
import * as moment from "moment"; import * as moment from "moment";
import { changeOwnership } from "@/api/method"; import { changeOwnership } from "@/api/method";
import NameInput from "@/components/project/NameInput";
export default { export default {
name: "projectManage", name: "projectManage",
@@ -835,6 +830,7 @@ export default {
ProjOwnerShip, ProjOwnerShip,
ProjPowerList, ProjPowerList,
ProjCheckShip, ProjCheckShip,
NameInput,
ProjectManager, ProjectManager,
// ProjectClass, // ProjectClass,
OrgClass, OrgClass,
@@ -965,6 +961,11 @@ export default {
if (!validate(state.projectInfo, errorMsgs)) { if (!validate(state.projectInfo, errorMsgs)) {
return; return;
} }
if (!state.projectInfo.validate) {
message.destroy();
message.warning('项目名称重复,请修改名称!');
return;
}
api.createProject(state.projectInfo).then((res) => { api.createProject(state.projectInfo).then((res) => {
state.doublepro = false; state.doublepro = false;
message.destroy(); message.destroy();