Merge branch 'hi-ucs-dev' of http://15.2.21.221:3000/wuhongjian/hi-ucs into hi-ucs-dev
This commit is contained in:
commit
e157811034
|
@ -0,0 +1,980 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-dialog
|
||||
:visible.sync="visible"
|
||||
:title="disabled ? '能力展示' : '挂接'"
|
||||
@close="guanbi"
|
||||
:close-on-click-modal="false"
|
||||
:close-on-press-escape="false"
|
||||
>
|
||||
<!-- 挂载和修改-->
|
||||
<div key="1" v-if="!disabled">
|
||||
<!-- 挂载-->
|
||||
<div style="text-align:center;font-weight: 600;font-size: 18px;margin-bottom: 10px;">填写字段</div>
|
||||
<el-checkbox-group v-model="checkList" @change="showListChagne" style="margin-bottom:20px;">
|
||||
<el-checkbox-button v-for="item in dataForm.showListAll" :label="item.name" :key="item.id">{{item.name}}</el-checkbox-button>
|
||||
</el-checkbox-group>
|
||||
<el-form
|
||||
v-if="!UpdateState"
|
||||
:model="dataForm"
|
||||
:rules="rules"
|
||||
ref="dataForm"
|
||||
@keyup.enter.native="dataFormSubmitHandle()"
|
||||
:label-width="$i18n.locale === 'en-US' ? '120px' : 'auto'"
|
||||
>
|
||||
<div v-show="checkList.indexOf('必填信息')>-1">
|
||||
<div style="text-align:center;font-weight: 600;font-size: 18px;margin-bottom: 10px;">必填信息</div>
|
||||
<el-form-item label="应用名称" prop="name">
|
||||
<el-input v-model="dataForm.name" placeholder="请输入组件名称" ></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="应用描述" prop="description">
|
||||
<el-input v-model="dataForm.description" placeholder="请输入组件描述" ></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="部门联系人" prop="deptContacts">
|
||||
<el-input v-model="dataForm.deptContacts" placeholder="请输入部门联系人" ></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="部门联系人电话" prop="deptPhone">
|
||||
<el-input v-model="dataForm.deptPhone" placeholder="请输入部门联系人电话" ></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="共享条件" prop="shareCondition">
|
||||
<el-select
|
||||
v-model="dataForm.shareCondition"
|
||||
placeholder="请选择共享条件"
|
||||
>
|
||||
<el-option
|
||||
v-for="val in typeOptions"
|
||||
:key="val.value"
|
||||
:label="val.label"
|
||||
:value="val.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="共享类型" prop="shareType"><el-select
|
||||
v-model="dataForm.shareType"
|
||||
placeholder="请选择共享类型"
|
||||
>
|
||||
<el-option
|
||||
v-for="val in conditionOptions"
|
||||
:key="val.value"
|
||||
:label="val.label"
|
||||
:value="val.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="共享方式" prop="shareMode">
|
||||
<el-input v-model="dataForm.shareMode" placeholder="请输入共享方式" ></el-input>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div v-for="item in dataForm.showList" :key="item.id" v-show="item.name !== '必填信息'">
|
||||
<div style="text-align:center;font-weight: 600;font-size: 18px;margin-bottom: 10px;">{{item.name}}</div>
|
||||
<el-form-item :label="child.name" v-for="child in item.children" :key="child.id" v-show="item.children">
|
||||
<el-input v-model="child.note1" :placeholder="'请输入'+child.name" v-if="child.type=='input'"></el-input>
|
||||
<el-input v-model="child.note1" :placeholder="'请输入'+child.name" type="textarea" :rows="2" v-if="child.type=='textArea'"></el-input>
|
||||
<el-select
|
||||
v-else-if="child.type=='select'"
|
||||
v-model="child.note1"
|
||||
:placeholder="'请选择' + child.name"
|
||||
>
|
||||
<el-option
|
||||
v-for="val in child.options"
|
||||
:key="val"
|
||||
:label="val"
|
||||
:value="val"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<upload v-else-if="child.type=='images'" :child='child' limit='5' accept='.jpg,.png'></upload>
|
||||
<upload v-else-if="child.type=='image'" :child='child' limit='1' accept='.jpg,.png'></upload>
|
||||
<upload v-else-if="child.type=='video'" :child='child' limit='1' accept='.mp4'></upload>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
<!-- 修改-->
|
||||
<el-form
|
||||
v-else
|
||||
:model="dataFormUpdate"
|
||||
ref="dataForm"
|
||||
@keyup.enter.native="dataFormSubmitHandle()"
|
||||
:label-width="$i18n.locale === 'en-US' ? '120px' : 'auto'"
|
||||
>
|
||||
<el-form-item label="应用名称">
|
||||
<el-input
|
||||
v-model="dataFormUpdate.name"
|
||||
placeholder="应用名称"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="应用描述">
|
||||
<el-input
|
||||
v-model="dataFormUpdate.description"
|
||||
placeholder="应用描述"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="访问地址">
|
||||
<el-input
|
||||
v-model="dataFormUpdate.link"
|
||||
placeholder="访问地址"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="部门联系人">
|
||||
<el-input
|
||||
v-model="dataFormUpdate.deptContacts"
|
||||
placeholder="部门联系人"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="部门联系人电话">
|
||||
<el-input
|
||||
v-model="dataFormUpdate.deptPhone"
|
||||
placeholder="部门联系人电话"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="共享类型">
|
||||
<el-select v-model="dataFormUpdate.shareType" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in typeOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<!-- <el-input v-model="dataFormUpdate.shareType" placeholder="共享类型"></el-input> -->
|
||||
</el-form-item>
|
||||
<el-form-item label="共享条件">
|
||||
<el-select
|
||||
v-model="dataFormUpdate.shareCondition"
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in conditionOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<!-- <el-input v-model="dataFormUpdate.shareCondition" placeholder="共享条件"></el-input> -->
|
||||
</el-form-item>
|
||||
<el-form-item label="共享方式">
|
||||
<el-input
|
||||
v-model="dataFormUpdate.shareMode"
|
||||
placeholder="共享方式"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="服务接口">
|
||||
<el-input
|
||||
v-model="dataFormUpdate.apiUrl"
|
||||
placeholder="服务接口"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="服务接口请求方式">
|
||||
<el-input
|
||||
v-model="dataFormUpdate.apiMethodType"
|
||||
placeholder="服务接口请求方式"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-for="item in dataFormUpdate.infoList"
|
||||
:key="item.index"
|
||||
:label="item.attrType"
|
||||
>
|
||||
<el-input
|
||||
v-model="item.attrValue"
|
||||
:placeholder="item.attrType"
|
||||
v-if="
|
||||
item.attrType != '应用领域' &&
|
||||
item.attrType != '应用类型' &&
|
||||
item.attrType != '发布端' &&
|
||||
item.attrType != '应用状态'
|
||||
"
|
||||
></el-input>
|
||||
<el-select
|
||||
v-else
|
||||
v-model="item.attrValue"
|
||||
:placeholder="item.attrType"
|
||||
>
|
||||
<el-option
|
||||
:value="item2.dictLabel"
|
||||
v-for="item2 in item.children"
|
||||
:key="item2.id"
|
||||
:label="item2.dictLabel"
|
||||
></el-option>
|
||||
</el-select>
|
||||
<!-- <el-upload
|
||||
v-if="item.attrType == '应用图片'"
|
||||
ref="addUpload"
|
||||
class="upload-demo"
|
||||
:action="fileUploadUrl"
|
||||
:on-success="handleAvatarSuccess"
|
||||
:before-upload="beforeAvatarUpload"
|
||||
:on-remove="addUploadRemoveFile"
|
||||
:on-preview="showView"
|
||||
list-type="picture"
|
||||
>
|
||||
<el-button size="small" type="primary">点击上传</el-button>
|
||||
<div slot="tip" class="el-upload__tip">
|
||||
只能上传jpg/png文件,且不超过200M
|
||||
</div>
|
||||
</el-upload> -->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<!-- 展示 -->
|
||||
<el-form
|
||||
key="2"
|
||||
class="detial-form"
|
||||
v-else
|
||||
:label-width="$i18n.locale === 'en-US' ? '120px' : 'auto'"
|
||||
>
|
||||
<el-form-item label="应用名称" prop="name">
|
||||
{{ dataFormShowDetails.name || "--" }}
|
||||
</el-form-item>
|
||||
<el-form-item label="应用描述">
|
||||
{{ dataFormShowDetails.description || "--" }}
|
||||
</el-form-item>
|
||||
<el-form-item label="访问地址">
|
||||
{{ dataFormShowDetails.link || "--" }}
|
||||
</el-form-item>
|
||||
<el-form-item label="部门联系人">
|
||||
{{ dataFormShowDetails.deptContacts || "--" }}
|
||||
</el-form-item>
|
||||
<el-form-item label="部门联系人电话">
|
||||
{{ dataFormShowDetails.deptPhone || "--" }}
|
||||
</el-form-item>
|
||||
<el-form-item label="共享类型">
|
||||
{{ dataFormShowDetails.shareType || "--" }}
|
||||
</el-form-item>
|
||||
<el-form-item label="共享条件">
|
||||
{{ dataFormShowDetails.shareCondition || "--" }}
|
||||
</el-form-item>
|
||||
<el-form-item label="共享方式">
|
||||
{{ dataFormShowDetails.shareMode || "--" }}
|
||||
</el-form-item>
|
||||
<el-form-item label="服务接口">
|
||||
{{ dataFormShowDetails.apiUrl || "--" }}
|
||||
</el-form-item>
|
||||
<el-form-item label="服务接口请求方式">
|
||||
{{ dataFormShowDetails.apiMethodType || "--" }}
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-for="item in dataFormShowDetails.infoList"
|
||||
:key="item.index"
|
||||
:label="item.attrType"
|
||||
:prop="item.attrValue"
|
||||
>
|
||||
{{ item.attrValue || "--" }}
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template slot="footer" v-if="!disabled">
|
||||
<el-button @click="visible = false">{{ $t("cancel") }}</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmitHandle()">{{
|
||||
$t("confirm")
|
||||
}}</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<div>
|
||||
<el-dialog :visible.sync="dialogVisibleImg">
|
||||
<img width="100%" :src="previewImg" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import debounce from 'lodash/debounce'
|
||||
import dictionaries from '@/utils/dictionaries'
|
||||
import { mapState } from 'vuex'
|
||||
import { getIconList } from '@/utils'
|
||||
import Cookies from 'js-cookie'
|
||||
import upload from './upload.vue'
|
||||
import bus from '@/views/bus.js'
|
||||
import qs from 'qs'
|
||||
import Vue from 'vue'
|
||||
export default {
|
||||
components: {
|
||||
upload
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
checkList: [],
|
||||
dialogVisibleImg: false,
|
||||
previewImg: '', // 预览图片
|
||||
dialogVisible: false,
|
||||
fileUploadUrl: window.SITE_CONFIG.apiURL + '/upload',
|
||||
uploadUrl:
|
||||
window.SITE_CONFIG.apiURL +
|
||||
'/sys/oss/upload?token=' +
|
||||
Cookies.get('ucsToken'),
|
||||
companyArr: dictionaries.companyArr,
|
||||
visible: false,
|
||||
sceneArr: dictionaries.sceneArr,
|
||||
fieldArr: dictionaries.fieldArr,
|
||||
shareFormArr: dictionaries.shareFormArr,
|
||||
shareTypeArr: dictionaries.shareTypeArr,
|
||||
iconList: [],
|
||||
iconListVisible: false,
|
||||
menuListVisible: false,
|
||||
UpdateState: false,
|
||||
dataForm: {
|
||||
id: '',
|
||||
deptId: '',
|
||||
deptContacts: '',
|
||||
deptPhone: '',
|
||||
dataVolume: '',
|
||||
shareCondition: '',
|
||||
shareType: '',
|
||||
shareMode: '',
|
||||
delFlag: 0,
|
||||
description: '',
|
||||
downloads: 0,
|
||||
image: '',
|
||||
showList: [],
|
||||
infoList: [],
|
||||
link: '',
|
||||
name: '',
|
||||
note1: '',
|
||||
note2: '',
|
||||
note3: '',
|
||||
note4: '',
|
||||
note5: '',
|
||||
score: '',
|
||||
type: '应用资源',
|
||||
apiMethodType: '',
|
||||
apiUrl: '',
|
||||
visits: 0
|
||||
},
|
||||
deptId: '',
|
||||
fangwendizhi: '',
|
||||
mingzi: '',
|
||||
dataFormUpdate: {},
|
||||
dataFormShowDetails: {},
|
||||
infoList2: [],
|
||||
infoList3: [],
|
||||
typeOptions: [
|
||||
{ value: '有条件共享', label: '有条件共享' },
|
||||
{ value: '无条件共享', label: '无条件共享' }
|
||||
],
|
||||
conditionOptions: [
|
||||
{ value: '申请', label: '申请' },
|
||||
{ value: '免批申请', label: '免批申请' }
|
||||
],
|
||||
|
||||
rules: {
|
||||
name: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入应用名称',
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
description: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入应用描述',
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
deptContacts: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入部门联系人',
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
deptPhone: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入部门联系人电话',
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
shareCondition: [
|
||||
{
|
||||
required: true,
|
||||
message: '请选择共享条件',
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
shareType: [
|
||||
{
|
||||
required: true,
|
||||
message: '请选择请输入共享类型',
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
shareMode: [
|
||||
{
|
||||
required: true,
|
||||
message: '请输入共享方式',
|
||||
trigger: 'change'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
props: {
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(['catalogueTree']),
|
||||
...mapState(['departmentSelects']),
|
||||
dataRule () {
|
||||
return {
|
||||
name: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('validate.required'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
version: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('validate.required'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
visitUrl: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('validate.required'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
type: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('validate.required'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
shareType: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('validate.required'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
shareForm: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('validate.required'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
field: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('validate.required'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
scene: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('validate.required'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
deptId: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('validate.required'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
content: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('validate.required'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
rank: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('validate.required'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
useInfo: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('validate.required'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
remarks: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('validate.required'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
isUp: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('validate.required'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 上传图片
|
||||
handleAvatarSuccess (res, file) {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error('上传图片失败')
|
||||
}
|
||||
debugger
|
||||
this.dataForm.infoList.map((item, index) => {
|
||||
if (item.attrType == '应用图片') {
|
||||
if (!this.dataForm.infoList[index].attrValue) {
|
||||
this.dataForm.infoList[index].attrValue = res.data
|
||||
} else {
|
||||
this.dataForm.infoList[index].attrValue += ';' + res.data
|
||||
}
|
||||
console.log('上传图片', this.dataForm.infoList[index])
|
||||
}
|
||||
})
|
||||
// this.imageUrl = URL.createObjectURL(file.raw);
|
||||
},
|
||||
handleAvatarSuccessone (res, file) {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error('上传图片失败')
|
||||
}
|
||||
debugger
|
||||
this.dataForm.infoList.map((item, index) => {
|
||||
if (item.attrType == '子系统一图片') {
|
||||
if (!this.dataForm.infoList[index].attrValue) {
|
||||
this.dataForm.infoList[index].attrValue = res.data
|
||||
} else {
|
||||
this.dataForm.infoList[index].attrValue = ''
|
||||
this.dataForm.infoList[index].attrValue = res.data
|
||||
}
|
||||
console.log('上传图片', this.dataForm.infoList[index])
|
||||
}
|
||||
})
|
||||
// this.imageUrl = URL.createObjectURL(file.raw);
|
||||
},
|
||||
handleAvatarSuccesstwo (res, file) {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error('上传图片失败')
|
||||
}
|
||||
debugger
|
||||
this.dataForm.infoList.map((item, index) => {
|
||||
if (item.attrType == '子系统二图片') {
|
||||
if (!this.dataForm.infoList[index].attrValue) {
|
||||
this.dataForm.infoList[index].attrValue = res.data
|
||||
} else {
|
||||
this.dataForm.infoList[index].attrValue = ''
|
||||
this.dataForm.infoList[index].attrValue = res.data
|
||||
}
|
||||
console.log('上传图片', this.dataForm.infoList[index])
|
||||
}
|
||||
})
|
||||
// this.imageUrl = URL.createObjectURL(file.raw);
|
||||
},
|
||||
handleAvatarSuccessthree (res, file) {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error('上传图片失败')
|
||||
}
|
||||
debugger
|
||||
this.dataForm.infoList.map((item, index) => {
|
||||
if (item.attrType == '子系统三图片') {
|
||||
if (!this.dataForm.infoList[index].attrValue) {
|
||||
this.dataForm.infoList[index].attrValue = res.data
|
||||
} else {
|
||||
this.dataForm.infoList[index].attrValue = ''
|
||||
this.dataForm.infoList[index].attrValue = res.data
|
||||
}
|
||||
console.log('上传图片', this.dataForm.infoList[index])
|
||||
}
|
||||
})
|
||||
// this.imageUrl = URL.createObjectURL(file.raw);
|
||||
},
|
||||
beforeAvatarUpload (file) {
|
||||
const isImage =
|
||||
file.type === 'image/jpeg' ||
|
||||
file.type === 'image/jpg' ||
|
||||
file.type === 'image/png'
|
||||
const isLt2M = file.size / 1024 / 1024 < 9999
|
||||
|
||||
if (!isImage) {
|
||||
this.$message.error('上传头像图片只能是 JPG 格式!')
|
||||
}
|
||||
if (!isLt2M) {
|
||||
this.$message.error('上传头像图片大小不能超过 2MB!')
|
||||
}
|
||||
return isImage && isLt2M
|
||||
},
|
||||
addUploadRemoveFile (file, fileList) {
|
||||
this.$refs.addUpload.clearFiles()
|
||||
this.addDataFrom.imageUrl = ''
|
||||
},
|
||||
showView (file) {
|
||||
this.previewImg = file.url
|
||||
this.dialogVisibleImg = true
|
||||
},
|
||||
// 获取当前管理员信息
|
||||
getUserInfo () {
|
||||
this.$http.get('/sys/user/info').then(({ data: res }) => {
|
||||
this.dataForm.deptId = res.data.deptId
|
||||
this.deptId = res.data.deptId
|
||||
console.log('depid', this.dataForm)
|
||||
})
|
||||
},
|
||||
guanbi () {
|
||||
this.dataForm = {
|
||||
id: '',
|
||||
deptId: '',
|
||||
deptContacts: '',
|
||||
deptPhone: '',
|
||||
dataVolume: '',
|
||||
shareCondition: '',
|
||||
shareType: '',
|
||||
shareMode: '',
|
||||
delFlag: 0,
|
||||
description: '',
|
||||
downloads: 0,
|
||||
image: '',
|
||||
showList: [],
|
||||
infoList: [],
|
||||
link: '',
|
||||
name: '',
|
||||
note1: '',
|
||||
note2: '',
|
||||
note3: '',
|
||||
note4: '',
|
||||
note5: '',
|
||||
score: '',
|
||||
type: '应用资源',
|
||||
apiMethodType: '',
|
||||
apiUrl: '',
|
||||
visits: 0
|
||||
}
|
||||
},
|
||||
handleRemove (file, fileList) {
|
||||
console.log(file, fileList)
|
||||
},
|
||||
handlePictureCardPreview (file) {
|
||||
this.dialogImageUrl = file.url
|
||||
this.dialogVisible = true
|
||||
},
|
||||
// 上传图片之前
|
||||
uploadBeforeUploadHandle (file) {
|
||||
if (
|
||||
file.type !== 'image/jpg' &&
|
||||
file.type !== 'image/jpeg' &&
|
||||
file.type !== 'image/png' &&
|
||||
file.type !== 'image/gif'
|
||||
) {
|
||||
this.$message.error('只支持jpg、png、gif格式的图片!')
|
||||
return false
|
||||
}
|
||||
},
|
||||
imgUploadSuccess (res, file, fileList) {
|
||||
console.log('zzzzzzz', res, file, fileList)
|
||||
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg)
|
||||
}
|
||||
},
|
||||
init () {
|
||||
this.getInfoList()
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.dataForm && this.$refs.dataForm.resetFields()
|
||||
this.iconList = getIconList()
|
||||
if (this.dataForm.id) {
|
||||
this.getInfo()
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取属性信息
|
||||
getInfoList () {
|
||||
const parms = {
|
||||
topCategoryName: '应用资源'
|
||||
}
|
||||
this.infoList2 = []
|
||||
this.$http
|
||||
.get('/category/getAllFiledByTopCategory' + '?' + qs.stringify(parms))
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg)
|
||||
}
|
||||
res.data.map((item, index) => {
|
||||
if (
|
||||
item.name.search('应用名称') == -1 &&
|
||||
item.name.search('地址') == -1 &&
|
||||
// item.name.search("描述") == -1 &&
|
||||
item.name !== '组件描述' &&
|
||||
item.name !== '组件名称' &&
|
||||
item.name !== '服务接口' &&
|
||||
item.name !== '共享类型' &&
|
||||
item.name !== '共享条件' &&
|
||||
item.name !== '共享方式' &&
|
||||
item.name !== '部门联系人电话' &&
|
||||
item.name !== '部门统一社会代码' &&
|
||||
item.name !== '部门联系人' &&
|
||||
item.name !== '服务商统一社会信用代码' &&
|
||||
item.name !== '服务接口请求方式' &&
|
||||
item.name !== '部门名称'
|
||||
) {
|
||||
const duixiang = {
|
||||
attrType: item.name,
|
||||
attrValue: '',
|
||||
delFlag: 0
|
||||
}
|
||||
this.infoList2.push(item)
|
||||
if (item.isLinkToDic != 'false') {
|
||||
const xinxi = {
|
||||
page: 1,
|
||||
limit: 99,
|
||||
dictTypeId: item.linkValue,
|
||||
dictLabel: '',
|
||||
dictValue: ''
|
||||
}
|
||||
this.$http
|
||||
.get('/sys/dict/data/page' + '?' + qs.stringify(xinxi))
|
||||
.then(({ data: res2 }) => {
|
||||
// this.infoList2[index - 1].children = res2.data.list
|
||||
this.infoList2.map((item3, index3) => {
|
||||
if (item3.name == item.name) {
|
||||
Vue.set(
|
||||
this.infoList2[index3],
|
||||
'children',
|
||||
res2.data.list
|
||||
)
|
||||
}
|
||||
})
|
||||
this.dataFormUpdate.infoList.map((item3, index3) => {
|
||||
if (item3.attrType == item.name) {
|
||||
Vue.set(
|
||||
this.dataFormUpdate.infoList[index3],
|
||||
'children',
|
||||
res2.data.list
|
||||
)
|
||||
}
|
||||
})
|
||||
console.log(
|
||||
'11111111111111111111111111110',
|
||||
this.dataFormUpdate
|
||||
)
|
||||
})
|
||||
}
|
||||
this.dataForm.infoList.push(duixiang)
|
||||
}
|
||||
})
|
||||
console.log('this.infoList', this.dataFormUpdate)
|
||||
})
|
||||
.catch(() => {})
|
||||
this.$http
|
||||
.get('/sys/dict/data/page' + '?' + qs.stringify(parms))
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg)
|
||||
}
|
||||
console.log('this.infoList', this.dataForm)
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
// 图标, 选中
|
||||
iconListCurrentChangeHandle (icon) {
|
||||
this.dataForm.imgurl = icon
|
||||
this.iconListVisible = false
|
||||
},
|
||||
// 上级菜单树, 选中
|
||||
menuListTreeCurrentChangeHandle (data) {
|
||||
this.dataForm.pid = data.id
|
||||
this.dataForm.type = data.name
|
||||
this.menuListVisible = false
|
||||
},
|
||||
// 上级菜单树, 设置默认值
|
||||
deptListTreeSetDefaultHandle () {
|
||||
this.dataForm.pid = '0'
|
||||
this.dataForm.type = '目录级别'
|
||||
},
|
||||
// 获取信息
|
||||
getInfo () {
|
||||
this.$http
|
||||
.get('/ability/bsabilityai/' + this.dataForm.id)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg)
|
||||
}
|
||||
this.dataForm = {
|
||||
...this.dataForm,
|
||||
...res.data
|
||||
}
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmitHandle: debounce(
|
||||
function () {
|
||||
this.$refs.dataForm.validate((valid) => {
|
||||
this.getUserInfo()
|
||||
this.dataForm.deptId = this.deptId
|
||||
if (!valid) {
|
||||
this.$message.error('请检查表单是否填写完整')
|
||||
return false
|
||||
}
|
||||
console.log('表单数据=======================》', this.dataForm)
|
||||
if (!this.UpdateState) {
|
||||
this.dataForm.infoList = []
|
||||
this.dataForm.showListAll.forEach(val => {
|
||||
if (val.name !== '必填信息') {
|
||||
if (val.name === '服务接口信息') {
|
||||
val.children.forEach(item => {
|
||||
if (item.name === '服务接口') {
|
||||
this.dataForm.apiUrl = item.note1
|
||||
}
|
||||
if (item.name === '接口请求方式') {
|
||||
this.dataForm.apiMethodType = item.note1
|
||||
}
|
||||
if (item.name === '访问地址') {
|
||||
this.dataForm.link = item.note1
|
||||
}
|
||||
})
|
||||
} else {
|
||||
val.children.forEach(item => {
|
||||
this.dataForm.infoList.push({
|
||||
attrType: item.name,
|
||||
attrValue: item.note1,
|
||||
delFlag: 0
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
this.$http
|
||||
.post('/resource/insert?source= b', this.dataForm)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg)
|
||||
}
|
||||
this.$message({
|
||||
message: this.$t('prompt.success'),
|
||||
type: 'success',
|
||||
duration: 500,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {})
|
||||
} else {
|
||||
this.$http
|
||||
.put('/resource/update', this.dataFormUpdate)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg)
|
||||
}
|
||||
this.$message({
|
||||
message: this.$t('prompt.success'),
|
||||
type: 'success',
|
||||
duration: 500,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {})
|
||||
}
|
||||
})
|
||||
},
|
||||
1000,
|
||||
{ leading: true, trailing: false }
|
||||
),
|
||||
showListChagne () {
|
||||
this.dataForm.showList = this.dataForm.showListAll.filter(item => this.checkList.indexOf(item.name) > -1)
|
||||
console.log('属性变更===================>', this.checkList, this.dataForm.showList, this.dataForm.showListAll)
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.getUserInfo()
|
||||
},
|
||||
beforeDestroy () {
|
||||
console.log('销毁~~~~~~~~~~~~~~~~~~~~')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .el-dialog__body {
|
||||
height: 580px;
|
||||
overflow: auto;
|
||||
}
|
||||
.icon-input ::v-deep .el-input__inner {
|
||||
cursor: pointer;
|
||||
}
|
||||
.detial-form ::v-deep {
|
||||
.el-form-item {
|
||||
margin-bottom: 0px;
|
||||
line-height: 32px;
|
||||
}
|
||||
.el-form-item__label {
|
||||
line-height: 32px;
|
||||
}
|
||||
.el-form-item__content {
|
||||
line-height: 32px;
|
||||
}
|
||||
}
|
||||
::v-deep .el-checkbox-button__inner {
|
||||
width: 130px;
|
||||
margin: 0 10px 5px;
|
||||
border-left: unset !important;
|
||||
border-radius: unset !important;
|
||||
border: 1px solid #dcdfe6 !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style lang="scss">
|
||||
.mod-sys__menu {
|
||||
.menu-list,
|
||||
.icon-list {
|
||||
.el-input__inner,
|
||||
.el-input__suffix {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
&-icon-popover {
|
||||
width: 458px;
|
||||
overflow: hidden;
|
||||
}
|
||||
&-icon-inner {
|
||||
width: 478px;
|
||||
max-height: 258px;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
&-icon-list {
|
||||
width: 458px;
|
||||
padding: 0;
|
||||
margin: -8px 0 0 -8px;
|
||||
> .el-button {
|
||||
padding: 8px;
|
||||
margin: 8px 0 0 8px;
|
||||
> span {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
font-size: 18px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.previewImg {
|
||||
position: fixed;
|
||||
z-index: 9999;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,322 @@
|
|||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-ability__bsabilityai">
|
||||
<el-form :inline="true" :model="dataForm">
|
||||
<el-form-item>
|
||||
<el-input
|
||||
v-model="dataForm.name"
|
||||
placeholder="名称"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList2(dataForm.name)">{{
|
||||
$t("query")
|
||||
}}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="info" @click="exportHandle()">{{
|
||||
$t("export")
|
||||
}}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button
|
||||
v-if="$hasPermission('ability:bsabilityai:save')"
|
||||
type="primary"
|
||||
@click="addOrUpdateHandleServe()"
|
||||
>挂接</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button
|
||||
v-if="$hasPermission('ability:bsabilityai:delete')"
|
||||
type="danger"
|
||||
@click="deleteHandle2()"
|
||||
>{{ $t("deleteBatch") }}</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="reset">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table
|
||||
v-loading="dataListLoading"
|
||||
:data="dataList"
|
||||
border
|
||||
@selection-change="dataListSelectionChangeHandle"
|
||||
style="width: 100%"
|
||||
:height="qp ? '810px' : '650px'"
|
||||
>
|
||||
<el-table-column
|
||||
type="selection"
|
||||
header-align="center"
|
||||
align="center"
|
||||
width="50"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
label="应用名称"
|
||||
header-align="center"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
|
||||
<el-table-column
|
||||
v-for="(item, index) in dataList[0].infoList"
|
||||
:key="index"
|
||||
:label="item.attrType"
|
||||
header-align="center"
|
||||
align="center"
|
||||
show-overflow-tooltip="true"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ findValue(scope.row.infoList, item.attrType) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
:label="$t('handle')"
|
||||
fixed="right"
|
||||
header-align="center"
|
||||
align="center"
|
||||
width="94"
|
||||
right="0"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
v-if="$hasPermission('ability:bsabilityai:update')"
|
||||
type="text"
|
||||
size="small"
|
||||
@click="UpdateHandle(scope.row)"
|
||||
>{{ $t("update") }}</el-button
|
||||
>
|
||||
<el-button
|
||||
v-if="$hasPermission('ability:bsabilityai:delete')"
|
||||
type="text"
|
||||
size="small"
|
||||
@click="deleteHandle2(scope.row.id)"
|
||||
>{{ $t("delete") }}</el-button
|
||||
>
|
||||
<el-button type="text" size="small" @click="showDetail(scope.row)"
|
||||
>展示</el-button
|
||||
>
|
||||
<el-button type="text" size="small" @click="showDocument(scope.row)"
|
||||
>开发文档</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination
|
||||
:current-page="page"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
:page-size="limit"
|
||||
:total="Number(total)"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="pageSizeChangeHandle"
|
||||
@current-change="pageCurrentChangeHandle"
|
||||
>
|
||||
</el-pagination>
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<add-or-update
|
||||
:disabled="disabled"
|
||||
v-if="addOrUpdateVisible"
|
||||
ref="addOrUpdate"
|
||||
@refreshDataList="getDataList"
|
||||
></add-or-update>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import mixinViewModule from "@/mixins/view-module";
|
||||
import AddOrUpdate from "./bsabilityservice-add-or-update";
|
||||
import dictionaries from "@/utils/dictionaries";
|
||||
import qs from "qs";
|
||||
import { type } from "os";
|
||||
export default {
|
||||
mixins: [mixinViewModule],
|
||||
data() {
|
||||
return {
|
||||
mixinViewModuleOptions: {
|
||||
getDataListURL: "/resource/page",
|
||||
getDataListIsPage: true,
|
||||
exportURL: "/ability/bsabilityai/export",
|
||||
deleteURL: "/resource/delete",
|
||||
deleteIsBatch: true,
|
||||
},
|
||||
disabled: false,
|
||||
sceneArr: dictionaries.sceneArr,
|
||||
fieldArr: dictionaries.fieldArr,
|
||||
shareFormArr: dictionaries.shareFormArr,
|
||||
dataForm: {
|
||||
name: "",
|
||||
creator: "",
|
||||
selectType: 0,
|
||||
delFlag: 0,
|
||||
type: "应用资源",
|
||||
},
|
||||
qp: false,
|
||||
};
|
||||
},
|
||||
watch: {},
|
||||
components: {
|
||||
AddOrUpdate,
|
||||
},
|
||||
created() {
|
||||
this.dataForm.name = "";
|
||||
this.dataForm.type = "应用资源";
|
||||
},
|
||||
mounted() {
|
||||
window.addEventListener("resize", this.a);
|
||||
this.fullScreen();
|
||||
},
|
||||
methods: {
|
||||
reset() {
|
||||
this.$http
|
||||
.get(
|
||||
this.mixinViewModuleOptions.getDataListURL +
|
||||
"?" +
|
||||
qs.stringify({
|
||||
// order: this.order,
|
||||
// orderField: this.orderField,
|
||||
// type: '组件服务',
|
||||
page: 1,
|
||||
selectType: 0,
|
||||
limit: 10,
|
||||
delFlag: 0,
|
||||
creator: "",
|
||||
type: "应用资源",
|
||||
name: "",
|
||||
})
|
||||
)
|
||||
.then(({ data: res }) => {
|
||||
this.dataForm.name = "";
|
||||
if (res.code !== 0) {
|
||||
this.dataList = [];
|
||||
this.total = 0;
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.dataList = this.mixinViewModuleOptions.getDataListIsPage
|
||||
? res.data.list
|
||||
: res.data;
|
||||
this.total = this.mixinViewModuleOptions.getDataListIsPage
|
||||
? res.data.total
|
||||
: 0;
|
||||
if (this.mixinViewModuleOptions.requestCallback) {
|
||||
this.mixinViewModuleOptions.requestCallback(res.data);
|
||||
}
|
||||
this.dataListLoading = false;
|
||||
})
|
||||
.catch(() => {
|
||||
this.dataListLoading = false;
|
||||
});
|
||||
},
|
||||
showDetail(val) {
|
||||
this.addOrUpdateVisible = true;
|
||||
this.disabled = false;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.UpdateState = false;
|
||||
this.$refs.addOrUpdate.dataFormShowDetails = val;
|
||||
this.$refs.addOrUpdate.init();
|
||||
});
|
||||
this.disabled = true;
|
||||
},
|
||||
showDocument(val) {
|
||||
console.log(val);
|
||||
window.open(
|
||||
window.SITE_CONFIG.frontUrl + "?id=" + val.id + "&&type=" + val.type,
|
||||
"_blank"
|
||||
);
|
||||
},
|
||||
findValue(list, type) {
|
||||
const found = list.find((item) => item.attrType === type);
|
||||
if (found) {
|
||||
return found.attrValue;
|
||||
} else {
|
||||
return "暂无数据";
|
||||
}
|
||||
},
|
||||
getDataList2(names) {
|
||||
if (names != null) {
|
||||
this.$http
|
||||
.get(
|
||||
this.mixinViewModuleOptions.getDataListURL +
|
||||
"?" +
|
||||
qs.stringify({
|
||||
// order: this.order,
|
||||
// orderField: this.orderField,
|
||||
// type: '组件服务',
|
||||
pageNum: 1,
|
||||
pageSize: this.limit,
|
||||
type: "应用资源",
|
||||
creator: "",
|
||||
selectType: 0,
|
||||
delFlag: 0,
|
||||
name: names,
|
||||
})
|
||||
)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
this.dataList = [];
|
||||
this.total = 0;
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
if (res.data.list.length !== 0) {
|
||||
this.dataList = res.data.list;
|
||||
this.total = this.mixinViewModuleOptions.getDataListIsPage
|
||||
? res.data.total
|
||||
: 0;
|
||||
if (this.mixinViewModuleOptions.requestCallback) {
|
||||
this.mixinViewModuleOptions.requestCallback(res.data);
|
||||
}
|
||||
this.dataListLoading = false;
|
||||
} else {
|
||||
this.$message.error("未查询到相关信息");
|
||||
this.reset();
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.dataListLoading = false;
|
||||
});
|
||||
} else {
|
||||
this.$message.error("查询不能输入为空");
|
||||
}
|
||||
},
|
||||
fullScreen() {
|
||||
if (window.outerHeight === screen.availHeight) {
|
||||
if (window.outerWidth === screen.availWidth) {
|
||||
console.log(
|
||||
"全屏1",
|
||||
window.outerHeight,
|
||||
screen.availHeight,
|
||||
window.outerWidth,
|
||||
screen.availWidth
|
||||
);
|
||||
this.qp = false;
|
||||
} else {
|
||||
console.log(
|
||||
"不是全屏2",
|
||||
window.outerHeight,
|
||||
screen.availHeight,
|
||||
window.outerWidth,
|
||||
screen.availWidth
|
||||
);
|
||||
this.qp = true;
|
||||
}
|
||||
} else {
|
||||
console.log(
|
||||
"不是全屏3",
|
||||
window.outerHeight,
|
||||
screen.availHeight,
|
||||
window.outerWidth,
|
||||
screen.availWidth
|
||||
);
|
||||
this.qp = true;
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.el-tooltip__popper {
|
||||
max-width: 50%;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,104 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-upload
|
||||
ref="addUpload"
|
||||
class="upload-demo"
|
||||
:accept='accept'
|
||||
:action="fileUploadUrl"
|
||||
:on-success="onSuccess"
|
||||
:on-remove="onRemove"
|
||||
:on-exceed='onExceed'
|
||||
:limit='limit'
|
||||
:on-preview="onPreview"
|
||||
list-type="text"
|
||||
>
|
||||
<el-button size="small" type="primary">点击上传</el-button>
|
||||
<div slot="tip" class="el-upload__tip">
|
||||
只能上传{{accept}}文件,最多上传{{limit}}个附件!
|
||||
</div>
|
||||
</el-upload>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: '',
|
||||
components: {
|
||||
|
||||
},
|
||||
props: {
|
||||
child: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
limit: {
|
||||
type: Number,
|
||||
default: 1
|
||||
},
|
||||
accept: {
|
||||
type: String,
|
||||
default: '.jpg,.png'
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
fileUploadUrl: window.SITE_CONFIG.apiURL + '/upload'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onSuccess (res, file) {
|
||||
console.log('limit', this.limit)
|
||||
console.log(res, file, this.child)
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error('上传图片失败')
|
||||
}
|
||||
if (this.child.note1 == '') {
|
||||
this.child.note1 = res.data
|
||||
} else {
|
||||
this.child.note1 += (';' + res.data)
|
||||
}
|
||||
// this.dataForm.infoList.map((item, index) => {
|
||||
// if (item.attrType == '组件图片') {
|
||||
// if (!this.dataForm.infoList[index].attrValue) {
|
||||
// this.dataForm.infoList[index].attrValue = res.data
|
||||
// } else {
|
||||
// this.dataForm.infoList[index].attrValue += ';' + res.data
|
||||
// }
|
||||
// console.log('上传图片', this.dataForm.infoList[index])
|
||||
// }
|
||||
// })
|
||||
},
|
||||
onRemove (file, fileList) {
|
||||
// this.$refs.addUpload.clearFiles()
|
||||
// 通过;分割字符串
|
||||
const arr = this.child.note1.split(';')
|
||||
fileList.forEach((item, index) => {
|
||||
if (item === file.response.data) {
|
||||
fileList.splice(index, 1)
|
||||
}
|
||||
})
|
||||
arr.forEach((item, index) => {
|
||||
if (item === file.response.data) {
|
||||
arr.splice(index, 1)
|
||||
}
|
||||
})
|
||||
if (arr.length == 0) {
|
||||
this.child.note1 = ''
|
||||
} else {
|
||||
this.child.note1 = arr.join(';')
|
||||
}
|
||||
console.log(this.child.note1)
|
||||
},
|
||||
onPreview (file) {
|
||||
console.log('点击预览===============>', file)
|
||||
window.open(file.response.data)
|
||||
},
|
||||
onExceed (files, fileList) {
|
||||
this.$message.warning('当前附件数量已达上限,请先删除部分附件!')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang='scss' scoped>
|
||||
</style>
|
|
@ -7,21 +7,20 @@
|
|||
-->
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico" />
|
||||
<title>
|
||||
<%= htmlWebpackPlugin.options.title %>
|
||||
</title>
|
||||
<title><%= htmlWebpackPlugin.options.title %></title>
|
||||
<meta
|
||||
content="vab,vab官网,后台管理框架,vue后台管理框架,vue-admin-beautiful,vue-admin-beautiful-pro,vue-admin-beautiful官网,vue-admin-beautiful文档,vue-element-admin,vue-element-admin官网,vue-element-admin文档,vue-admin,vue-admin官网,vue-admin文档"
|
||||
name="keywords" />
|
||||
name="keywords"
|
||||
/>
|
||||
<meta
|
||||
content="<%= VUE_APP_TITLE %>官网与文档基于vue-admin-beautiful-pro构建,简称vab(是一款超棒的vue+element中后台前端快速开发框架),QQ群972435319,作者:<%= VUE_APP_AUTHOR %>"
|
||||
name="description" />
|
||||
name="description"
|
||||
/>
|
||||
<meta content="<%= VUE_APP_AUTHOR %>" name="author" />
|
||||
<link href="<%= BASE_URL %>static/css/loading.css" rel="stylesheet" />
|
||||
<script>
|
||||
|
@ -66,8 +65,6 @@
|
|||
<script type="text/javascript" src="./static/config/basicConfig.js"></script>
|
||||
<script type="text/javascript" src="./static/config/mapConfig.js"></script>
|
||||
<script type="text/javascript" src="./static/config/footerData.js"></script>
|
||||
<!-- 数据资源参数引用 -->
|
||||
<script type="text/javascript" src="./static/config/location.js"></script>
|
||||
<!-- ==========地图相关配置========== -->
|
||||
<script type="text/javascript" src="./leaflet/libs/leaflet/1.3.1/leaflet.js"></script>
|
||||
<script type="text/javascript" src="./static/js/jquery-3.6.0.min.js"></script>
|
||||
|
@ -97,9 +94,8 @@
|
|||
<script type="text/javascript" src="./static/js/encrypt.js"></script>
|
||||
<script type="text/javascript" src="./static/js/DHWs.js"></script>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
<strong>
|
||||
We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work
|
||||
|
@ -116,12 +112,9 @@
|
|||
<i></i>
|
||||
</span>
|
||||
</div>
|
||||
<h1>
|
||||
<%= VUE_APP_TITLE %>
|
||||
</h1>
|
||||
<h1><%= VUE_APP_TITLE %></h1>
|
||||
</div>
|
||||
</div>
|
||||
<!-- built files will be auto injected -->
|
||||
</body>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,11 +1,50 @@
|
|||
/*
|
||||
* @Author: hisense.wuhongjian
|
||||
* @Date: 2020-07-07 16:03:23
|
||||
* @LastEditors: hisense.wuhongjian
|
||||
* @LastEditTime: 2022-04-01 10:51:45
|
||||
* @LastEditors: hisense.liangjunhua
|
||||
* @LastEditTime: 2022-06-21 16:58:56
|
||||
* @Description: 数据资源参数配置
|
||||
*/
|
||||
const launchedDataNum = [
|
||||
const newLocation = 'qingdao'
|
||||
// const newLocation = 'baotou'
|
||||
// const newLocation = 'xihaian'
|
||||
|
||||
// 数据资源数据
|
||||
const launchedDataNumObject = {}
|
||||
// 导航数据
|
||||
const navListManagement = {}
|
||||
// qingdao
|
||||
if (newLocation === 'qingdao') {
|
||||
// 数据资源数据
|
||||
launchedDataNumObject.launchedDataNum = [
|
||||
{
|
||||
num: 10374,
|
||||
},
|
||||
{
|
||||
num: 1080,
|
||||
},
|
||||
{
|
||||
num: 976,
|
||||
},
|
||||
]
|
||||
// 导航数据
|
||||
navListManagement.navList = [
|
||||
{ name: '共享门户', key: 'home' },
|
||||
{ name: '能力集市', key: 'DetailsPageconetent' },
|
||||
{ name: '能力云图', key: 'capabilityCloud' },
|
||||
{ name: '能力统计', key: 'abilityStatistics' },
|
||||
{ name: '开发指南', key: 'developmentGuide' },
|
||||
{ name: '需求中心', key: 'demandCenter' },
|
||||
// { name: '个人中心', key: 'personalCenter' },
|
||||
{ name: '区市站点', key: 'mapTest' },
|
||||
// { name: '后台管理', key: 'houtaiguanli' },
|
||||
{ name: '赋能案例', key: 'assignCase' },
|
||||
]
|
||||
}
|
||||
// baotou
|
||||
else if (newLocation === 'baotou') {
|
||||
// 数据资源数据
|
||||
launchedDataNumObject.launchedDataNum = [
|
||||
{
|
||||
num: 10373,
|
||||
},
|
||||
|
@ -15,4 +54,46 @@ const launchedDataNum = [
|
|||
{
|
||||
num: 976,
|
||||
},
|
||||
]
|
||||
]
|
||||
// 导航数据
|
||||
navListManagement.navList = [
|
||||
{ name: '共享门户', key: 'home' },
|
||||
{ name: '能力集市', key: 'DetailsPageconetent' },
|
||||
{ name: '能力云图', key: 'capabilityCloud' },
|
||||
{ name: '能力统计', key: 'abilityStatistics' },
|
||||
{ name: '开发指南', key: 'developmentGuide' },
|
||||
{ name: '需求中心', key: 'demandCenter' },
|
||||
// { name: '个人中心', key: 'personalCenter' },
|
||||
// { name: '区市站点', key: 'mapTest' },
|
||||
// { name: '后台管理', key: 'houtaiguanli' },
|
||||
{ name: '赋能案例', key: 'assignCase' },
|
||||
]
|
||||
}
|
||||
// xihaian
|
||||
else if (newLocation === 'xihaian') {
|
||||
// 数据资源数据
|
||||
launchedDataNumObject.launchedDataNum = [
|
||||
{
|
||||
num: 10372,
|
||||
},
|
||||
{
|
||||
num: 1080,
|
||||
},
|
||||
{
|
||||
num: 976,
|
||||
},
|
||||
]
|
||||
// 导航数据
|
||||
navListManagement.navList = [
|
||||
{ name: '共享门户', key: 'home' },
|
||||
{ name: '能力集市', key: 'DetailsPageconetent' },
|
||||
{ name: '能力云图', key: 'capabilityCloud' },
|
||||
{ name: '能力统计', key: 'abilityStatistics' },
|
||||
{ name: '开发指南', key: 'developmentGuide' },
|
||||
{ name: '需求中心', key: 'demandCenter' },
|
||||
// { name: '个人中心', key: 'personalCenter' },
|
||||
// { name: '区市站点', key: 'mapTest' },
|
||||
// { name: '后台管理', key: 'houtaiguanli' },
|
||||
{ name: '赋能案例', key: 'assignCase' },
|
||||
]
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<!--
|
||||
* @Author: hisense.wuhongjian
|
||||
* @Date: 2022-05-06 11:12:00
|
||||
* @LastEditors: hisense.liangjunhua
|
||||
* @LastEditTime: 2022-06-13 17:45:49
|
||||
* @LastEditors: hisense.wuhongjian
|
||||
* @LastEditTime: 2022-06-21 16:59:46
|
||||
* @Description: 告诉大家这是什么
|
||||
-->
|
||||
<template>
|
||||
|
@ -26,4 +26,11 @@
|
|||
</script>
|
||||
<style lang="less">
|
||||
@import '~@/vab/styles/vab.less';
|
||||
#vue-admin-beautiful{
|
||||
max-width: 1920px;
|
||||
max-height: 1080px;
|
||||
margin: auto;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -78,6 +78,14 @@ export function scInsert(data) {
|
|||
})
|
||||
}
|
||||
|
||||
// 查询浏览列表
|
||||
export function getBsList(params) {
|
||||
return request({
|
||||
url: '/resourceBrowse/page',
|
||||
method: 'get',
|
||||
params,
|
||||
})
|
||||
}
|
||||
// 查询收藏列表
|
||||
export function getScList(params) {
|
||||
return request({
|
||||
|
@ -86,7 +94,6 @@ export function getScList(params) {
|
|||
params,
|
||||
})
|
||||
}
|
||||
|
||||
// 批量取消收藏
|
||||
export function scDel(data) {
|
||||
return request({
|
||||
|
@ -95,6 +102,14 @@ export function scDel(data) {
|
|||
data,
|
||||
})
|
||||
}
|
||||
// 批量取消浏览
|
||||
export function BsDel(data) {
|
||||
return request({
|
||||
url: '/resourceBrowse/delete',
|
||||
method: 'delete',
|
||||
data,
|
||||
})
|
||||
}
|
||||
// 查询我的发布列表
|
||||
export function wodepage(params) {
|
||||
return request({
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
|
@ -138,6 +138,16 @@ export const constantRoutes = [
|
|||
icon: 'error-warning-line',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/mynoticeView',
|
||||
name: 'mynoticeView',
|
||||
hidden: true,
|
||||
component: () => import('@/views/mynoticeView'),
|
||||
meta: {
|
||||
title: '我的消息',
|
||||
icon: 'error-warning-line',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/WorkDynDetails',
|
||||
name: 'WorkDynDetails',
|
||||
|
|
|
@ -277,7 +277,6 @@
|
|||
let params = {
|
||||
type: name,
|
||||
}
|
||||
debugger
|
||||
componentServiceRank(params).then((res) => {
|
||||
dataList.value = res.data.data
|
||||
console.log('res', dataList.value)
|
||||
|
@ -530,12 +529,19 @@
|
|||
border: 0.01rem rgba(0, 108, 188, 0.7) solid;
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
& > div {
|
||||
height: 0.32rem;
|
||||
& > span {
|
||||
display: inline-block;
|
||||
height: 0.32rem;
|
||||
line-height: 0.32rem;
|
||||
border-right: 0.01rem rgba(0, 108, 188, 0.7) solid;
|
||||
border-bottom: 0.01rem rgba(0, 108, 188, 0.7) solid;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
-webkit-line-clamp: 1;
|
||||
-webkit-box-orient: vertical;
|
||||
word-break: break-all;
|
||||
}
|
||||
& > span:first-child {
|
||||
width: 0.47rem;
|
||||
|
|
|
@ -143,7 +143,7 @@
|
|||
//
|
||||
assignRankings.value[i - 1].name =
|
||||
contentData.value.resourceTop5[i - 1].service_name || ''
|
||||
assignRankings.value[i - 1].opacity =
|
||||
assignRankings.value[i - 1].operation =
|
||||
contentData.value.resourceTop5[i - 1].count || ' '
|
||||
}
|
||||
})
|
||||
|
|
|
@ -63,7 +63,6 @@
|
|||
})
|
||||
}
|
||||
}
|
||||
const onTrial = ref('http://localhost:8080/#/details?id=1522550194535735298')
|
||||
//复制方法
|
||||
const copyFunction = (data, name) => {
|
||||
let url = data
|
||||
|
|
|
@ -32,17 +32,17 @@
|
|||
const launchedData = ref([
|
||||
{
|
||||
title: '已上线目录',
|
||||
num: launchedDataNum[0].num,
|
||||
num: launchedDataNumObject.launchedDataNum[0].num,
|
||||
img: require('@/assets/home/pageResource/catalogue-icon.png'),
|
||||
},
|
||||
{
|
||||
title: '已发布服务',
|
||||
num: launchedDataNum[1].num,
|
||||
num: launchedDataNumObject.launchedDataNum[1].num,
|
||||
img: require('@/assets/home/pageResource/service-icon.png'),
|
||||
},
|
||||
{
|
||||
title: '已发布接口',
|
||||
num: launchedDataNum[2].num,
|
||||
num: launchedDataNumObject.launchedDataNum[2].num,
|
||||
img: require('@/assets/home/pageResource/port-icon.png'),
|
||||
},
|
||||
])
|
||||
|
|
|
@ -59,20 +59,15 @@
|
|||
<a-list item-layout="horizontal" :data-source="mynoticeData">
|
||||
<template #renderItem="{ item }">
|
||||
<a-list-item>
|
||||
<a-list-item-meta description="">
|
||||
<a-list-item-meta :description="item.senderDate">
|
||||
<template #title>
|
||||
<a-tooltip placement="left">
|
||||
<template #title>{{ item.content }}</template>
|
||||
<a>{{ item.title }}</a>
|
||||
</a-tooltip>
|
||||
<a-button type="primary" ghost @click="read(item)">
|
||||
设为已读
|
||||
</a-button>
|
||||
<a>{{ item.content }}</a>
|
||||
</template>
|
||||
</a-list-item-meta>
|
||||
</a-list-item>
|
||||
</template>
|
||||
</a-list>
|
||||
<div class="bottom" @click="goToView()">查看更多</div>
|
||||
</div>
|
||||
<div class="info">
|
||||
<i class="img"></i>
|
||||
|
@ -113,29 +108,31 @@
|
|||
import { ref, onMounted, onBeforeUnmount, defineProps } from 'vue'
|
||||
import { recordRoute } from '@/config'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { getUser, mynotice, mynoticeRead } from '@/api/home'
|
||||
import { getUser, mynotice } from '@/api/home'
|
||||
import { useStore } from 'vuex'
|
||||
import { getSgcTotal } from '@/api/home'
|
||||
import mybus from '@/myplugins/mybus'
|
||||
const store = useStore()
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
const navList = ref([
|
||||
{ name: '共享门户', key: 'home' },
|
||||
{ name: '能力集市', key: 'DetailsPageconetent' },
|
||||
{ name: '能力云图', key: 'capabilityCloud' },
|
||||
{ name: '能力统计', key: 'abilityStatistics' },
|
||||
{ name: '开发指南', key: 'developmentGuide' },
|
||||
{ name: '需求中心', key: 'demandCenter' },
|
||||
// { name: '个人中心', key: 'personalCenter' },
|
||||
{ name: '区市站点', key: 'mapTest' },
|
||||
// { name: '后台管理', key: 'houtaiguanli' },
|
||||
{ name: '赋能案例', key: 'assignCase' },
|
||||
])
|
||||
// const navListManagement = ref([
|
||||
// { name: '共享门户', key: 'home' },
|
||||
// { name: '能力集市', key: 'DetailsPageconetent' },
|
||||
// { name: '能力云图', key: 'capabilityCloud' },
|
||||
// { name: '能力统计', key: 'abilityStatistics' },
|
||||
// { name: '开发指南', key: 'developmentGuide' },
|
||||
// { name: '需求中心', key: 'demandCenter' },
|
||||
// // { name: '个人中心', key: 'personalCenter' },
|
||||
// { name: '区市站点', key: 'mapTest' },
|
||||
// // { name: '后台管理', key: 'houtaiguanli' },
|
||||
// { name: '赋能案例', key: 'assignCase' },
|
||||
// ])
|
||||
const user = ref({})
|
||||
const select = ref(router.currentRoute.value.name)
|
||||
const mynoticeFlag = ref(false)
|
||||
const mynoticeData = ref([])
|
||||
// eslint-disable-next-line no-undef
|
||||
const navList = ref(navListManagement.navList)
|
||||
const props = defineProps({
|
||||
showView: { type: String, default: '' },
|
||||
})
|
||||
|
@ -243,15 +240,20 @@
|
|||
mynotice({ page: 1, limit: 999, readStatus: 0 }).then((res) => {
|
||||
console.log('我的消息', res.data.data)
|
||||
mynoticeNum.value = res.data.data.total
|
||||
mynoticeData.value = res.data.data.list
|
||||
mynoticeData.value = res.data.data.list.splice(0, 3)
|
||||
})
|
||||
}
|
||||
const read = (item) => {
|
||||
mynoticeRead(item.id).then((res) => {
|
||||
console.log('已读', res)
|
||||
getMynotice()
|
||||
const goToView = () => {
|
||||
router.push({
|
||||
path: '/mynoticeView',
|
||||
})
|
||||
}
|
||||
// const read = (item) => {
|
||||
// mynoticeRead(item.id).then((res) => {
|
||||
// console.log('已读', res)
|
||||
// getMynotice()
|
||||
// })
|
||||
// }
|
||||
onMounted(() => {
|
||||
getSgcTotal().then((res) => {
|
||||
console.log('初始化========================>', res.data.data.count)
|
||||
|
@ -263,21 +265,21 @@
|
|||
if (mynoticeDom) {
|
||||
mynoticeDom.addEventListener('mouseover', () => {
|
||||
mynoticeFlag.value = true
|
||||
document.documentElement.style.overflow = 'hidden'
|
||||
document.documentElement.style.overflowY = 'hidden'
|
||||
})
|
||||
mynoticeDom.addEventListener('mouseout', () => {
|
||||
mynoticeFlag.value = false
|
||||
document.documentElement.style.overflow = 'scroll'
|
||||
document.documentElement.style.overflowY = 'scroll'
|
||||
})
|
||||
}
|
||||
if (mynotice) {
|
||||
mynotice.addEventListener('mouseover', () => {
|
||||
mynoticeFlag.value = true
|
||||
document.documentElement.style.overflow = 'hidden'
|
||||
document.documentElement.style.overflowY = 'hidden'
|
||||
})
|
||||
mynotice.addEventListener('mouseout', () => {
|
||||
mynoticeFlag.value = false
|
||||
document.documentElement.style.overflow = 'scroll'
|
||||
document.documentElement.style.overflowY = 'scroll'
|
||||
})
|
||||
}
|
||||
mybus.on('getSgcNum', () => {
|
||||
|
@ -295,7 +297,7 @@
|
|||
}
|
||||
.home-header {
|
||||
height: 0.64rem;
|
||||
width: 100%;
|
||||
// width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
@ -361,6 +363,7 @@
|
|||
}
|
||||
.white {
|
||||
background-color: #fff;
|
||||
box-shadow: 0 0.02rem 0.1rem rgba(0, 0, 0, 0.1);
|
||||
.name {
|
||||
color: #0058e1;
|
||||
}
|
||||
|
@ -397,7 +400,7 @@
|
|||
}
|
||||
}
|
||||
.mynotice {
|
||||
width: 2.5rem;
|
||||
width: 4rem;
|
||||
height: 3rem;
|
||||
background: #eee;
|
||||
border-radius: 0.05rem;
|
||||
|
@ -405,24 +408,33 @@
|
|||
top: 0.45rem;
|
||||
right: 3.1rem;
|
||||
overflow-y: scroll;
|
||||
.bottom {
|
||||
cursor: pointer;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
color: #000;
|
||||
font-size: 0.16rem;
|
||||
}
|
||||
}
|
||||
.mynotice::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
:deep(.ant-list-item) {
|
||||
border-bottom: 0.01rem solid #ccc;
|
||||
padding: 0.1rem;
|
||||
}
|
||||
:deep(.ant-list-item-meta-title) {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
padding: 0 0.05rem;
|
||||
// display: flex;
|
||||
// justify-content: space-around;
|
||||
// align-items: center;
|
||||
// padding: 0 0.05rem;
|
||||
a {
|
||||
width: 1.5rem;
|
||||
// 超出显示...
|
||||
width: 3.8rem;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
button {
|
||||
width: 0.7rem;
|
||||
|
|
|
@ -0,0 +1,260 @@
|
|||
<!--
|
||||
* @Author: hisense.liangjunhua
|
||||
* @Date: 2022-06-21 11:55:07
|
||||
* @LastEditors: hisense.liangjunhua
|
||||
* @LastEditTime: 2022-06-21 16:52:02
|
||||
* @Description: 告诉大家这是什么
|
||||
-->
|
||||
<template>
|
||||
<div class="notice-list">
|
||||
<div class="top">
|
||||
<div class="left">
|
||||
<div
|
||||
class="item"
|
||||
:class="{ select: selectNav == nav.key }"
|
||||
v-for="nav in navList"
|
||||
:key="nav.key"
|
||||
>
|
||||
<i :class="nav.key" @click="changeNav(nav)"></i>
|
||||
<div>{{ nav.title + '(' + nav.num + ')' }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right">
|
||||
<div style="margin-right: 0.1rem">搜索</div>
|
||||
<a-input
|
||||
v-model:value="userName"
|
||||
placeholder="请输入关键字"
|
||||
style="margin-right: 0.1rem"
|
||||
>
|
||||
<template #suffix>
|
||||
<search-outlined style="color: rgba(0, 0, 0, 0.45)" />
|
||||
</template>
|
||||
</a-input>
|
||||
<a-button type="primary" style="margin-right: 0.1rem">搜索</a-button>
|
||||
<div class="reset">重置</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn">
|
||||
<div class="left">
|
||||
<a-select
|
||||
ref="select"
|
||||
v-model:value="value1"
|
||||
style="width: 120px"
|
||||
@focus="focus"
|
||||
@change="handleChange"
|
||||
>
|
||||
<a-select-option value="全部消息">全部消息</a-select-option>
|
||||
<a-select-option value="已读消息">已读消息</a-select-option>
|
||||
<a-select-option value="未读消息">未读消息</a-select-option>
|
||||
</a-select>
|
||||
<div class="check">
|
||||
<a-checkbox
|
||||
v-model:checked="checked"
|
||||
stlye="margin-right:0.3rem;"
|
||||
></a-checkbox>
|
||||
<div>全选</div>
|
||||
<div>
|
||||
共
|
||||
<span>2</span>
|
||||
条消息
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right">标记为已读</div>
|
||||
</div>
|
||||
<div class="main">
|
||||
<a-list item-layout="horizontal" :data-source="data">
|
||||
<template #renderItem="{ item }">
|
||||
<a-list-item>
|
||||
<a-list-item-meta description="">
|
||||
<template #title>
|
||||
<div class="left">
|
||||
{{ item.title }}
|
||||
</div>
|
||||
<div class="right">{{ '发布时间:' + item.time }}</div>
|
||||
</template>
|
||||
<template #avatar>
|
||||
<a-checkbox v-model:checked="checked"></a-checkbox>
|
||||
<a-badge dot :offset="[-30, 5]">
|
||||
<a-avatar :src="item.src" />
|
||||
</a-badge>
|
||||
<!-- <a-avatar :src="item.src" /> -->
|
||||
</template>
|
||||
</a-list-item-meta>
|
||||
</a-list-item>
|
||||
</template>
|
||||
</a-list>
|
||||
</div>
|
||||
<a-pagination v-model:current="current" :total="50" show-less-items />
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { SearchOutlined } from '@ant-design/icons-vue'
|
||||
import { ref, reactive } from 'vue'
|
||||
const navList = reactive([
|
||||
{
|
||||
title: '全部',
|
||||
key: 'all',
|
||||
num: 0,
|
||||
},
|
||||
{
|
||||
title: '通知',
|
||||
key: 'notice',
|
||||
num: 0,
|
||||
},
|
||||
{
|
||||
title: '评论',
|
||||
key: 'comment',
|
||||
num: 0,
|
||||
},
|
||||
])
|
||||
const selectNav = ref('all')
|
||||
const data = ref([
|
||||
{
|
||||
title: 'Ant Design Title 1',
|
||||
src: require('@/assets/mynoticeView/notice.png'),
|
||||
time: '2020-06-21',
|
||||
},
|
||||
{
|
||||
title: 'Ant Design Title 2',
|
||||
src: require('@/assets/mynoticeView/notice.png'),
|
||||
time: '2020-06-21',
|
||||
},
|
||||
{
|
||||
title: 'Ant Design Title 3',
|
||||
src: require('@/assets/mynoticeView/notice.png'),
|
||||
time: '2020-06-21',
|
||||
},
|
||||
{
|
||||
title: 'Ant Design Title 4',
|
||||
src: require('@/assets/mynoticeView/notice.png'),
|
||||
time: '2020-06-21',
|
||||
},
|
||||
])
|
||||
const changeNav = (nav) => {
|
||||
selectNav.value = nav.key
|
||||
}
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.notice-list {
|
||||
padding: 0.64rem 3.1rem 0.2rem;
|
||||
.top {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.left {
|
||||
display: flex;
|
||||
.item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-left: 1.28rem;
|
||||
margin-bottom: 0.16rem;
|
||||
border-bottom: 3px solid #fff;
|
||||
i {
|
||||
display: inline-block;
|
||||
width: 0.48rem;
|
||||
height: 0.48rem;
|
||||
margin-bottom: 0.15rem;
|
||||
cursor: pointer;
|
||||
}
|
||||
.all {
|
||||
background: url('~@/assets/mynoticeView/all.png') no-repeat;
|
||||
background-size: 100%;
|
||||
}
|
||||
.notice {
|
||||
background: url('~@/assets/mynoticeView/notice.png') no-repeat;
|
||||
background-size: 100%;
|
||||
}
|
||||
.comment {
|
||||
background: url('~@/assets/mynoticeView/comment.png') no-repeat;
|
||||
background-size: 100%;
|
||||
}
|
||||
}
|
||||
.item:nth-of-type(1) {
|
||||
margin-left: 0;
|
||||
}
|
||||
.select {
|
||||
border-bottom: 3px solid #0058e1;
|
||||
color: #0058e1;
|
||||
}
|
||||
}
|
||||
.right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 0.32rem;
|
||||
div {
|
||||
width: 0.5rem;
|
||||
}
|
||||
.reset {
|
||||
color: #0058e1;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
.btn {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.ant-select {
|
||||
margin-right: 0.24rem;
|
||||
}
|
||||
.check {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
div {
|
||||
margin-left: 0.24rem;
|
||||
span {
|
||||
font-size: 18px;
|
||||
color: #0058e1;
|
||||
}
|
||||
}
|
||||
div:nth-of-type(1) {
|
||||
margin-left: 0.12rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
.right {
|
||||
cursor: pointer;
|
||||
color: #0058e1;
|
||||
text-align: center;
|
||||
align-self: center;
|
||||
padding: 0.05rem 0.1rem;
|
||||
}
|
||||
.right:hover {
|
||||
background: rgba(0, 88, 225, 0.1);
|
||||
}
|
||||
}
|
||||
.main {
|
||||
height: 5.67rem;
|
||||
:deep(.ant-list-item-meta) {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.ant-checkbox-wrapper {
|
||||
margin-right: 0.3rem;
|
||||
}
|
||||
.ant-list-item-meta-title {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.left {
|
||||
cursor: pointer;
|
||||
width: 9.2rem;
|
||||
max-height: 0.43rem;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
.left:hover {
|
||||
color: #0058e1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,18 @@
|
|||
<!--
|
||||
* @Author: hisense.liangjunhua
|
||||
* @Date: 2022-06-21 11:50:28
|
||||
* @LastEditors: hisense.liangjunhua
|
||||
* @LastEditTime: 2022-06-21 11:56:37
|
||||
* @Description: 告诉大家这是什么
|
||||
-->
|
||||
<template>
|
||||
<new-home-header></new-home-header>
|
||||
<notice-list></notice-list>
|
||||
<home-footer></home-footer>
|
||||
</template>
|
||||
<script setup>
|
||||
import NewHomeHeader from '@/views/home/components/header'
|
||||
import NoticeList from '@/views/mynoticeView/components/NoticeList'
|
||||
import HomeFooter from '@/views/newHome/components/Footer'
|
||||
</script>
|
||||
<style lang="less" scoped></style>
|
|
@ -372,6 +372,13 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
:deep(.ant-list-item-meta-title) {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
span {
|
||||
margin-right: 0.3rem;
|
||||
}
|
||||
}
|
||||
.ant-list::-webkit-scrollbar {
|
||||
width: 0 !important;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,447 @@
|
|||
<template>
|
||||
<div class="title">我的浏览</div>
|
||||
<div class="sousuokuang">
|
||||
<a-input-search
|
||||
v-model:value="name"
|
||||
placeholder="请输入关键词"
|
||||
enter-button="搜索"
|
||||
size="large"
|
||||
@change="onSearch"
|
||||
@search="getList"
|
||||
/>
|
||||
<a-button
|
||||
type="primary"
|
||||
style="width: 80px; height: 36px; margin-left: 10px"
|
||||
@click="clean"
|
||||
>
|
||||
重置
|
||||
</a-button>
|
||||
</div>
|
||||
<div class="tab">
|
||||
<span>筛选</span>
|
||||
<div
|
||||
:class="tabIndex == index ? 'tabclass' : ' '"
|
||||
@click="changeTab(index)"
|
||||
v-for="(item, index) in tabList"
|
||||
:key="index"
|
||||
>
|
||||
{{ item }}
|
||||
</div>
|
||||
</div>
|
||||
<a-list
|
||||
class="demo-loadmore-list"
|
||||
:loading="initLoading"
|
||||
item-layout="horizontal"
|
||||
:data-source="list"
|
||||
:key="showKey"
|
||||
>
|
||||
<template #renderItem="{ item }">
|
||||
<a-list-item>
|
||||
<a-skeleton avatar :title="false" :loading="!!item.loading" active>
|
||||
<a-list-item-meta
|
||||
:description="item.description || '--'"
|
||||
style="position: relative"
|
||||
>
|
||||
<template #title>
|
||||
<span
|
||||
@click="showItem(item.resourceId, item.type, item.delFlag)"
|
||||
style="cursor: pointer"
|
||||
class="name"
|
||||
>
|
||||
{{ item.name }}
|
||||
</span>
|
||||
<span class="time">浏览时间:{{ item.createDate }}</span>
|
||||
<svg
|
||||
t="1652233950228"
|
||||
class="icon"
|
||||
viewBox="0 0 1024 1024"
|
||||
version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
p-id="5970"
|
||||
data-spm-anchor-id="a313x.7781069.0.i8"
|
||||
width="50"
|
||||
height="50"
|
||||
v-if="item.delFlag == 4 || item.delFlag == 5"
|
||||
style="position: absolute; top: 0; left: 100px"
|
||||
>
|
||||
<path
|
||||
d="M955.22053 256C813.82053 11.2 500.72053-72.6 255.92053 68.8S-72.67947 523.2 68.72053 768 523.22053 1096.6 768.02053 955.2c244.7-141.2 328.6-454.1 187.4-698.8 0-0.1-0.1-0.3-0.2-0.4zM762.02053 944.7c-239 138.1-544.8 56.2-682.9-182.8S22.92053 217.1 261.92053 79.1s544.8-56.2 682.9 182.8c137.9 239 56.1 544.6-182.8 682.8z"
|
||||
fill="#515151"
|
||||
opacity=".5"
|
||||
p-id="5971"
|
||||
></path>
|
||||
<path
|
||||
d="M898.12053 289.2C775.02053 76 502.42053 2.9 289.22053 126 76.02053 249.1 3.02053 521.6 126.02053 734.8 249.12053 948 521.62053 1021.1 734.82053 898 947.92053 774.9 1021.02053 502.4 898.12053 289.2zM731.62053 892.8C521.32053 1014.3 252.42053 942.2 131.02053 731.9 9.52053 521.6 81.62053 252.7 291.92053 131.3 502.12053 9.9 771.02053 81.8 892.42053 292c121.5 210.3 49.5 479.3-160.8 600.8z"
|
||||
fill="#515151"
|
||||
opacity=".5"
|
||||
p-id="5972"
|
||||
></path>
|
||||
<path
|
||||
d="M323.62053 176.8c3.6-2 6 0.8 8.8 2.8 6 4.4 12.4 8.8 18.8 12.8 7.2-2.4 14.4-5.1 21.6-7.7 3.6-1.2 6-2.8 8.8 0.4 2.4 2.8 0.4 6.4-0.4 8.8-2 6.8-3.6 13.6-5.6 20.8 4.8 6 10 11.6 15.2 17.6 2.4 2.8 4.4 5.6 2.8 8.4-1.2 2.8-5.6 2.4-7.7 2.4l-22.4 0.8c-4.4 6.8-8.4 13.6-12.8 20-1.6 2.4-4 5.1-7.2 4-2.4-1.9-3.9-4.7-4.4-7.7l-7.2-20.5-25.2-6.4c-2.3-1.2-3.6-3.8-3.2-6.4 1.3-1.8 2.9-3.3 4.8-4.4 4-3.2 7.7-6.8 11.6-10 1.9-1.3 3.6-2.7 5.1-4.4-0.4-6.8-1.2-13.6-1.6-20.5-0.7-2.9-0.9-5.9-0.4-8.8-0.7-0.8-0.3-1.6 0.6-2zM200.72053 289.2c3.6-2 6 0.8 8.8 2.8 6.4 4.4 12.4 8.4 18.8 12.8 7.2-2.4 14.4-5.1 21.6-7.7 3.6-1.2 6-2.8 8.8 0.4 2.4 2.8 0.4 6.4-0.4 8.8-2 6.8-3.6 13.6-5.6 20.8 4.8 6 10 11.6 14.8 17.6 2.4 2.8 4.4 5.6 2.8 8.4-1.2 2.4-5.6 2.4-7.7 2.4l-22.4 0.8c-4.4 6.8-8.8 13.6-12.8 20-1.6 2.4-4 5.1-7.2 4-2.2-2-3.8-4.7-4.4-7.7l-7.2-20.5c-8.4-2-16.8-4.4-25.2-6.4-2.3-1.2-3.6-3.8-3.2-6.4 1.3-1.8 2.9-3.3 4.8-4.4 3.6-3.2 7.7-6.8 11.6-10 1.9-1.3 3.6-2.7 5.1-4.4-0.4-6.8-1.2-13.6-1.6-20.5-0.7-2.9-0.9-5.9-0.4-8.8-0.4-1.2 0-1.6 0.8-2.4l0.2 0.4z m276.6-159.6c3.6-2 6 0.8 8.8 2.8 6.4 4.4 12.4 8.4 18.8 12.8 7.2-2.4 14.4-5.1 21.6-7.7 3.6-1.2 6-2.8 8.8 0.4 2.4 2.8 0.4 6.4-0.4 8.8-2 6.8-3.6 14-5.6 20.8 4.8 6 10 12 15.2 17.6 2.4 2.8 4.4 5.6 2.8 8.4-1.2 2.8-5.6 2.4-7.7 2.4l-22.4 0.8c-4.4 6.8-8.8 13.6-12.8 20-1.6 2.4-4 5.1-7.2 4-2.2-2-3.8-4.7-4.4-7.7l-7.2-20.5-25.2-6.4c-2.3-1.2-3.6-3.8-3.2-6.4 1.3-1.8 2.9-3.3 4.8-4.4 4-3.2 7.7-6.8 11.6-10 1.9-1.3 3.6-2.7 5.1-4.4-0.4-6.8-1.2-13.6-1.6-20.5-0.7-2.9-0.9-5.9-0.4-8.8-0.8-1.2-0.4-1.6 0.4-2.4l0.2 0.4z m141.9 29.6c3.6-2 6 0.8 8.8 2.8l18.8 12.8c7.2-2.4 14.4-5.1 21.6-7.7 3.6-1.2 6-2.8 8.8 0.4 2.4 2.8 0.4 6.4-0.4 8.8-2 6.8-3.6 14-5.6 20.8 4.8 6 10 12 15.2 17.6 2.4 2.8 4.4 5.6 2.8 8.4-1.2 2.8-5.6 2.4-7.7 2.4-7.7 0.4-15.2 0.8-22.4 0.8-4.4 6.8-8.4 13.2-12.8 20-1.6 2.4-4 5.1-7.2 4-2.4-1.9-3.9-4.7-4.4-7.7l-7.2-20.5c-8.4-2-16.8-4.4-25.2-6.4-2.3-1.2-3.6-3.8-3.2-6.4 1.3-1.8 2.9-3.3 4.8-4.4 4-3.2 7.7-6.8 11.6-10 1.9-1.3 3.6-2.7 5.1-4.4-0.4-6.8-1.2-13.6-1.6-20.5-0.7-2.9-0.9-5.9-0.4-8.8-0.5-1.2 0.2-1.6 0.6-2zM150.02053 430c3.6-2 6 0.8 8.8 2.8 6.4 4.4 12.4 8.4 18.8 12.8 7.2-2.4 14.4-5.1 21.6-7.7 3.6-1.2 6-2.8 8.8 0.4 2.4 2.8 0.4 6.4-0.4 8.8-2 6.8-4 14-5.6 20.8 4.8 6 10 11.6 15.2 17.6 2.4 2.8 4.4 5.6 2.8 8.4-1.2 2.8-5.6 2.4-7.7 2.4l-22.4 0.8c-4.4 6.8-8.8 13.6-12.8 20-1.6 2.4-4 5.1-7.2 4-2.2-2-3.8-4.7-4.4-7.7l-7.2-20.5-25.2-6.4c-2.3-1.2-3.6-3.8-3.2-6.4 1.3-1.8 2.9-3.3 4.8-4.4 3.6-3.2 7.7-6.8 11.6-10 1.9-1.3 3.6-2.7 5.1-4.4-0.4-6.8-1.2-13.6-1.6-20.5-0.7-2.9-0.9-5.9-0.4-8.8-0.7-0.8-0.3-1.5 0.6-2z m558.9 414.4c3.6-2.4 2.4-5.6 2-8.8l-1.6-22.4 17.2-14.8c2.8-2.4 5.1-4 4-7.7-1.2-3.2-5.6-3.6-7.7-4-6.8-2-14-3.6-20.8-5.6-2.8-7.2-5.1-14.4-7.7-21.6-1.2-3.6-2.8-6.4-5.6-6.8-2.8-0.4-4.8 3.6-5.6 5.1l-12 19.2-24 1.2c-2.8 0-6.8 0.8-6.8 4.4 0.5 3 2 5.7 4.4 7.7 4.8 5.6 9.2 11.2 14 16.4l-7.2 25.2c-0.3 2.7 1.4 5.2 4 6 2.2-0.1 4.4-0.7 6.4-1.6l14.4-4.8c2.1-0.8 4.2-1.5 6.4-2 5.6 4 11.2 7.7 16.8 11.6 2.2 2.1 4.8 3.6 7.7 4.4 0.5-1.1 0.8-1.1 1.6-1.1h0.1z m-158.8 50c3.6-2.4 2.4-5.6 2-8.8l-1.6-22.4 17.2-14.8c2.8-2.4 5.1-4 4-7.7-1.1-3.7-5.6-3.6-7.7-4-6.8-1.6-14-3.6-20.8-5.6l-7.7-22c-1.2-3.6-2.8-6.4-5.6-6.8-2.8-0.4-4.8 3.6-5.6 5.1l-12 19.2-24 1.2c-2.8 0-6.8 0.8-6.8 4.4 0.5 3 2 5.7 4.4 7.7 4.8 5.6 9.2 11.2 14 16.4l-7.2 25.2c-0.3 2.7 1.4 5.2 4 6 2.2-0.3 4.3-0.9 6.4-1.6l14.4-4.8c2-1 4.2-1.7 6.4-2 5.6 4 11.2 7.7 16.8 11.6 2.2 2.1 4.8 3.6 7.7 4.4 0.4-0.8 0.8-0.8 1.7-0.7z m276.5-159.6c3.6-2.4 2.4-5.6 2-8.8l-1.6-22.4 17.2-14.8c2.8-2.4 5.1-4 4-7.7-1.2-3.2-5.6-3.6-7.7-4-6.8-2-14-3.6-20.8-5.6-2.8-7.2-5.1-14.4-7.7-21.6-1.2-3.6-2.8-6.4-5.6-6.8s-4.8 3.6-5.6 5.1l-12 19.2-24 1.2c-2.8 0-6.8 0.8-6.8 4.4 0.5 3 2 5.7 4.4 7.7 4.8 5.6 9.2 11.2 14 16.4l-7.2 25.2c-0.3 2.7 1.4 5.2 4 6 2.2-0.2 4.4-0.7 6.4-1.6l14.4-4.8c2.1-0.8 4.2-1.5 6.4-2 5.6 4 11.2 7.7 16.8 11.6 2.2 2.1 4.8 3.6 7.7 4.4 0-0.8 0.8-1.2 1.6-1.2l0.1 0.1z m45.6-137.6c3.6-2.4 2.4-5.6 2-8.8l-1.6-22.4 17.2-14.8c2.8-2.4 5.1-4 4-7.7-1.2-3.2-5.6-3.6-7.7-4-6.8-1.6-14-3.6-20.8-5.6l-7.7-22c-1.2-3.6-2.8-6.4-5.6-6.8-2.8-0.4-4.8 3.6-5.6 5.1l-12 19.2-24 1.2c-2.8 0-6.8 0.8-6.8 4.4 0.5 3 2 5.7 4.4 7.7 4.8 5.6 9.2 11.2 14 16.4l-7.2 25.2c-0.3 2.7 1.4 5.2 4 6 2.2-0.3 4.3-0.9 6.4-1.6l14.4-4.8c2.1-0.8 4.2-1.5 6.4-2 5.6 4 11.2 7.7 16.8 11.6 2.2 2.1 4.8 3.6 7.7 4.4 0.2-0.7 0.6-0.7 1.4-0.7h0.3zM402.72053 868c3.6-2.4 2.4-5.6 2-8.8l-1.6-22.4 17.2-14.8c2.8-2.4 5.1-4 4-7.7-1.2-3.2-5.6-3.6-7.7-4-6.8-2-14-3.6-20.8-5.6-2.8-7.2-5.1-14.4-7.7-21.6-1.2-3.6-2.8-6.4-5.6-6.8-2.8-0.4-4.8 3.6-5.6 5.1l-12 19.2-24 1.2c-2.8 0-6.8 0.8-6.8 4.4 0.5 3 2 5.7 4.4 7.7 4.8 5.6 9.2 11.2 14 16.4l-7.2 25.2c-0.3 2.7 1.4 5.2 4 6 2.2-0.3 4.3-0.9 6.4-1.6l14.4-4.8c2.1-0.8 4.2-1.5 6.4-2 5.6 4 11.2 7.7 16.8 11.6 2.2 2.1 4.8 3.6 7.7 4.4 0.5-0.8 1-1.1 1.7-1.1z"
|
||||
fill="#515151"
|
||||
opacity=".5"
|
||||
p-id="5973"
|
||||
></path>
|
||||
<path
|
||||
d="M386.42053 590.4l-43.8-75.9L207.02053 592.7l10.2 17.7L334.02053 543l23.4 40.4-90.5 52.2-13.5-23.4-18.7 10.8 53.1 92c9.1 15.8 21.2 19.5 36.4 10.7l98.8-57c6.2-3.6 11-9.3 13.4-16.1-1.4-15.9-6.2-31.2-14.2-45l-21.4 4.8c6.7 10.3 11 21.9 12.8 34-1 3.3-3.2 6-6.1 7.8l-88.3 51c-6.2 3.6-11.1 2.1-14.8-4.3l-27.3-47.4 109.3-63.1z m2.9-103.2l10.4 18.1 65.6-37.9 79.9 138.4 18.6-10.8-55.9-96.9c18.8-0.9 43.2-0.6 73 0.7l1.5-23.1c-29.8-0.3-58.4 0.4-86 2.6l-12.5-21.6 74.9-43.2-10.4-18.1-159.1 91.8zM669.52053 329l38.2 66.2 61.4-35.4-38.1-66.1-61.5 35.3z m72.4 24.2l-26.3 15.2-19-33 26.3-15.2 19 33zM599.02053 356.7l7.9 13.7-23.3 13.5 9.8 17 21.8-12.6c7.5 18.7 6.6 39.6-2.5 57.6l20.7 4.4c10.3-23.1 10.3-49.4 0-72.5l18.8-10.9c6 9.2 10.7 19.2 14.2 29.7 0.3 5-2.6 9.7-7.2 11.7-2.9 1.2-6.4 2.8-10.9 4.9l14.1 14.1c3.7-1.3 7.3-2.9 10.7-4.8 8.6-3.9 14.4-12.2 15.2-21.6-5.4-22.1-14.6-43-27.4-61.8l-36.1 20.8-7.9-13.7-17.9 10.5z m29.9 108.1l10 17.4 53.2-30.7c-7.8 23.7-20.6 45.4-37.5 63.6l20.6 11.1c18.6-24.2 30-53.1 33-83.4l29.8 51.5 18.4-10.7-29.8-51.5c27.4 11.5 57.2 16.3 86.9 14.1l3.5-23.5c-24.7 5.1-50.1 5-74.8-0.1l53.5-30.9-10-17.3-69.3 40-7.3-12.6-18.4 10.7L698.02053 425l-69.1 39.8z"
|
||||
fill="#515151"
|
||||
opacity=".5"
|
||||
p-id="5974"
|
||||
></path>
|
||||
</svg>
|
||||
</template>
|
||||
<template #avatar>
|
||||
<a-checkbox
|
||||
:checked="item.checked"
|
||||
@click.stop="checkedItem(item)"
|
||||
@change="checkedItem(item)"
|
||||
></a-checkbox>
|
||||
</template>
|
||||
</a-list-item-meta>
|
||||
</a-skeleton>
|
||||
</a-list-item>
|
||||
</template>
|
||||
</a-list>
|
||||
<a-pagination
|
||||
v-model:current="pageNum"
|
||||
v-model:page-size="pageSize"
|
||||
:page-size-options="pageSizeOptions"
|
||||
:total="total"
|
||||
show-size-changer
|
||||
@showSizeChange="onShowSizeChange"
|
||||
@change="pageChange"
|
||||
:key="showKey"
|
||||
>
|
||||
<template #buildOptionText="props">
|
||||
<span>{{ props.value }}条/页</span>
|
||||
</template>
|
||||
</a-pagination>
|
||||
<div class="bottom">
|
||||
<div class="left">
|
||||
<a-checkbox v-model:checked="checkAll" @change="onCheckAllChange">
|
||||
全选
|
||||
</a-checkbox>
|
||||
<a-popconfirm
|
||||
:title="'是否批量删除已选中的' + checkedList.length + '条数据?'"
|
||||
ok-text="是"
|
||||
cancel-text="否"
|
||||
@confirm="delList"
|
||||
@cancel="cancel"
|
||||
>
|
||||
<a-button
|
||||
type="primary"
|
||||
style="width: 70px; height: 32px; margin-left: 10px"
|
||||
>
|
||||
删除
|
||||
</a-button>
|
||||
</a-popconfirm>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { onMounted, ref } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { message } from 'ant-design-vue'
|
||||
import mybus from '@/myplugins/mybus'
|
||||
import { getBsList, BsDel, getTopCategory } from '@/api/personalCenter'
|
||||
const router = useRouter()
|
||||
// 分页
|
||||
const pageNum = ref('1')
|
||||
const pageSize = ref('5')
|
||||
const pageSizeOptions = ref(['5', '10', '20'])
|
||||
const total = ref(0)
|
||||
// 多选框
|
||||
const checkedList = ref([])
|
||||
const checkAll = ref(false)
|
||||
const initLoading = ref(true)
|
||||
const showKey = ref(0)
|
||||
// 筛选条件
|
||||
const name = ref('')
|
||||
const type = ref('')
|
||||
const list = ref([])
|
||||
const tabList = ref([])
|
||||
// 初始化
|
||||
onMounted(() => {
|
||||
getList()
|
||||
getCategory()
|
||||
})
|
||||
// 获取一级编目
|
||||
const getCategory = () => {
|
||||
getTopCategory().then((res) => {
|
||||
console.log('编目一级=============>', res.data)
|
||||
res.data.data.forEach((val) => {
|
||||
// tabList.value.push(val.name)
|
||||
if (val.name == '应用资源' || val.name == '组件服务') {
|
||||
tabList.value.push(val.name)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
// 全选按钮
|
||||
const onCheckAllChange = () => {
|
||||
console.log(checkedList)
|
||||
if (checkAll.value) {
|
||||
// checkedList.value = []
|
||||
list.value.forEach((val) => {
|
||||
if (checkedList.value.indexOf(val.id) != -1) {
|
||||
checkedList.value.splice(checkedList.value.indexOf(val.id), 1)
|
||||
}
|
||||
val.checked = true
|
||||
checkedList.value.push(val.id)
|
||||
dataResourceId.value.push(val.id)
|
||||
arr.value.push(val.name)
|
||||
})
|
||||
console.log(checkAll.value)
|
||||
} else {
|
||||
list.value.forEach((val) => {
|
||||
val.checked = false
|
||||
if (checkedList.value.indexOf(val.id) != -1) {
|
||||
checkedList.value.splice(checkedList.value.indexOf(val.id), 1)
|
||||
}
|
||||
})
|
||||
// checkedList.value = []
|
||||
dataResourceId.value = []
|
||||
arr.value = []
|
||||
console.log(checkAll.value)
|
||||
}
|
||||
}
|
||||
// 重置
|
||||
const clean = () => {
|
||||
name.value = ''
|
||||
type.value = ''
|
||||
pageNum.value = '1'
|
||||
pageSize.value = '5'
|
||||
showKey.value++
|
||||
checkAll.value = false
|
||||
getList()
|
||||
}
|
||||
// 获取信息
|
||||
const getList = () => {
|
||||
console.log(name.value)
|
||||
|
||||
getBsList({
|
||||
limit: pageSize.value,
|
||||
page: pageNum.value,
|
||||
}).then((res) => {
|
||||
checkAll.value = true
|
||||
console.log('申购车列表================>', res)
|
||||
initLoading.value = false
|
||||
list.value = []
|
||||
total.value = res.data.data.total
|
||||
res.data.data.list.forEach((val) => {
|
||||
const obj = {
|
||||
loading: false,
|
||||
name: val.resourceDTO.name,
|
||||
id: val.id,
|
||||
checked: false,
|
||||
type: val.resourceDTO.type,
|
||||
resourceId: val.resourceId,
|
||||
createDate: val.createDate,
|
||||
description: val.resourceDTO.description,
|
||||
delFlag: val.resourceDTO.delFlag,
|
||||
}
|
||||
if (checkedList.value.indexOf(val.id) == -1) {
|
||||
checkAll.value = false
|
||||
} else {
|
||||
obj.checked = true
|
||||
}
|
||||
list.value.push(obj)
|
||||
})
|
||||
})
|
||||
}
|
||||
const onShowSizeChange = (current, pageSize) => {
|
||||
console.log(current, pageSize)
|
||||
// pageNum.value = current
|
||||
// pageSize.value = pageSize
|
||||
// getList()
|
||||
}
|
||||
// 切换页数
|
||||
const pageChange = (val) => {
|
||||
pageNum.value = val
|
||||
pageNum.value = val
|
||||
// checkedList.value = []
|
||||
getList()
|
||||
}
|
||||
// 搜索框
|
||||
const onSearch = () => {
|
||||
console.log('search======================>', name.value)
|
||||
}
|
||||
|
||||
//申请id
|
||||
const dataResourceId = ref([])
|
||||
|
||||
const arr = ref([])
|
||||
// 点击多选框
|
||||
const checkedItem = (item) => {
|
||||
checkAll.value = true
|
||||
list.value.forEach((val) => {
|
||||
if (val.id === item.id) {
|
||||
console.log(val)
|
||||
val.checked = !val.checked
|
||||
if (val.checked) {
|
||||
checkedList.value.push(val.id)
|
||||
dataResourceId.value.push(val.id)
|
||||
arr.value.push(val.name)
|
||||
} else {
|
||||
checkedList.value.splice(checkedList.value.indexOf(val.id), 1)
|
||||
dataResourceId.value.splice(checkedList.value.indexOf(val.id), 1)
|
||||
arr.value.splice(arr.value.indexOf(val.name), 1)
|
||||
}
|
||||
}
|
||||
console.log(checkedList.value, val.id)
|
||||
if (checkedList.value.indexOf(val.id) == -1) {
|
||||
checkAll.value = false
|
||||
console.log('不存在', checkAll.value)
|
||||
}
|
||||
})
|
||||
showKey.value++
|
||||
}
|
||||
// 切换筛选条件
|
||||
const tabIndex = ref(-1)
|
||||
const changeTab = (index) => {
|
||||
console.log('tabIndex', tabIndex.value, index, tabList)
|
||||
if (tabIndex.value == index) {
|
||||
tabIndex.value = -1
|
||||
type.value = ''
|
||||
} else {
|
||||
tabIndex.value = index
|
||||
type.value = tabList.value[index]
|
||||
}
|
||||
getList()
|
||||
}
|
||||
// 删除按钮
|
||||
const delList = () => {
|
||||
if (checkedList.value.length == 0) {
|
||||
message.error('请先选择需要操作的数据!')
|
||||
} else {
|
||||
BsDel(checkedList.value).then((res) => {
|
||||
console.log('checkedList.value', checkedList.value)
|
||||
if (res.data.msg === 'success') {
|
||||
message.success('删除成功')
|
||||
console.log('删除申购车列表================>', res)
|
||||
checkAll.value = false
|
||||
checkedList.value = []
|
||||
dataResourceId.value = []
|
||||
pageNum.value = '1'
|
||||
showKey.value++
|
||||
mybus.emit('getSgcNum')
|
||||
getList()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
const cancel = (e) => {
|
||||
console.log(e)
|
||||
}
|
||||
// 详情
|
||||
const showItem = (id, type, delFlag) => {
|
||||
if (delFlag == 0) {
|
||||
console.log('进入详情')
|
||||
mybus.emit('tabsChange', { flag: id })
|
||||
router.push({
|
||||
path: '/details',
|
||||
query: {
|
||||
id: id,
|
||||
},
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.ant-list {
|
||||
height: 540px;
|
||||
overflow-y: scroll;
|
||||
.ant-list-item-meta {
|
||||
align-items: center;
|
||||
:deep(.ant-list-item-meta-avatar) {
|
||||
padding-left: 20px;
|
||||
margin-right: 30px;
|
||||
}
|
||||
.time {
|
||||
margin-left: 30px;
|
||||
font-size: 12px;
|
||||
color: #ccc;
|
||||
}
|
||||
:deep(.ant-list-item-meta-description) {
|
||||
max-height: 44px;
|
||||
overflow: hidden;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
:deep(.ant-list-item-meta-title) {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
span {
|
||||
margin-right: 0.3rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
.ant-list::-webkit-scrollbar {
|
||||
width: 0 !important;
|
||||
}
|
||||
.bottom {
|
||||
margin: 10px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.left span {
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
.title {
|
||||
font-size: 20px;
|
||||
color: #000000;
|
||||
font-family: 'Alibaba PuHuiTi';
|
||||
font-weight: 500;
|
||||
margin-top: 20px;
|
||||
margin-left: 20px;
|
||||
}
|
||||
.sousuokuang {
|
||||
margin: 10px 0px 21px 20px;
|
||||
.ant-input-search {
|
||||
max-width: 490px;
|
||||
}
|
||||
:deep(.ant-input) {
|
||||
width: 400px;
|
||||
height: 36px;
|
||||
font-size: 14px;
|
||||
color: #b2b2b2;
|
||||
background: #f5f5f5;
|
||||
}
|
||||
:deep(.ant-input-group-addon) {
|
||||
display: inline-block;
|
||||
margin-left: 10px;
|
||||
.ant-input-search-button {
|
||||
width: 80px;
|
||||
height: 36px;
|
||||
border-radius: 4px;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.tab {
|
||||
margin-top: 10px;
|
||||
margin-left: 20px;
|
||||
margin-bottom: 10px;
|
||||
display: flex;
|
||||
font-size: 14px;
|
||||
color: #999999;
|
||||
div {
|
||||
width: 70px;
|
||||
height: 24px;
|
||||
border: 1px solid #cccccc;
|
||||
border-radius: 12px;
|
||||
margin-left: 10px;
|
||||
text-align: center;
|
||||
color: #666666;
|
||||
cursor: pointer;
|
||||
}
|
||||
.tabclass {
|
||||
border: 1px solid #0087ff;
|
||||
color: #0087ff;
|
||||
}
|
||||
}
|
||||
.name:hover {
|
||||
color: #0087ff;
|
||||
}
|
||||
</style>
|
|
@ -58,6 +58,12 @@
|
|||
imgActive: require('@/assets/personalCenter/collectactive.png'),
|
||||
key: 'collect',
|
||||
},
|
||||
{
|
||||
title: '我的浏览',
|
||||
img: require('@/assets/personalCenter/recent.png'),
|
||||
imgActive: require('@/assets/personalCenter/recentactive.png'),
|
||||
key: 'recent',
|
||||
},
|
||||
{
|
||||
title: '我的需求',
|
||||
img: require('@/assets/personalCenter/demand.png'),
|
||||
|
@ -70,12 +76,6 @@
|
|||
imgActive: require('@/assets/personalCenter/remarkactive.png'),
|
||||
key: 'remark',
|
||||
},
|
||||
// {
|
||||
// title: '最近浏览',
|
||||
// img: require('@/assets/personalCenter/recent.png'),
|
||||
// imgActive: require('@/assets/personalCenter/recentactive.png'),
|
||||
// key: 'recent',
|
||||
// },
|
||||
]
|
||||
const selectedKeys = ref(['PurchaseVehicle'])
|
||||
const type = JSON.parse(window.sessionStorage.getItem('type'))
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
<collection v-else-if="showFlag === 'collect'"></collection>
|
||||
<my-application v-else-if="showFlag === 'demand'"></my-application>
|
||||
<my-comments v-else-if="showFlag === 'remark'"></my-comments>
|
||||
<my-browse v-else-if="showFlag === 'recent'"></my-browse>
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
|
@ -32,7 +33,7 @@
|
|||
import MyApplication from '@/views/personalCenter/components/MyApplication'
|
||||
import MyComments from '@/views/personalCenter/components/MyComments'
|
||||
import MyPublish from '@/views/personalCenter/components/MyPublish'
|
||||
// MyPublish.vue
|
||||
import MyBrowse from '@/views/personalCenter/components/MyBrowse'
|
||||
import PurchaseVehicle from '@/views/personalCenter/components/PurchaseVehicle'
|
||||
import Collection from '@/views/personalCenter/components/Collection'
|
||||
import mybus from '@/myplugins/mybus'
|
||||
|
|
Loading…
Reference in New Issue