yujialong 2 years ago
parent a3ae387061
commit 427c032069
  1. 11
      public/editor.css
  2. BIN
      src/assets/images/home.png
  3. BIN
      src/assets/images/login-bg1.png
  4. BIN
      src/assets/images/login-bg2.png
  5. BIN
      src/assets/images/style/26.png
  6. BIN
      src/assets/images/style/28.png
  7. 2
      src/components/img-upload/Cropper.vue
  8. 22
      src/components/modules/content.vue
  9. 4
      src/components/modules/module.vue
  10. 27
      src/const/modules.js
  11. 3
      src/layouts/header/index.vue
  12. 52
      src/pages/account/login/index.vue
  13. 2
      src/pages/annex/list/index.vue
  14. 21
      src/pages/article/add/editor.js
  15. 22
      src/pages/article/add/index.vue
  16. 2
      src/pages/article/list/index.vue
  17. 16
      src/pages/column/add/index.vue
  18. 11
      src/pages/column/list/index.vue
  19. 11
      src/pages/setting/list/info.vue
  20. 3
      src/pages/site/list/index.vue
  21. 34
      src/pages/user/list/index.vue
  22. 2
      src/plugins/requests/index.js
  23. 3
      src/setting.js
  24. 16
      src/styles/common.scss
  25. BIN
      src/styles/font/PingFangSC-Medium.otf
  26. BIN
      src/styles/font/PingFangTC-Semibold.ttf
  27. BIN
      src/styles/font/ProximaNova-Regular.otf

@ -26,22 +26,27 @@
.tiny-wrap .block p {
margin: 0 0 10px;
font-size: 19px;
font-family: PingFangSC-Regular, PingFang SC;
font-family: SFProDisplay;
font-weight: 400;
color: #101010;
line-height: 32px;
}
.tiny-wrap .en-block p, .tiny-wrap .en-block .img-des {
font-family: ProximaNova;
letter-spacing: -.0135em;
line-height: 1.5em;
}
.tiny-wrap .block .tiny-title {
margin: 10px 0;
font-size: 24px;
font-family: PingFangSC-Medium, PingFang SC;
font-family: SFProDisplay;
font-weight: 500;
color: #101010;
line-height: 32px;
}
.tiny-wrap .quote {
padding: 15px;
font-size: 14px;
font-size: 16px;
font-style: italic;
border: 1px solid #e3e3e3;
background-color: #f1f1f1;

Binary file not shown.

After

Width:  |  Height:  |  Size: 421 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 MiB

@ -140,7 +140,7 @@ export default {
const that = this
if (type === 'blob') {
this.$refs.cropper.getCropBlob(data => {
compress(data, 0.6).then(res => {
compress(data, 0.8).then(res => {
that.$emit('upload', res)
})
})

@ -7,7 +7,7 @@
<el-input v-if="item.type === 'input'" v-model="data.form[item.prop]" placeholder="请输入" maxlength="30"></el-input>
<el-input v-if="item.type === 'textarea'" v-model="data.form[item.prop]" type="textarea" placeholder="请输入" maxlength="300"></el-input>
<el-upload
v-if="item.type === 'upload'"
v-if="item.type === 'upload' && item.crop"
class="uploader"
accept=".jpg,.png,.jpeg,.gif"
:on-change="res => changeFile(res, data.form)"
@ -23,6 +23,22 @@
<p>只支持.jpg,.png格式</p>
</div>
</el-upload>
<el-upload
v-if="item.type === 'upload' && !item.crop"
class="uploader"
accept=".jpg,.png,.jpeg"
:on-success="res => uploadSuccess(res, data.form)"
:show-file-list="false"
:action="api.upload">
<img v-if="data.form[item.prop]" :src="data.form[item.prop]" class="avatar">
<div class="uploader-default" v-else>
<i class="el-icon-plus"></i>
<p>上传图片</p>
</div>
<div slot="tip" class="el-upload__tip">
<p>只支持.jpg,.png格式</p>
</div>
</el-upload>
<template v-if="item.type === 'pic'">
<img v-if="data.form[item.prop]" :src="data.form[item.prop]" class="avatar">
<div class="uploader-default" v-else>
@ -203,6 +219,10 @@ export default {
})
})
},
//
uploadSuccess(res, row) {
this.$set(row, 'pic', res.url)
},
//
toLink(row, i = 0) {
this.linkVisible = true

@ -280,11 +280,7 @@ export default {
},
//
uploadSuccess(res, row) {
console.log("🚀 ~ file: index.vue ~ line 238 ~ uploadSuccess ~ res, row", res, row)
// let url = this.form.columnBanner
// url && this.$del(this.api.delFile, [url.split('/').pop()]).then(res => {}).catch(e => {})
this.$set(row, 'pic', res.url)
// row.pic = res.url
},
//
delRow(list, i) {

@ -11,7 +11,8 @@ export default {
type: 'upload',
prop: 'pic',
label: '图片',
required: true
required: true,
crop: false
},
{
type: 'input',
@ -813,7 +814,8 @@ export default {
type: 'upload',
prop: 'pic',
label: '图片',
required: true
required: true,
crop: false
},
{
type: 'input',
@ -1264,7 +1266,8 @@ export default {
type: 'upload',
prop: 'pic',
label: '图片',
required: true
required: true,
crop: false
},
{
type: 'input',
@ -1534,7 +1537,8 @@ export default {
type: 'upload',
prop: 'pic',
label: '图片',
required: true
required: true,
crop: false
},
{
type: 'input',
@ -2030,7 +2034,8 @@ export default {
type: 'upload',
prop: 'pic',
label: '图片',
required: true
required: true,
crop: false
},
{
type: 'input',
@ -2210,7 +2215,8 @@ export default {
type: 'upload',
prop: 'pic',
label: '图片',
required: true
required: true,
crop: false
},
{
type: 'input',
@ -2373,7 +2379,8 @@ export default {
type: 'upload',
prop: 'pic',
label: '图片',
required: true
required: true,
crop: false
},
{
type: 'input',
@ -2536,7 +2543,8 @@ export default {
type: 'upload',
prop: 'pic',
label: '图片',
required: true
required: true,
crop: false
},
{
type: 'input',
@ -3008,7 +3016,8 @@ export default {
type: 'upload',
prop: 'pic',
label: '图片',
required: true
required: true,
crop: false
},
{
type: 'input',

@ -97,7 +97,8 @@ export default {
},
//
toIndex() {
window.open((Setting.isDev ? `http://${location.hostname}:8095` : 'http://192.168.31.136/front') + `/#/column?siteId=${this.$store.state.content.site.id}`)
const { site } = this.$store.state.content
window.open((Setting.isDev ? `http://${location.hostname}:8095` : site.domainName) + `/#/column?siteId=${site.id}`)
},
//
siteCommand(e) {

@ -1,5 +1,11 @@
<template>
<div class="wrap">
<div class="left-bg">
<div class="logo">
<img src="@/assets/images/logo.png" alt="">
网站管理后台
</div>
</div>
<div class="form">
<p class="title">欢迎登录</p>
<div class="item">
@ -28,6 +34,10 @@
<!-- <div class="forget">忘记密码</div> -->
<el-button class="submit" type="primary" @click="submit">登录</el-button>
</div>
<div class="home">
<img src="@/assets/images/home.png" alt="">
回到官网
</div>
</div>
</template>
<script>
@ -155,25 +165,42 @@ export default {
position: relative;
width: 100%;
height: 100%;
background: url(../../../assets/images/login-bg2.png) top right/auto no-repeat;
}
.left-bg {
width: 420px;
height: 100%;
background: url(../../../assets/images/login-bg1.png) 0 0/cover no-repeat;
.logo {
display: flex;
align-items: center;
padding: 20px 25px;
font-size: 20px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #FFFFFF;
}
img {
margin-right: 10px;
}
}
/deep/.form {
position: absolute;
top: 50%;
left: 50%;
right: 25%;
width: 420px;
padding: 75px 30px 85px;
transform: translate(-50%, -50%);
transform: translateY(-50%);
background-color: #fff;
box-shadow: 0px 4px 20px 0px rgba(203,209,218,0.15);
border-radius: 8px;
.title {
margin-bottom: 36px;
font-size: 24px;
font-family: PingFang-SC-Bold, PingFang-SC;
font-family: AppleSystemUIFont;
text-align: center;
color: #333;
font-weight: bold;
line-height: 1;
line-height: 28px;
}
.item {
position: relative;
@ -227,4 +254,19 @@ export default {
border-radius: 4px;
}
}
.home {
position: absolute;
top: 33px;
right: 43px;
display: flex;
align-items: center;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #666666;
cursor: pointer;
img {
margin-right: 5px;
}
}
</style>

@ -48,7 +48,7 @@
<el-table-column type="selection" width="50" align="center" :reserve-selection="true" :selectable="row => !row.quote"></el-table-column>
<el-table-column type="index" width="60" label="ID"></el-table-column>
<el-table-column prop="site" label="站点" min-width="180"></el-table-column>
<el-table-column prop="quote" label="文章名称" min-width="180">
<el-table-column prop="quote" label="文章名称" min-width="180" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.quote || '--' }}
</template>

@ -208,7 +208,7 @@ export default {
},
//为内容模板插件提供预置模板
templates: [
{ title: '文章模板1', description: '图片文字流', content: `
{ title: '中文文章模板1', description: '图片文字流', content: `
<div class="tiny-wrap">
<div class="block">
<div class="fl">
@ -233,6 +233,21 @@ export default {
</div>
`
},
{ title: '英文文章模板1', description: '图片文字流', content: `
<div class="tiny-wrap">
<div class="block en-block">
<div class="fr">
<img src="https://tse1-mm.cn.bing.net/th/id/OIP-C._S-t6T2kt-j6ydemeoB1wAHaEs?w=301&h=190&c=7&r=0&o=5&pid=1.7"/>
<p class="img-des">Picture description</p>
</div>
<div>
<p>One of the major barriers to treating pain effectively is rooted in providers fear of killing their patients. This includes caregivers who may be family or friends. In a 2014 study I led of nonprofessional hospice caregivers, we found that the majority of pain medication errors caregivers made involved administering less than the prescribed dose, which makes it difficult for patients to achieve optimal pain relief.</p>
<p>Meanwhile, more than 11 million Americans  often family members or friends provide unpaid care for people with Alzheimer's or other dementias, according to calculations by the Alzheimers Association. In 2021, caregivers for people with Alzheimers or other dementias provided an estimated 16 billion hours of unpaid care valued at nearly $272 billion.My father took her to the emergency room. A doctor found a severe knee infection and took her into surgery. She was hospitalized for two weeks, followed by two months of rehabilitation at a skilled nursing facility.</p>
</div>
</div>
</div>
`
},
{ title: '新闻模板', description: '', content: `
<div class="tiny-wrap">
<div class="block" style="margin-bottom: 70px;">
@ -241,7 +256,7 @@ export default {
<p class="img-des">图片描述</p>
</div>
<div>
<p>S³FEL汇聚并培养信息生命材料能源等学科领域的国际水平科技领军人才集聚世界前沿和原创性科学技术及产业研发将推动一批高水平大学和科研机构的科技人才队伍建设及相关学科的高质量发展营造粤港澳大湾区人才高地并助力粤港澳大湾区国际科技创新中心的建设此外 S³FEL作为重要的科普教育基地是展示我国科技实力提高全民族科学素质和民族自信的重要宣传窗口 S³FEL主体建筑将成为深圳市地标式建筑促进提升深圳市的城市形象和国际化知名度S³FEL汇聚并培养信息生命材料能源等学科领域的国际水平科技领军人才集聚世界前沿和原创性科学技术及产业研发将推动一批高水平大学和科研机构的科技人才队伍建设及相关学科的高质量发展营造粤港澳大湾区人才高地并助力粤港澳大湾区国际科技创新中心的建设此外 S³FEL作为重要的科普教育基地是展示我国科技实力提高全民族科学素质和民族自信的重要宣传窗口 S³FEL主体建筑将成为深圳市地标式建筑促进提升深圳市的城市形象和国际化知名度S³FEL汇聚并培养信息生命材料能源等学科领域的国际水平科技领军人才集聚世界前沿和原创性科学技术及产业研发将推动一批高水平大学和科研机构的科技人才队伍建设及相关学科的高质量发展营造粤港澳大湾区人才高地并助力粤港澳大湾区国际科技创新中心的建设此外 S³FEL作为重要的科普教育基地是展示我国科技实力提高全民族科学素质和民族自信的重要宣传窗口 S³FEL主体建筑将成为深圳市地标式建筑促进提升深圳市的城市形象和国际化知名度</p>
<p style="text-indent: 2em">S³FEL汇聚并培养信息生命材料能源等学科领域的国际水平科技领军人才集聚世界前沿和原创性科学技术及产业研发将推动一批高水平大学和科研机构的科技人才队伍建设及相关学科的高质量发展营造粤港澳大湾区人才高地并助力粤港澳大湾区国际科技创新中心的建设此外 S³FEL作为重要的科普教育基地是展示我国科技实力提高全民族科学素质和民族自信的重要宣传窗口 S³FEL主体建筑将成为深圳市地标式建筑促进提升深圳市的城市形象和国际化知名度S³FEL汇聚并培养信息生命材料能源等学科领域的国际水平科技领军人才集聚世界前沿和原创性科学技术及产业研发将推动一批高水平大学和科研机构的科技人才队伍建设及相关学科的高质量发展营造粤港澳大湾区人才高地并助力粤港澳大湾区国际科技创新中心的建设此外 S³FEL作为重要的科普教育基地是展示我国科技实力提高全民族科学素质和民族自信的重要宣传窗口 S³FEL主体建筑将成为深圳市地标式建筑促进提升深圳市的城市形象和国际化知名度S³FEL汇聚并培养信息生命材料能源等学科领域的国际水平科技领军人才集聚世界前沿和原创性科学技术及产业研发将推动一批高水平大学和科研机构的科技人才队伍建设及相关学科的高质量发展营造粤港澳大湾区人才高地并助力粤港澳大湾区国际科技创新中心的建设此外 S³FEL作为重要的科普教育基地是展示我国科技实力提高全民族科学素质和民族自信的重要宣传窗口 S³FEL主体建筑将成为深圳市地标式建筑促进提升深圳市的城市形象和国际化知名度</p>
<div class="quote">
Here is a long quotation here is a long quotation here is a long quotation
here is a long quotation here is a long quotation here is a long quotation
@ -256,7 +271,7 @@ export default {
</div>
<div class="texts">
<h6 class="tiny-title">小标题</h6>
<p>S³FEL主要由一台超导直线加速器波荡器光束线和实验站组成可产生重复频率达1MHz电子束能量达2.5 GeV的软X 射线自由电子激光可在百飞秒内级实现原子分子及外壳层电子结构的无损动态监测是科学家认识和了解物质微观结构及动态变化的高速摄像机S³FEL为科学家和企业用户提供了一种具有超高时间分辨空间分辨和能量分辨的新方法新技术 S³FEL在量子材料能源催化生物医药大气与星际科学原子分子科学等领域的应用研究将为促进我国战略性新兴产业创新发展和关键S³FEL主要由一台超导直线加速器波荡器光束线和实验站组成可产生重复频率达1MHz电子束能量达2.5 GeV的软X 射线自由电子激光可在百飞秒内级实现原子分子及外壳层电子结构的无损动态监测是科学家认识和了解物质微观结构及动态变化的高速摄像机S³FEL为科学家和企业用户提供了一种具有超高时间分辨空间分辨和能量分辨的新方法新技术 S³FEL在量子材料能源催化生物医药大气与星际科学原子分子科学等领域的应用研究将为促进我国战略性新兴产业创新发展和关键
<p style="text-indent: 2em">S³FEL主要由一台超导直线加速器波荡器光束线和实验站组成可产生重复频率达1MHz电子束能量达2.5 GeV的软X 射线自由电子激光可在百飞秒内级实现原子分子及外壳层电子结构的无损动态监测是科学家认识和了解物质微观结构及动态变化的高速摄像机S³FEL为科学家和企业用户提供了一种具有超高时间分辨空间分辨和能量分辨的新方法新技术 S³FEL在量子材料能源催化生物医药大气与星际科学原子分子科学等领域的应用研究将为促进我国战略性新兴产业创新发展和关键S³FEL主要由一台超导直线加速器波荡器光束线和实验站组成可产生重复频率达1MHz电子束能量达2.5 GeV的软X 射线自由电子激光可在百飞秒内级实现原子分子及外壳层电子结构的无损动态监测是科学家认识和了解物质微观结构及动态变化的高速摄像机S³FEL为科学家和企业用户提供了一种具有超高时间分辨空间分辨和能量分辨的新方法新技术 S³FEL在量子材料能源催化生物医药大气与星际科学原子分子科学等领域的应用研究将为促进我国战略性新兴产业创新发展和关键
</p>
</div>
</div>

@ -20,7 +20,7 @@
<template v-for="(item, i) in detailStyle">
<li v-if="item.id !== column.detailStyle" :key="i" @click="form.articleTemplate = item.id">
<div class="review">
<!-- <img :src="require('@/assets/images/article' + item.id + '.png')" alt=""> -->
<img :class="{'is-link': item.id == 24}" :src="require('@/assets/images/style/' + item.id + '.png')" alt="">
</div>
<el-radio v-model="form.articleTemplate" :label="item.id">{{ item.style }}</el-radio>
</li>
@ -524,7 +524,7 @@ export default {
const { updateTime } = this
console.log("🚀 ~ file: index.vue:525 ~ beforeRouteLeave ~ updateTime", updateTime)
//
if (updateTime > 2) {
if (updateTime > 3) {
this.$confirm(`所填写内容暂未保存,是否保存?`, '提示', {
type: 'warning'
}).then(() => {
@ -617,7 +617,6 @@ export default {
e.name = e.fileName
})
}
this.form = data
//
if (data.articleTemplate === 24 && data.connectionType !== 2 && data.linkAddress) {
const links = data.linkAddress.split(',').map(e => +e)
@ -627,6 +626,7 @@ export default {
}
data.siteSelection && this.getOtherColumn()
this.originalName = data.title
this.form = data
this.getColumn()
}).catch(err => {})
},
@ -920,10 +920,10 @@ export default {
this.$message.error('请上传图片!')
return false
}
if (size / 1024 / 1024 > 5) {
this.$message.error('请上传5M以内的图片!')
return false
}
// if (size / 1024 / 1024 > 5) {
// this.$message.error('5M')
// return false
// }
this.file = file
this.cropperModel = true
this.$nextTick(() => {
@ -972,7 +972,7 @@ export default {
},
//
preview() {
window.open((Setting.isDev ? `http://${location.hostname}:8095` : 'http://192.168.31.136/front') + `/#/article?articleId=${this.form.id}&siteId=${this.form.siteId}&id=${this.form.columnId}`)
window.open((Setting.isDev ? `http://${location.hostname}:8095` : this.$store.state.content.site.domainName) + `/#/article?articleId=${this.form.id}&siteId=${this.form.siteId}&id=${this.form.columnId}`)
},
//
back() {
@ -1176,6 +1176,12 @@ $upload-lg-height: 102px;
margin-bottom: 10px;
border: 1px solid #DCDEE0;
border-radius: 2px;
img {
width: 80px;
}
.is-link {
width: 50px;
}
}
}
.info {

@ -289,7 +289,7 @@ export default {
},
//
preview(row) {
window.open((Setting.isDev ? `http://${location.hostname}:8095` : 'http://192.168.31.136/front') + `/#/article?articleId=${row.id}&siteId=${this.$refs.column.getCurrentNode().siteId}&id=${row.columnId}`)
window.open((Setting.isDev ? `http://${location.hostname}:8095` : this.$store.state.content.site.domainName) + `/#/article?articleId=${row.id}&siteId=${this.$refs.column.getCurrentNode().siteId}&id=${row.columnId}`)
},
//
edit(row) {

@ -85,7 +85,7 @@
<ul class="styles">
<li v-for="(item, i) in listStyle" :key="i" @click="form.listStyleId = item.id">
<div class="review">
<img :src="require('@/assets/images/style/' + item.id + '.png')" alt="">
<img style="width: 90px;max-height: 110px;" :src="require('@/assets/images/style/' + item.id + '.png')" alt="">
</div>
<el-radio v-model="form.listStyleId" :label="item.id">{{ item.style }}</el-radio>
</li>
@ -95,7 +95,7 @@
<ul class="styles">
<li v-for="(item, i) in detailStyleId" :key="i" @click="form.detailStyleId = item.id">
<div class="review">
<img :src="require('@/assets/images/style/' + item.id + '.png')" alt="">
<img :style="{width: item.id == 24 ? '50px' : '90px', 'max-height': '110px'}" :src="require('@/assets/images/style/' + item.id + '.png')" alt="">
</div>
<el-radio v-model="form.detailStyleId" :label="item.id">{{ item.style }}</el-radio>
</li>
@ -195,13 +195,13 @@
</ul>
</el-form-item>
</template>
<el-form-item v-show="form.typeId === 1 || form.typeId === 4" prop="showWithDetails" label="只有一篇文章时,以详情方式展示" label-width="240px">
<!-- <el-form-item v-show="form.typeId === 1 || form.typeId === 4" prop="showWithDetails" label="只有一篇文章时,以详情方式展示" label-width="240px">
<el-switch
v-model="form.showWithDetails"
:active-value="1"
:inactive-value="0">
</el-switch>
</el-form-item>
</el-form-item> -->
</el-form>
<div class="btns">
<el-button type="primary" @click="submit(0)">确定</el-button>
@ -599,10 +599,10 @@ export default {
this.$message.error('请上传图片!')
return false
}
if (size / 1024 / 1024 > 5) {
this.$message.error('请上传5M以内的图片!')
return false
}
// if (size / 1024 / 1024 > 5) {
// this.$message.error('5M')
// return false
// }
this.file = file
this.cropperModel = true
this.$nextTick(() => {

@ -121,12 +121,12 @@
</div>
<el-radio v-model="form.styleTemplate" :label="1">竖行导航</el-radio>
</li>
<li>
<!-- <li>
<div class="review">
<img src="@/assets/images/style2.png" alt="">
</div>
<el-radio v-model="form.styleTemplate" :label="2">横向导航</el-radio>
</li>
</li> -->
</ul>
</el-form-item>
</el-form>
@ -288,13 +288,8 @@ export default {
},
//
preview(row) {
let path = 'column'
// /column
if (row.typeId === 3) {
const item = this.pageStyle.find(e => e.id == row.listStyleId)
if (item) path = item.path
}
window.open((Setting.isDev ? `http://${location.hostname}:8095` : 'http://192.168.31.136/front') + `/#/${row.typeId === 3 ? row.path : 'column'}?id=${row.id}&siteId=${row.siteId}`)
window.open((Setting.isDev ? `http://${location.hostname}:8095` : this.$store.state.content.site.domainName) + `/#/${row.typeId === 3 ? row.path : 'column'}?id=${row.id}&siteId=${row.siteId}`)
},
//
page(row) {

@ -23,12 +23,12 @@
<label>工号</label>
<el-input size="small" v-model="form.jobNumber" clearable></el-input>
</li>
<!-- <li>
<li>
<label>邮箱</label>
<el-input class="m-r-10" size="small" v-model="form.email" disabled></el-input>
<el-button v-if="form.email" type="text" size="small" @click="bindEmail">更换</el-button>
<el-button v-else type="text" size="small" @click="bindEmail">添加</el-button>
</li> -->
<el-input class="m-r-10" size="small" v-model="form.email"></el-input>
<!-- <el-button v-if="form.email" type="text" size="small" @click="bindEmail">更换</el-button>
<el-button v-else type="text" size="small" @click="bindEmail">添加</el-button> -->
</li>
<li>
<label>手机号</label>
<el-input class="m-r-10" type="text" size="small" maxlength="11" v-model="form.phone"></el-input>
@ -285,6 +285,7 @@ export default {
phone: form.phone,
realName: form.realName,
username: form.username,
email: form.email,
sex: form.sex,
}).then(res => {
this.$emit('updateStatus', false)

@ -35,6 +35,7 @@
<script>
import { mapState, mapMutations } from 'vuex'
import util from '@/libs/util'
import Setting from '@/setting'
export default {
data() {
return {
@ -99,7 +100,7 @@ export default {
},
//
toIndex(row) {
window.open((Setting.isDev ? `http://${location.hostname}:8095` : row.domainName) + `/#/column?siteId=${row.id}`)
},
//
content(row) {

@ -154,9 +154,9 @@
<el-form-item prop="phone" label="手机号">
<el-input v-model.trim="form.phone" placeholder="请输入手机号" maxlength="11"></el-input>
</el-form-item>
<!-- <el-form-item prop="email" label="邮箱">
<el-form-item prop="email" label="邮箱">
<el-input v-model.trim="form.email" placeholder="请输入邮箱"></el-input>
</el-form-item> -->
</el-form-item>
<el-form-item prop="groupId" label="用户组">
<el-select v-model="form.groupId" style="width: 100%">
<template v-for="item in userGroups">
@ -237,6 +237,30 @@ export default {
}
}
}
const phonePass = (rule, value, callback) => {
if (value) {
const pattern = /^1[3456789]\d{9}$/
if(pattern.test(value)){
callback()
}else{
callback(new Error('请输入正确手机号格式'))
}
} else {
callback()
}
}
const emailPass = (rule, value, callback) => {
if (value) {
const pattern = /^[a-zA-Z0-9][a-zA-Z0-9_]+\@[a-zA-Z0-9]+\.[a-zA-Z]{2,5}(\.[a-zA-Z]{2,5})*$/i
if(pattern.test(value)){
callback()
}else{
callback(new Error('请输入正确邮箱格式'))
}
} else {
callback()
}
}
return {
orgs: [],
defaultProps: {
@ -341,6 +365,12 @@ export default {
],
groupId: [
{ required: true, message: "请选择用户组", trigger: "change" }
],
phone: [
{ validator: phonePass, trigger: 'blur' }
],
email: [
{ validator: emailPass, trigger: 'blur' }
]
},
list: [],

@ -15,7 +15,7 @@ service.defaults.headers.post["Content-Type"] = "application/json;charset=UTF-8"
// 请求拦截器
service.interceptors.request.use(config => {
let token = util.local.get(Setting.tokenKey);
config.headers.captcha = ''
if (token) config.headers.token = token
return config;
}, err => {
util.errorMsg({

@ -6,9 +6,8 @@ const isDev = process.env.NODE_ENV === 'development' // 开发环境
let host = `${location.origin}/`
if (isDev) {
host = 'http://192.168.31.136:10000/' // 测试服
// host = 'http://192.168.31.136/' // 测试服
// host = 'http://192.168.31.51:10000/' // 榕
// host = 'http://192.168.31.116:10000/' // 赓
host = 'http://192.168.31.116:10000/' // 赓
}
const Setting = {

@ -4,14 +4,30 @@
font-family: PingFang;
src: url('font/PingFang-Regular.otf');
}
@font-face {
font-family: PingFangSC-Medium;
src: url('font/PingFangSC-Medium.otf');
}
@font-face {
font-family: PingFangSC-Semibold;
src: url('font/PingFangTC-Semibold.ttf');
}
@font-face {
font-family: SFProDisplay-Bold;
src: url('font/SF-Pro-Display-Bold.otf');
}
@font-face {
font-family: SFProDisplay;
src: url('font/SF-Pro-Display-Regular.otf');
}
@font-face {
font-family: toppan;
src: url('font/toppan.otf');
}
@font-face {
font-family: ProximaNova;
src: url('font/ProximaNova-Regular.otf');
}
[v-cloak] {
display: none;
}

Loading…
Cancel
Save