Compare commits
2 Commits
78106a56db
...
93bb48e45d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
93bb48e45d | ||
|
|
fbde96d076 |
2
main.js
2
main.js
@ -58,4 +58,4 @@ export function createApp() {
|
|||||||
app
|
app
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// #endif
|
// #endif
|
||||||
|
|||||||
@ -1,424 +1,463 @@
|
|||||||
<!-- 发起订单 -->
|
<!-- 发起订单 -->
|
||||||
<template>
|
<template>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view class="c-top">
|
<view class="c-top">
|
||||||
<view class="" @click="getback()">
|
<view class="" @click="getback()">
|
||||||
<uni-icons type="left" size="18"></uni-icons>
|
<uni-icons type="left" size="18"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
<view class="c-title">发布</view>
|
<view class="c-title">发布</view>
|
||||||
<view class=""></view>
|
<view class=""></view>
|
||||||
</view>
|
</view>
|
||||||
<view class="dil">
|
<view class="dil">
|
||||||
|
|
||||||
<!-- 填空 -->
|
<!-- 填空 -->
|
||||||
<view class="tinput">
|
<view class="tinput">
|
||||||
<view class="text1"> <text class="hong1">*</text> 标题</view>
|
<view class="text1">
|
||||||
<view class="you">
|
<text class="hong1">*</text>
|
||||||
<input type="text" placeholder="请输入标题" v-model="newsTitle">
|
标题
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<view class="you">
|
||||||
<!-- 填空 -->
|
<input type="text" placeholder="请输入标题" v-model="newsTitle">
|
||||||
<!-- <view class="tinput">
|
</view>
|
||||||
<view class="text1"> <text class="hong1">*</text> 发布单位</view>
|
</view>
|
||||||
<view class="you">
|
<!-- 填空 -->
|
||||||
<input type="text" placeholder="请发布单位 "v-model="publishUnit" >
|
<!-- <view class="tinput">
|
||||||
</view>
|
<view class="text1"> <text class="hong1">*</text> 发布单位</view>
|
||||||
</view> -->
|
<view class="you">
|
||||||
<view class="tinput">
|
<input type="text" placeholder="请发布单位 "v-model="publishUnit" >
|
||||||
<view class="text1"> <text class="hong1">*</text> 封面图</view>
|
</view>
|
||||||
<view class="you">
|
</view> -->
|
||||||
<text>请上传封面图片</text>
|
<view class="tinput">
|
||||||
<!-- <input type="text" placeholder="请上传封面图片"> -->
|
<view class="text1">
|
||||||
</view>
|
<text class="hong1">*</text>
|
||||||
</view>
|
封面图
|
||||||
<!-- 上传图片 -->
|
</view>
|
||||||
<u-upload
|
<view class="you">
|
||||||
:fileList="fileList1"
|
<text>请上传封面图片</text>
|
||||||
@afterRead="afterRead"
|
<!-- <input type="text" placeholder="请上传封面图片"> -->
|
||||||
@delete="deletePic"
|
</view>
|
||||||
name="1"
|
</view>
|
||||||
multiple
|
<!-- 上传图片 -->
|
||||||
:previewFullImage="true"
|
<u-upload
|
||||||
:maxCount="1"
|
:fileList="fileList1"
|
||||||
></u-upload>
|
@afterRead="afterRead"
|
||||||
<view class="xinput">
|
@delete="deletePic"
|
||||||
<Rboy-editor ref="RboyEditor" @uploadFile="uploadFile" :count="6"></Rboy-editor>
|
name="1"
|
||||||
</view>
|
multiple
|
||||||
|
:previewFullImage="true"
|
||||||
|
:maxCount="1"
|
||||||
|
></u-upload>
|
||||||
|
<view v-if="type === 'null'" class="tinput" style="display: flex;justify-content: space-between">
|
||||||
|
<text class="text1">设置可见</text>
|
||||||
|
<view>
|
||||||
|
<radio :checked="!ifShow" @click="changeShow(null)">全部可见</radio>
|
||||||
|
<radio :checked="ifShow === '01'" style="margin-left: 0.5rem" @click="changeShow('01')">员工可见</radio>
|
||||||
|
<radio :checked="ifShow === '02'" style="margin-left: 0.5rem" @click="changeShow('02')">用户可见</radio>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="xinput">
|
||||||
|
<Rboy-editor ref="RboyEditor" @uploadFile="uploadFile" :count="6"></Rboy-editor>
|
||||||
|
</view>
|
||||||
|
|
||||||
<view class="xinput" v-if="type == 'hygg'">
|
<view class="xinput" v-if="type == 'hygg'">
|
||||||
<view class="text1"> <text class="hong1">*</text> 分类</view>
|
<view class="text1">
|
||||||
<view class="xz">
|
<text class="hong1">*</text>
|
||||||
<view :class="{'xlan':maneizhi == index}" class="kuang" v-for="(item,index) in taplist" :key="index" @click="getzhi2(index,item.value)">
|
分类
|
||||||
<view class="">{{item.label}}</view>
|
</view>
|
||||||
</view>
|
<view class="xz">
|
||||||
</view>
|
<view :class="{'xlan':maneizhi == index}" class="kuang" v-for="(item,index) in taplist" :key="index"
|
||||||
</view>
|
@click="getzhi2(index,item.value)">
|
||||||
|
<view class="">{{ item.label }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="tinput">
|
||||||
|
<view class="text1"> 上传视频</view>
|
||||||
|
<view class="you">
|
||||||
|
<text>请上传视频</text>
|
||||||
|
<!-- <input type="text" placeholder="请上传视频"> -->
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 上传视频 -->
|
||||||
|
<u-upload
|
||||||
|
:fileList="fileList2"
|
||||||
|
@afterRead="afterRead1"
|
||||||
|
@delete="deletePic1"
|
||||||
|
name="2"
|
||||||
|
multiple
|
||||||
|
:maxCount="1"
|
||||||
|
accept="video"
|
||||||
|
:previewFullImage="true"
|
||||||
|
></u-upload>
|
||||||
|
<view class="anniu" @click="getnewsadd()">
|
||||||
|
<text>发布文章</text>
|
||||||
|
</view>
|
||||||
|
<view style="width: 100%; height: 60px;"></view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
<view class="tinput">
|
</view>
|
||||||
<view class="text1"> 上传视频</view>
|
|
||||||
<view class="you">
|
|
||||||
<text>请上传视频</text>
|
|
||||||
<!-- <input type="text" placeholder="请上传视频"> -->
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<!-- 上传视频 -->
|
|
||||||
<u-upload
|
|
||||||
:fileList="fileList2"
|
|
||||||
@afterRead="afterRead1"
|
|
||||||
@delete="deletePic1"
|
|
||||||
name="2"
|
|
||||||
multiple
|
|
||||||
:maxCount="1"
|
|
||||||
accept="video"
|
|
||||||
:previewFullImage="true"
|
|
||||||
></u-upload>
|
|
||||||
<view class="anniu" @click="getnewsadd()">
|
|
||||||
<text>发布文章</text>
|
|
||||||
</view>
|
|
||||||
<view style="width: 100%; height: 60px;"></view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
|
|
||||||
</view>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import RboyEditor from "@/components/Rboy-editor/Rboy-editor"
|
import RboyEditor from "@/components/Rboy-editor/Rboy-editor"
|
||||||
import request from '../../utils/request'
|
import request from '../../utils/request'
|
||||||
import config from '@/config'
|
import config from '@/config'
|
||||||
import upload from '@/utils/upload.js'
|
import upload from '@/utils/upload.js'
|
||||||
export default{
|
|
||||||
data(){
|
|
||||||
return{
|
|
||||||
baseUrl:this.$baseUrl,
|
|
||||||
fileList1: [],
|
|
||||||
fileList2: [],
|
|
||||||
newsCover:'',
|
|
||||||
videoUrl:'',
|
|
||||||
newsTitle:'',
|
|
||||||
publishUnit:'',
|
|
||||||
newsContent:'',
|
|
||||||
value:'',
|
|
||||||
type:'hmzc',
|
|
||||||
id:1,
|
|
||||||
carzhi:0,
|
|
||||||
maneizhi:0,
|
|
||||||
taplist:[],
|
|
||||||
|
|
||||||
}
|
export default {
|
||||||
},
|
data() {
|
||||||
onLoad(option) {
|
return {
|
||||||
this.id = option.id
|
baseUrl: this.$baseUrl,
|
||||||
this.type = option.type
|
fileList1: [],
|
||||||
},
|
fileList2: [],
|
||||||
mounted() {
|
newsCover: '',
|
||||||
this.gettap()
|
videoUrl: '',
|
||||||
},
|
newsTitle: '',
|
||||||
components:{
|
publishUnit: '',
|
||||||
RboyEditor,
|
newsContent: '',
|
||||||
},
|
value: '',
|
||||||
methods:{
|
type: 'hmzc',
|
||||||
async set_content() {
|
id: 1,
|
||||||
this.$refs.RboyEditor.editor_setContents(this.detail)
|
carzhi: 0,
|
||||||
},
|
maneizhi: 0,
|
||||||
// 获取内容
|
taplist: [],
|
||||||
async get_content() {
|
ifShow: null,
|
||||||
this.newsContent = await this.$refs.RboyEditor.editor_getcontents()
|
}
|
||||||
},
|
},
|
||||||
// 上传图片
|
onLoad(option) {
|
||||||
async uploadFile(event) {
|
this.id = option.id
|
||||||
let that = this
|
this.type = option.type
|
||||||
// event 选择的图片
|
},
|
||||||
for (var item in event.tempFilePaths) {
|
mounted() {
|
||||||
// uploadFileApi 为上传到服务端的接口 count大于1 使用 await
|
this.gettap()
|
||||||
upload({
|
},
|
||||||
url:'/common/upload',
|
components: {
|
||||||
filePath: event.tempFilePaths[item],
|
RboyEditor,
|
||||||
}).then((res)=>{
|
},
|
||||||
that.$refs.RboyEditor.editor_insertImage({
|
methods: {
|
||||||
src: this.baseUrl + res.fileName,
|
changeShow(value) {
|
||||||
alt: "图像",
|
this.ifShow = value
|
||||||
})
|
},
|
||||||
})
|
async set_content() {
|
||||||
}
|
this.$refs.RboyEditor.editor_setContents(this.detail)
|
||||||
},
|
},
|
||||||
async gettap(){
|
// 获取内容
|
||||||
//行业公告分类
|
async get_content() {
|
||||||
let ress = await request({
|
this.newsContent = await this.$refs.RboyEditor.editor_getcontents()
|
||||||
url: '/appInspection/news/editType',
|
},
|
||||||
method: 'get',
|
// 上传图片
|
||||||
})
|
async uploadFile(event) {
|
||||||
this.taplist = ress.data
|
let that = this
|
||||||
this.value = ress.data[0].value
|
// event 选择的图片
|
||||||
},
|
for (var item in event.tempFilePaths) {
|
||||||
|
// uploadFileApi 为上传到服务端的接口 count大于1 使用 await
|
||||||
|
upload({
|
||||||
|
url: '/common/upload',
|
||||||
|
filePath: event.tempFilePaths[item],
|
||||||
|
}).then((res) => {
|
||||||
|
that.$refs.RboyEditor.editor_insertImage({
|
||||||
|
src: this.baseUrl + res.fileName,
|
||||||
|
alt: "图像",
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async gettap() {
|
||||||
|
//行业公告分类
|
||||||
|
let ress = await request({
|
||||||
|
url: '/appInspection/news/editType',
|
||||||
|
method: 'get',
|
||||||
|
})
|
||||||
|
this.taplist = ress.data
|
||||||
|
this.value = ress.data[0].value
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
// 删除图片
|
// 删除图片
|
||||||
deletePic(event) {
|
deletePic(event) {
|
||||||
this[`fileList${event.name}`].splice(event.index, 1)
|
this[`fileList${event.name}`].splice(event.index, 1)
|
||||||
},
|
},
|
||||||
// 新增图片
|
// 新增图片
|
||||||
async afterRead(event) {
|
async afterRead(event) {
|
||||||
// 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
|
// 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
|
||||||
let lists = [].concat(event.file)
|
let lists = [].concat(event.file)
|
||||||
let fileListLen = this[`fileList${event.name}`].length
|
let fileListLen = this[`fileList${event.name}`].length
|
||||||
lists.map((item) => {
|
lists.map((item) => {
|
||||||
this[`fileList${event.name}`].push({
|
this[`fileList${event.name}`].push({
|
||||||
...item,
|
...item,
|
||||||
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
for (let i = 0; i < lists.length; i++) {
|
for (let i = 0; i < lists.length; i++) {
|
||||||
const result = await this.uploadFilePromise(lists[i].url)
|
const result = await this.uploadFilePromise(lists[i].url)
|
||||||
let item = this[`fileList${event.name}`][fileListLen]
|
let item = this[`fileList${event.name}`][fileListLen]
|
||||||
this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
|
this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
|
||||||
status: 'success',
|
status: 'success',
|
||||||
message: '',
|
message: '',
|
||||||
url: result
|
url: result
|
||||||
}))
|
}))
|
||||||
fileListLen++
|
fileListLen++
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
uploadFilePromise(url) {
|
uploadFilePromise(url) {
|
||||||
upload({
|
upload({
|
||||||
url:'/common/upload',
|
url: '/common/upload',
|
||||||
filePath: url,
|
filePath: url,
|
||||||
}).then((res)=>{
|
}).then((res) => {
|
||||||
this.newsCover = res.fileName
|
this.newsCover = res.data.url
|
||||||
})
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
deletePic1(event) {
|
deletePic1(event) {
|
||||||
this[`fileList${event.name}`].splice(event.index, 1)
|
this[`fileList${event.name}`].splice(event.index, 1)
|
||||||
},
|
},
|
||||||
// 新增图片
|
// 新增图片
|
||||||
async afterRead1(event) {
|
async afterRead1(event) {
|
||||||
// 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
|
// 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
|
||||||
let lists = [].concat(event.file)
|
let lists = [].concat(event.file)
|
||||||
let fileListLen = this[`fileList${event.name}`].length
|
let fileListLen = this[`fileList${event.name}`].length
|
||||||
lists.map((item) => {
|
lists.map((item) => {
|
||||||
this[`fileList${event.name}`].push({
|
this[`fileList${event.name}`].push({
|
||||||
...item,
|
...item,
|
||||||
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
for (let i = 0; i < lists.length; i++) {
|
for (let i = 0; i < lists.length; i++) {
|
||||||
const result = await this.uploadFilePromise1(lists[i].url)
|
const result = await this.uploadFilePromise1(lists[i].url)
|
||||||
let item = this[`fileList${event.name}`][fileListLen]
|
let item = this[`fileList${event.name}`][fileListLen]
|
||||||
this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
|
this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
|
||||||
status: 'success',
|
status: 'success',
|
||||||
message: '',
|
message: '',
|
||||||
url: result
|
url: result
|
||||||
}))
|
}))
|
||||||
fileListLen++
|
fileListLen++
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
uploadFilePromise1(url) {
|
uploadFilePromise1(url) {
|
||||||
upload({
|
upload({
|
||||||
url:'/common/upload',
|
url: '/common/upload',
|
||||||
filePath: url,
|
filePath: url,
|
||||||
}).then((res)=>{
|
}).then((res) => {
|
||||||
this.videoUrl = res.fileName
|
this.videoUrl = res.fileName
|
||||||
})
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
//发布按钮
|
//发布按钮
|
||||||
async getnewsadd(){
|
async getnewsadd() {
|
||||||
this.newsContent = await this.$refs.RboyEditor.editor_getcontents()
|
this.newsContent = await this.$refs.RboyEditor.editor_getcontents()
|
||||||
if(this.newsTitle==''||this.newsCover==''||this.newsContent==''){
|
if (this.newsTitle == '' || this.newsCover == '' || this.newsContent == '') {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title:'必填项不能有空!',
|
title: '必填项不能有空!',
|
||||||
icon:'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let data={
|
let data = {
|
||||||
newsTitle:this.newsTitle,
|
newsTitle: this.newsTitle,
|
||||||
newsCover:this.newsCover,
|
newsCover: this.newsCover,
|
||||||
|
newsContent: this.newsContent,
|
||||||
|
videoUrl: this.videoUrl,
|
||||||
|
category: this.value,
|
||||||
|
type: this.type,
|
||||||
|
ifShow: this.ifShow
|
||||||
|
}
|
||||||
|
let res = await request({
|
||||||
|
url: '/appInspection/news/add',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
if (res.code == 200) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '发布成功,三秒后返回'
|
||||||
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.navigateBack({
|
||||||
|
delta: 1
|
||||||
|
});
|
||||||
|
}, 3000);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
newsContent:this.newsContent,
|
getback() {
|
||||||
videoUrl:this.videoUrl,
|
uni.navigateBack({
|
||||||
category:this.value,
|
delta: 1,
|
||||||
type:this.type,
|
})
|
||||||
}
|
},
|
||||||
let res = await request({
|
getzhi(index) {
|
||||||
url: '/appInspection/news/add',
|
this.carzhi = index
|
||||||
method: 'post',
|
},
|
||||||
data:data
|
getzhi2(index, value) {
|
||||||
})
|
this.value = value
|
||||||
if(res.code == 200){
|
this.maneizhi = index
|
||||||
uni.showToast({
|
},
|
||||||
title:'发布成功,三秒后返回'
|
|
||||||
})
|
|
||||||
setTimeout(() => {
|
|
||||||
uni.navigateBack({
|
|
||||||
delta: 1
|
|
||||||
});
|
|
||||||
}, 3000);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
getback(){
|
}
|
||||||
uni.navigateBack({
|
|
||||||
delta:1,
|
|
||||||
})
|
|
||||||
},
|
|
||||||
getzhi(index){
|
|
||||||
this.carzhi = index
|
|
||||||
},
|
|
||||||
getzhi2(index,value){
|
|
||||||
this.value =value
|
|
||||||
this.maneizhi = index
|
|
||||||
},
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.content{
|
.content {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: calc(100vh);
|
height: calc(100vh);
|
||||||
background-color: #F6F6F6;
|
background-color: #F6F6F6;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
// padding-top: 45px;
|
// padding-top: 45px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dil{
|
.dil {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
background-color: #F6F6F6;
|
background-color: #F6F6F6;
|
||||||
padding: 0px 12px;
|
padding: 0px 12px;
|
||||||
|
|
||||||
}
|
}
|
||||||
.top-icon{
|
|
||||||
margin-bottom: 45px;
|
|
||||||
}
|
|
||||||
.c-top{
|
|
||||||
width: 100%;
|
|
||||||
box-sizing: border-box;
|
|
||||||
padding: 15px;
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
background-color: white;
|
|
||||||
padding-top: 40px;
|
|
||||||
}
|
|
||||||
.c-title{
|
|
||||||
font-size: 18px;
|
|
||||||
font-weight: bold
|
|
||||||
}
|
|
||||||
.top{
|
|
||||||
box-sizing: border-box;
|
|
||||||
padding: 0px 15px;
|
|
||||||
width: 100%;
|
|
||||||
background-color: white;
|
|
||||||
}
|
|
||||||
.top-box{
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
box-sizing: border-box;
|
|
||||||
padding: 20px 0px;
|
|
||||||
}
|
|
||||||
.tb-left{
|
|
||||||
height: 100%;
|
|
||||||
width: 80%;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
.uicon{
|
|
||||||
width: 18px;
|
|
||||||
height: 18px;
|
|
||||||
border-radius: 4px;
|
|
||||||
color: white;
|
|
||||||
background: orangered;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
font-size: 12px;
|
|
||||||
font-weight: bold;
|
|
||||||
margin-right: 6px;
|
|
||||||
}
|
|
||||||
.tb-right{
|
|
||||||
width: 20px;
|
|
||||||
height: 26px;
|
|
||||||
image{
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.text1{
|
|
||||||
font-size: 16px;
|
|
||||||
font-weight: bold;
|
|
||||||
color: #363636;
|
|
||||||
}
|
|
||||||
.hong1{
|
|
||||||
margin-top: 5px;
|
|
||||||
font-size: 12px;
|
|
||||||
font-weight: 400;
|
|
||||||
color: #FF5453;
|
|
||||||
}
|
|
||||||
.hong2{
|
|
||||||
margin-top: 5px;
|
|
||||||
font-size: 12px;
|
|
||||||
font-weight: 400;
|
|
||||||
|
|
||||||
}
|
.top-icon {
|
||||||
.tinput{
|
margin-bottom: 45px;
|
||||||
width: 100%;
|
}
|
||||||
display: flex;
|
|
||||||
background: white;
|
.c-top {
|
||||||
align-items: center;
|
width: 100%;
|
||||||
justify-content: space-between;
|
box-sizing: border-box;
|
||||||
box-sizing: border-box;
|
padding: 15px;
|
||||||
padding: 16px;
|
display: flex;
|
||||||
margin-top: 14px;
|
justify-content: space-between;
|
||||||
margin-bottom: 14px;
|
align-items: center;
|
||||||
}
|
background-color: white;
|
||||||
.xinput{
|
padding-top: 40px;
|
||||||
width: 100%;
|
}
|
||||||
background: white;
|
|
||||||
box-sizing: border-box;
|
.c-title {
|
||||||
padding: 16px;
|
font-size: 18px;
|
||||||
margin-top: 14px;
|
font-weight: bold
|
||||||
}
|
}
|
||||||
.you{
|
|
||||||
text-align: right;
|
.top {
|
||||||
}
|
box-sizing: border-box;
|
||||||
.xz{
|
padding: 0px 15px;
|
||||||
margin-top: 10px;
|
width: 100%;
|
||||||
display: flex;
|
background-color: white;
|
||||||
align-items: center;
|
}
|
||||||
}
|
|
||||||
.kuang{
|
.top-box {
|
||||||
width: 80px;
|
display: flex;
|
||||||
height: 23px;
|
justify-content: space-between;
|
||||||
background: #ECECEC;
|
align-items: center;
|
||||||
border-radius: 5px;
|
box-sizing: border-box;
|
||||||
display: flex;
|
padding: 20px 0px;
|
||||||
justify-content: center;
|
}
|
||||||
align-items: center;
|
|
||||||
color: #666666;
|
.tb-left {
|
||||||
font-size: 14px;
|
height: 100%;
|
||||||
margin-right: 15px;
|
width: 80%;
|
||||||
}
|
display: flex;
|
||||||
.xlan{
|
align-items: center;
|
||||||
background: #CDE7FF !important;
|
}
|
||||||
color: #1D62FF !important;
|
|
||||||
border: 1px solid #2A96FE;
|
.uicon {
|
||||||
}
|
width: 18px;
|
||||||
.anniu{
|
height: 18px;
|
||||||
width: 100%;
|
border-radius: 4px;
|
||||||
background: linear-gradient(180deg, #3F61C0 0%, #0D2E8D 100%);
|
color: white;
|
||||||
border-radius: 50px ;
|
background: orangered;
|
||||||
height: 40px;
|
display: flex;
|
||||||
display: flex;
|
justify-content: center;
|
||||||
justify-content: center;
|
align-items: center;
|
||||||
align-items: center;
|
font-size: 12px;
|
||||||
color: #542F0E;
|
font-weight: bold;
|
||||||
margin-top: 20px;
|
margin-right: 6px;
|
||||||
color: white;
|
}
|
||||||
}
|
|
||||||
|
.tb-right {
|
||||||
|
width: 20px;
|
||||||
|
height: 26px;
|
||||||
|
|
||||||
|
image {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.text1 {
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #363636;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hong1 {
|
||||||
|
margin-top: 5px;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #FF5453;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hong2 {
|
||||||
|
margin-top: 5px;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 400;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.tinput {
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
background: white;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 16px;
|
||||||
|
margin-top: 14px;
|
||||||
|
margin-bottom: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xinput {
|
||||||
|
width: 100%;
|
||||||
|
background: white;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 16px;
|
||||||
|
margin-top: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.you {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xz {
|
||||||
|
margin-top: 10px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.kuang {
|
||||||
|
width: 80px;
|
||||||
|
height: 23px;
|
||||||
|
background: #ECECEC;
|
||||||
|
border-radius: 5px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
color: #666666;
|
||||||
|
font-size: 14px;
|
||||||
|
margin-right: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.xlan {
|
||||||
|
background: #CDE7FF !important;
|
||||||
|
color: #1D62FF !important;
|
||||||
|
border: 1px solid #2A96FE;
|
||||||
|
}
|
||||||
|
|
||||||
|
.anniu {
|
||||||
|
width: 100%;
|
||||||
|
background: linear-gradient(180deg, #3F61C0 0%, #0D2E8D 100%);
|
||||||
|
border-radius: 50px;
|
||||||
|
height: 40px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
color: #542F0E;
|
||||||
|
margin-top: 20px;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -45,7 +45,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="s-right">
|
<view class="s-right">
|
||||||
<view class="s-title">{{ item.nickname || item.username }}</view>
|
<view class="s-title">{{ item.nickname || item.username }}</view>
|
||||||
<view class="s-hui">岗位:{{item.roleName}}</view>
|
<view class="s-hui">岗位:{{ item.roleName }}</view>
|
||||||
<view class="s-hui">电话:{{ item.mobile || item.username }}</view>
|
<view class="s-hui">电话:{{ item.mobile || item.username }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
@ -76,8 +76,8 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
<u-popup :round="10" :show="show" @close="close" @open="open">
|
<u-popup :round="10" :show="show" @close="close" :mask-click="false" @open="open">
|
||||||
<view class="pop-box">
|
<view class="pop-box scrollable-content">
|
||||||
<view class="s-title">添加员工</view>
|
<view class="s-title">添加员工</view>
|
||||||
<view class="on-input">
|
<view class="on-input">
|
||||||
<view class="s-huix">姓名:</view>
|
<view class="s-huix">姓名:</view>
|
||||||
@ -87,8 +87,57 @@
|
|||||||
<view class="s-huix">电话:</view>
|
<view class="s-huix">电话:</view>
|
||||||
<view class=""><input v-model="phoneNum" type="text" placeholder="请输入手机号"></view>
|
<view class=""><input v-model="phoneNum" type="text" placeholder="请输入手机号"></view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="on-input">
|
||||||
|
<view class="s-huix">学历:</view>
|
||||||
|
<view class="" @click="showEducation = true"><input v-model="educationText" type="text"
|
||||||
|
placeholder="请选择学历"></view>
|
||||||
|
</view>
|
||||||
|
<view class="on-input">
|
||||||
|
<view class="s-huix">身份证号:</view>
|
||||||
|
<view class=""><input v-model="idNumber" type="text" placeholder="请输入身份证号"></view>
|
||||||
|
</view>
|
||||||
|
<view class="on-input">
|
||||||
|
<view class="s-huix">入职时间:</view>
|
||||||
|
<view class="" @click="showJoinedDate = true"><input :value="formattedJoinedDate" type="text"
|
||||||
|
placeholder="请选择入职时间"></view>
|
||||||
|
</view>
|
||||||
|
<view class="on-input">
|
||||||
|
<view class="s-huix">转正时间:</view>
|
||||||
|
<view class="" @click="showFormalDate = true"><input :value="formattedFormalDate" type="text"
|
||||||
|
placeholder="请选择转正时间"></view>
|
||||||
|
</view>
|
||||||
|
<view class="on-input">
|
||||||
|
<view class="s-huix">购买保险时间:</view>
|
||||||
|
<view class="" @click="showSafeDate = true"><input :value="formattedSafeDate" type="text"
|
||||||
|
placeholder="请选择购买保险时间"></view>
|
||||||
|
</view>
|
||||||
|
<view class="on-input">
|
||||||
|
<view class="s-huix">附件:</view>
|
||||||
|
<view class="" @click="addFile"><input type="text" placeholder="添加附件"></view>
|
||||||
|
</view>
|
||||||
|
<view v-for="(item, index) in files">
|
||||||
|
<view class="on-input">
|
||||||
|
<view class="s-huix">名称:</view>
|
||||||
|
<view class=""><input v-model="item.name" type="text" placeholder="请输入附件名称"></view>
|
||||||
|
</view>
|
||||||
|
<u-upload v-if="!item.fileUrl"
|
||||||
|
@afterRead="uploadFilePromise($event, index)"
|
||||||
|
name="6"
|
||||||
|
multiple
|
||||||
|
:maxCount="1"
|
||||||
|
width="100%"
|
||||||
|
height="140px"
|
||||||
|
>
|
||||||
|
</u-upload>
|
||||||
|
<view v-else class="image-container">
|
||||||
|
<image :src="item.fileUrl" style="width: 100%;height: 140px;"></image>
|
||||||
|
<view @click="deletedUrl(index)" class="close-button">
|
||||||
|
<text>x</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<view class="">
|
<view class="">
|
||||||
<view class="s-huix">岗位:</view>
|
<view class="s-huix" style="text-align: left">岗位:</view>
|
||||||
<view class="warp-flax">
|
<view class="warp-flax">
|
||||||
<view class="flasxbox" :class="{ 'gwcss' : gwindex == index }" v-for="(item,index) in renList"
|
<view class="flasxbox" :class="{ 'gwcss' : gwindex == index }" v-for="(item,index) in renList"
|
||||||
:key="index" @click="xgang(index,item.id)">
|
:key="index" @click="xgang(index,item.id)">
|
||||||
@ -102,12 +151,43 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
|
|
||||||
|
<u-picker :show="showEducation" ref="uPicker" :columns="educations"
|
||||||
|
@confirm="chooseEducation" @cancel="showEducation = false"
|
||||||
|
keyName="label"></u-picker>
|
||||||
|
|
||||||
|
<u-datetime-picker
|
||||||
|
:show="showJoinedDate"
|
||||||
|
v-model="joinedDate"
|
||||||
|
@cancel="showJoinedDate = false"
|
||||||
|
@confirm="chooseJoinDate"
|
||||||
|
mode="date"
|
||||||
|
return-type='string'
|
||||||
|
></u-datetime-picker>
|
||||||
|
<u-datetime-picker
|
||||||
|
:show="showFormalDate"
|
||||||
|
v-model="formalDate"
|
||||||
|
@cancel="showFormalDate = false"
|
||||||
|
@confirm="chooseFormalDate"
|
||||||
|
mode="date"
|
||||||
|
return-type='string'
|
||||||
|
></u-datetime-picker>
|
||||||
|
<u-datetime-picker
|
||||||
|
:show="showSafeDate"
|
||||||
|
v-model="safeDate"
|
||||||
|
@cancel="showSafeDate = false"
|
||||||
|
@confirm="chooseSafeDate"
|
||||||
|
mode="date"
|
||||||
|
return-type='string'
|
||||||
|
></u-datetime-picker>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import config from '@/config'
|
import config from '@/config'
|
||||||
import request from '../../utils/request';
|
import request from '../../utils/request';
|
||||||
|
import {getDictDataByType, formatDate} from "../../utils/utils";
|
||||||
|
import upload from '@/utils/upload.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
@ -142,8 +222,20 @@ export default {
|
|||||||
postid: '',
|
postid: '',
|
||||||
gwindex: 0,
|
gwindex: 0,
|
||||||
gwid: 0,
|
gwid: 0,
|
||||||
roleId:undefined,
|
roleId: undefined,
|
||||||
addRoleId:undefined,
|
addRoleId: undefined,
|
||||||
|
education: null,
|
||||||
|
educationText: null,
|
||||||
|
idNumber: null,
|
||||||
|
joinedDate: null,
|
||||||
|
formalDate: null,
|
||||||
|
safeDate: null,
|
||||||
|
educations: [],
|
||||||
|
showEducation: false,
|
||||||
|
showJoinedDate: false,
|
||||||
|
showFormalDate: false,
|
||||||
|
showSafeDate: false,
|
||||||
|
files: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
@ -173,8 +265,59 @@ export default {
|
|||||||
this.partnerId = uni.getStorageSync('partnerId')
|
this.partnerId = uni.getStorageSync('partnerId')
|
||||||
// this.getindex()
|
// this.getindex()
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
formattedJoinedDate() {
|
||||||
|
if (!this.joinedDate) return '';
|
||||||
|
return formatDate(this.joinedDate); // 确保formatDate返回'yyyy-MM-dd'格式
|
||||||
|
},
|
||||||
|
formattedFormalDate() {
|
||||||
|
if (!this.formalDate) return '';
|
||||||
|
return formatDate(this.formalDate); // 确保formatDate返回'yyyy-MM-dd'格式
|
||||||
|
},
|
||||||
|
formattedSafeDate() {
|
||||||
|
if (!this.safeDate) return '';
|
||||||
|
return formatDate(this.safeDate); // 确保formatDate返回'yyyy-MM-dd'格式
|
||||||
|
},
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
toInfo(item){
|
uploadFilePromise(event, index) {
|
||||||
|
upload({
|
||||||
|
url: '/common/upload',
|
||||||
|
filePath: event.file[0].url,
|
||||||
|
}).then((res) => {
|
||||||
|
this.files[index].name = event.file[0].name
|
||||||
|
this.files[index].fileUrl = config.baseImageUrl + "/" + res.data.url
|
||||||
|
})
|
||||||
|
},
|
||||||
|
deletedUrl(index) {
|
||||||
|
this.files.splice(index, 1)
|
||||||
|
},
|
||||||
|
addFile() {
|
||||||
|
if (this.files.length === 0 || this.files[0].fileUrl !== null) {
|
||||||
|
this.files.unshift({
|
||||||
|
name: "未命名",
|
||||||
|
fileUrl: null
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
chooseJoinDate(e) {
|
||||||
|
this.joinedDate = formatDate(e.value)
|
||||||
|
this.showJoinedDate = false
|
||||||
|
},
|
||||||
|
chooseFormalDate(e) {
|
||||||
|
this.formalDate = formatDate(e.value)
|
||||||
|
this.showFormalDate = false
|
||||||
|
},
|
||||||
|
chooseSafeDate(e) {
|
||||||
|
this.safeDate = formatDate(e.value)
|
||||||
|
this.showSafeDate = false
|
||||||
|
},
|
||||||
|
chooseEducation(e) {
|
||||||
|
this.educationText = e.value[0].label
|
||||||
|
this.education = e.value[0].value
|
||||||
|
this.showEducation = false
|
||||||
|
},
|
||||||
|
toInfo(item) {
|
||||||
request({
|
request({
|
||||||
url: '/company/staff/getByUserId?id=' + item.id,
|
url: '/company/staff/getByUserId?id=' + item.id,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
@ -197,7 +340,7 @@ export default {
|
|||||||
url: '/system/role/pageByQuery',
|
url: '/system/role/pageByQuery',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: {
|
params: {
|
||||||
servicePackageId:'jiance'
|
servicePackageId: 'jiance'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.tabList = [{
|
this.tabList = [{
|
||||||
@ -224,9 +367,10 @@ export default {
|
|||||||
},
|
},
|
||||||
showpopup() {
|
showpopup() {
|
||||||
this.show = true
|
this.show = true
|
||||||
|
this.educations = [getDictDataByType("company_staff_edu")]
|
||||||
},
|
},
|
||||||
async getindex() {
|
async getindex() {
|
||||||
if(this.workName != ''){
|
if (this.workName != '') {
|
||||||
this.pageNum = 1
|
this.pageNum = 1
|
||||||
this.goodsList = []
|
this.goodsList = []
|
||||||
}
|
}
|
||||||
@ -254,7 +398,7 @@ export default {
|
|||||||
this.totalPages = Math.ceil(total / this.pageSize);
|
this.totalPages = Math.ceil(total / this.pageSize);
|
||||||
}
|
}
|
||||||
const newUsers = this.goodsList.filter(item => !item.roleName)
|
const newUsers = this.goodsList.filter(item => !item.roleName)
|
||||||
if (newUsers && newUsers.length > 0){
|
if (newUsers && newUsers.length > 0) {
|
||||||
const ids = newUsers.map(item => item.id)
|
const ids = newUsers.map(item => item.id)
|
||||||
request({
|
request({
|
||||||
url: '/inspection/util/getRoleNameByIds?ids=' + ids,
|
url: '/inspection/util/getRoleNameByIds?ids=' + ids,
|
||||||
@ -332,11 +476,10 @@ export default {
|
|||||||
nickname: this.realName,
|
nickname: this.realName,
|
||||||
mobile: this.phoneNum,
|
mobile: this.phoneNum,
|
||||||
username: this.phoneNum,
|
username: this.phoneNum,
|
||||||
status:0,
|
status: 0,
|
||||||
userType:'01',
|
userType: '01',
|
||||||
roleId:this.gwid,
|
roleId: this.gwid,
|
||||||
password:'123456'
|
password: '123456'
|
||||||
|
|
||||||
}
|
}
|
||||||
let res = await request({
|
let res = await request({
|
||||||
url: '/system/user/create',
|
url: '/system/user/create',
|
||||||
@ -355,6 +498,26 @@ export default {
|
|||||||
roleIds: roleIds
|
roleIds: roleIds
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const staffData = {
|
||||||
|
userId: res.data,
|
||||||
|
name: this.realName,
|
||||||
|
tel: this.phoneNum,
|
||||||
|
joinedDate: this.joinedDate,
|
||||||
|
idNumber: this.idNumber,
|
||||||
|
education: this.education,
|
||||||
|
formalDate: this.formalDate,
|
||||||
|
safeDate: this.safeDate,
|
||||||
|
fileNames: this.files.length > 0 ? this.files.map(item => item.name).join(",") : "",
|
||||||
|
fileUrls: this.files.length > 0 ? this.files.map(item => {
|
||||||
|
return item.fileUrl.replace(config.baseImageUrl + "/", "")
|
||||||
|
}).join(",") : ""
|
||||||
|
}
|
||||||
|
const staffRes = await request({
|
||||||
|
url: '/company/staff/createByExistUser',
|
||||||
|
method: 'post',
|
||||||
|
data: staffData
|
||||||
|
})
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: "添加成功"
|
title: "添加成功"
|
||||||
})
|
})
|
||||||
@ -512,7 +675,8 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.s-huix {
|
.s-huix {
|
||||||
width: 20%;
|
width: 30%;
|
||||||
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
.s-img {
|
.s-img {
|
||||||
@ -620,6 +784,7 @@ export default {
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding-bottom: 5px;
|
padding-bottom: 5px;
|
||||||
margin: 10px;
|
margin: 10px;
|
||||||
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tjiao {
|
.tjiao {
|
||||||
@ -669,4 +834,38 @@ export default {
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.on-input input {
|
||||||
|
text-align: right;
|
||||||
|
padding-right: 1rem
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 添加到你的样式文件中 */
|
||||||
|
.image-container {
|
||||||
|
position: relative; /* 使子元素可以相对于此容器进行绝对定位 */
|
||||||
|
width: 100%;
|
||||||
|
height: 140px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.close-button {
|
||||||
|
position: absolute;
|
||||||
|
top: 5px; /* 调整距离顶部的距离 */
|
||||||
|
right: 5px; /* 调整距离右侧的距离 */
|
||||||
|
width: 24px; /* 圆的直径 */
|
||||||
|
height: 24px;
|
||||||
|
background-color: #ff0000;
|
||||||
|
color: white;
|
||||||
|
border-radius: 50%; /* 使按钮呈现圆形 */
|
||||||
|
display: flex;
|
||||||
|
//align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
font-size: 16px; /* 调整“X”的字体大小 */
|
||||||
|
cursor: pointer; /* 鼠标悬停时显示为指针 */
|
||||||
|
}
|
||||||
|
|
||||||
|
.scrollable-content {
|
||||||
|
max-height: calc(80vh - 40px); /* 设置最大高度为视口高度的80%,减去弹出框的圆角和边距 */
|
||||||
|
overflow-y: auto; /* 启用垂直滚动 */
|
||||||
|
padding: 15px; /* 保持与现有padding一致 */
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -10,9 +10,8 @@
|
|||||||
<!-- html -->
|
<!-- html -->
|
||||||
<view class="c-content" v-if="flag">
|
<view class="c-content" v-if="flag">
|
||||||
<view class="cont-gongs">{{ obj.publishUnit }}</view>
|
<view class="cont-gongs">{{ obj.publishUnit }}</view>
|
||||||
|
|
||||||
<u-parse :content="obj.newsContent" :tagStyle="style"></u-parse>
|
<u-parse :content="obj.newsContent" :tagStyle="style"></u-parse>
|
||||||
<view class="videobox" v-if="videoList != null ">
|
<view class="videobox" v-if="videoList != null && videoList !== ''">
|
||||||
<video :src="baseUrl+ videoList" controls></video>
|
<video :src="baseUrl+ videoList" controls></video>
|
||||||
</view>
|
</view>
|
||||||
<view class="cont-time">{{ getDate(createTime) || new Date() }}</view>
|
<view class="cont-time">{{ getDate(createTime) || new Date() }}</view>
|
||||||
|
|||||||
@ -27,7 +27,7 @@
|
|||||||
<view v-if="tapindex === 0">
|
<view v-if="tapindex === 0">
|
||||||
<view class="c-b-top">
|
<view class="c-b-top">
|
||||||
<view class="t-left">
|
<view class="t-left">
|
||||||
<image :src="baseImageUrl+item.newsCover" mode="aspectFill"></image>
|
<image :src="baseImageUrl+getUrl(item.newsCover)" mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="t-right">
|
<view class="t-right">
|
||||||
<view class="t-tilte">{{ item.newsTitle }}</view>
|
<view class="t-tilte">{{ item.newsTitle }}</view>
|
||||||
@ -59,7 +59,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="circle-notification" v-if="ifSend">
|
<view class="circle-notification" v-if="ifSend" @click="toAdd">
|
||||||
+
|
+
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -154,6 +154,21 @@ export default {
|
|||||||
tabBar,
|
tabBar,
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getUrl(value){
|
||||||
|
if (!value){
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
if (value[0] === '/'){
|
||||||
|
return value
|
||||||
|
}else {
|
||||||
|
return "/" + value
|
||||||
|
}
|
||||||
|
},
|
||||||
|
toAdd(){
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/authority/newadd?type=' + null
|
||||||
|
})
|
||||||
|
},
|
||||||
getIfSend() {
|
getIfSend() {
|
||||||
request({
|
request({
|
||||||
url: '/system/inspectionNews/ifSend',
|
url: '/system/inspectionNews/ifSend',
|
||||||
@ -231,7 +246,6 @@ export default {
|
|||||||
}
|
}
|
||||||
let total = res.total
|
let total = res.total
|
||||||
this.totalPages = Math.ceil(total / this.pageSize);
|
this.totalPages = Math.ceil(total / this.pageSize);
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user