提交 6a248277 authored 作者: 王腾飞's avatar 王腾飞

1113

上级 30140206
......@@ -2,6 +2,6 @@ module.exports = {
NODE_ENV: '"development"',
ENV_CONFIG: '"dev"',
//BASE_API: '"http://192.168.2.175:8808"'
//BASE_API: '"http://test16.zhongdianyun.com:8808"'
BASE_API: '"http://localhost:8808"'
BASE_API: '"http://test16.zhongdianyun.com:8808"'
//BASE_API: '"http://localhost:8808"'
}
\ No newline at end of file
......@@ -2,6 +2,6 @@ module.exports = {
NODE_ENV: '"production"',
ENV_CONFIG: '"prod"',
//BASE_API: '"http://192.168.2.175:8808"'
//BASE_API: '"http://test16.zhongdianyun.com:8808"'
BASE_API: '"http://localhost:8808"'
BASE_API: '"http://test16.zhongdianyun.com:8808"'
//BASE_API: '"http://localhost:8808"'
}
\ No newline at end of file
......@@ -2,6 +2,6 @@ module.exports = {
NODE_ENV: '"production"',
ENV_CONFIG: '"sit"',
//BASE_API: '"http://192.168.2.175:8808"'
//BASE_API: '"http://test16.zhongdianyun.com:8808"'
BASE_API: '"http://localhost:8808"'
BASE_API: '"http://test16.zhongdianyun.com:8808"'
//BASE_API: '"http://localhost:8808"'
}
\ No newline at end of file
......@@ -101,6 +101,22 @@ export function updataAtlasInfoByIdAPI(data) { //更新图册信息
})
}
export function getEntityListAPI(params) { //关联实体选择
return request({
url: `${requestPath.common}/participle/relation/all`,
method: 'get',
params
})
}
export function getlinkedResAPI(params) { //关联实体弹窗的已链接资源
return request({
url: `${requestPath.common}/people/get/resource`,
method: 'get',
params
})
}
......
......@@ -4,7 +4,7 @@
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="listQuery.pageNum"
:page-sizes="[30,50,100,200,500]"
:page-sizes="listQuery.pageSizes"
:page-size="listQuery.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="total"
......@@ -16,15 +16,19 @@
//<pagination @pagesize="pagesizeFun" :total="total" @currentPage="currentPageFun"></pagination>
export default {
name: "pagination",
props: ["total","pageNum","pageSize"],
props: ["total","pageNum","pageSize", 'pageSizes'],
data() {
return {
listQuery: {
pageNum: 1,
pageSize: 30
pageSize: 30,
pageSizes: [30,50,100,200,500]
}
};
},
mounted() {
this.getNewData();
},
methods: {
handleSizeChange(val) {
this.$emit("pagesize", val);
......@@ -32,6 +36,19 @@ export default {
handleCurrentChange(val) {
this.$emit("currentPage", val);
// console.log(`当前页: ${val}`);
},
getNewData() {
if (this.pageSize) {
this.listQuery.pageSize = this.pageSize;
} else {
return;
}
if (this.pageSizes) {
this.listQuery.pageSizes = this.pageSizes;
} else {
return;
}
}
}
};
......
......@@ -16,8 +16,8 @@ export const requestPath = {
}
//export const uploadUrl = `http://192.168.2.175:8808/file/file/`
//export const uploadUrl = `http://test16.zhongdianyun.com:8808/file/file/`
export const uploadUrl = `http://localhost:8808/file/file/`
export const uploadUrl = `http://test16.zhongdianyun.com:8808/file/file/`
//export const uploadUrl = `http://localhost:8808/file/file/`
// BASE_API: '"http://rsks.class.com.cn"'
export const downloadPath = 'download'
export const uploadPath = 'upload'
\ No newline at end of file
......@@ -9,138 +9,153 @@
<div class="contentBoxLeft">
<el-form>
<el-form-item>
<el-input placeholder="检索地理位置">
<i slot="append" class="el-icon-star-off" style="margin-right:10px;">查询实体</i>
<el-input placeholder="请输入搜索关键词" v-model="searchForm.keyword" @input="change($event)" @keyup.native.enter="getSearchResult">
<i slot="append" class="el-icon-star-off" style="margin-right:10px;" @click="getSearchResult">查询实体</i>
</el-input>
<i class="el-icon-plus">新增命名实体</i>
<!-- <input type="text" v-model="searchForm.keyword" class="el-input" style="outline:none; border:1px solid #C0C4CC; text-indent:1em; margin-right:0; border-top-left-radius:4px; border-bottom-left-radius:4px">
<i class="el-icon-star-off" style="margin-right:10px; height:36px; line-height:36px; background:#00B5B8; color:#fff; padding:0 10px; border-top-right-radius:4px; border-bottom-right-radius:4px" @click="getSearchResult">查询实体</i> -->
<!-- <i class="el-icon-plus">新增命名实体</i> -->
<el-select v-model="value" placeholder="请选择" @change="getDiyEntityList">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-form>
<div class="dataList">
<dl v-for="(item, key) in dataList" :key="key" @click="choseThisItem(key, item)" :class="{changeDlStyle: item.choosedAlready}">
<dt>
<img :src="item.imgpath" alt="">
<img :src="item.img" alt="" v-if="item.img">
<img src="../../assets/img/pic_user.png" alt="" v-else>
</dt>
<dd>
<ul>
<li>
<span>{{ item.name }}</span>
<span>{{ item.tag }}</span>
<span>{{ item.stateVal }}</span>
</li>
<li>职业:{{ item.profession }}</li>
<li>{{ item.synopsis }}</li>
<li :title="item.occupation">职业:{{ item.occupation ? item.occupation.length > 9 ? item.occupation.substring(0, 9) + '...' : item.occupation : '' }}</li>
<li :title="item.description">{{ item.description ? item.description.length > 20 ? item.description.substring(0, 20) + '...' : item.description : '' }}</li>
</ul>
<img src="../../assets/img/choosedicon.png" alt="" class="choosedicon" v-if="item.choosedAlready">
</dd>
</dl>
</div>
<pagination v-if="totalCount>0" :total="totalCount" :page-size="searchForm.pageSize" :page-sizes="[6, 12, 18, 24, 30]" @pagesize="pagesizeFun" @currentPage="currentPageFun"></pagination>
<div style="text-align: center" v-if="!totalCount>0"><img src="~@/assets/img/noData_pic.png" alt="暂无数据"></div>
<div class="alreadyEntity">
<h3>已选择实体:</h3>
<div class="alreadyEntityBox">
<span v-for="(item, key) in alreadyEntityData" :key="key" @click="deleteItem(item, key)">{{ item.name }}<i class="el-icon-error" style="padding-left:5px;"></i></span>
</div>
</div>
</div>
<div class="contentBoxRight">
<section>
<div>
<div @click="toggleListOfBasicInfo">
<h2>>基本信息</h2>
<img :src="imgPathS" alt="" @click="toggleListOfBasicInfo">
<img :src="imgPathS" alt="">
</div>
<ul v-if="isShowListOfBasicInfo">
<ul v-if="isShowListOfBasicInfo && entityDetail.state == '1'" class="listUl">
<li>
<label for="">名称:</label>
<span>爱新觉罗·努尔哈赤</span>
<span>{{ entityDetail.keyword }}</span>
</li>
<li>
<label for="">义项名:</label>
<span>爱新觉罗·努尔哈赤</span>
</li>
<li>
<label for="">简介:</label>
<span>爱新觉罗·努尔哈赤</span>
<span>{{ entityDetail.itemName }}</span>
</li>
<li>
<label for="">称号</label>
<span>爱新觉罗·努尔哈赤</span>
<label for="">主要作品</label>
<span :title="entityDetail.works">{{ entityDetail.works ? entityDetail.works.length > 15 ? entityDetail.works.substring(0, 15) + '...' : entityDetail.works : '' }}</span>
</li>
<li>
<label for="">国籍:</label>
<span>爱新觉罗·努尔哈赤</span>
<span>{{ entityDetail.nationality}}</span>
</li>
<li>
<label for="">出生时间:</label>
<span>爱新觉罗·努尔哈赤</span>
<span>{{ entityDetail.dateofbirth }}</span>
</li>
<li>
<label for="">逝世时间:</label>
<span>爱新觉罗·努尔哈赤</span>
<span>{{ entityDetail.elapsedtime }}</span>
</li>
<li>
<label for="">职业:</label>
<span>爱新觉罗·努尔哈赤</span>
<span>{{ entityDetail.occupation }}</span>
</li>
<li>
<label for="">出生地:</label>
<span>爱新觉罗·努尔哈赤</span>
<span>{{ entityDetail.birthaddress }}</span>
</li>
<li>
<label for="">主要成就:</label>
<span>爱新觉罗·努尔哈赤</span>
<span :title="entityDetail.achievement">{{ entityDetail.achievement ? entityDetail.achievement.length > 15 ? entityDetail.achievement.substring(0, 15) + '...' : entityDetail.achievement : '' }}</span>
</li>
</ul>
</section>
<section>
<div>
<h2>>自定义属性</h2>
<img :src="imgPathX" alt="" @click="toggleListOfSelfData">
</div>
<ul v-if="isShowListOfSelfData">
<ul v-if="isShowListOfBasicInfo && entityDetail.state == '3'" class="listUl">
<li>
<label for="">名称:</label>
<span>爱新觉罗·努尔哈赤</span>
<span>{{ entityDetail.keyword }}</span>
</li>
<li>
<label for="">义项名:</label>
<span>爱新觉罗·努尔哈赤</span>
<span>{{ entityDetail.itemName }}</span>
</li>
<li>
<label for="">简介</label>
<span>爱新觉罗·努尔哈赤</span>
<label for="">地理位置</label>
<span :title="entityDetail.detailedaddress">{{ entityDetail.works ? entityDetail.works.length > 15 ? entityDetail.works.substring(0, 15) + '...' : entityDetail.works : '' }}</span>
</li>
<li>
<label for="">称号</label>
<span>爱新觉罗·努尔哈赤</span>
<label for="">经度</label>
<span>{{ entityDetail.longitude}}</span>
</li>
<li>
<label for="">国籍</label>
<span>爱新觉罗·努尔哈赤</span>
<label for="">维度</label>
<span>{{ entityDetail.latitude }}</span>
</li>
</ul>
<ul v-if="isShowListOfBasicInfo && entityDetail.state == '2'" class="listUl">
<li>
<label for="">出生时间</label>
<span>爱新觉罗·努尔哈赤</span>
<label for="">名称</label>
<span>{{ entityDetail.keyword }}</span>
</li>
<li>
<label for="">逝世时间</label>
<span>爱新觉罗·努尔哈赤</span>
<label for="">义项名</label>
<span>{{ entityDetail.itemName }}</span>
</li>
<li>
<label for="">职业</label>
<span>爱新觉罗·努尔哈赤</span>
<label for="">简称</label>
<span>{{ entityDetail.abbreviation }}</span>
</li>
<li>
<label for="">出生地</label>
<span>爱新觉罗·努尔哈赤</span>
<label for="">创办时间</label>
<span>{{ entityDetail.foundertime}}</span>
</li>
<li>
<label for="">主要成就:</label>
<span>爱新觉罗·努尔哈赤</span>
<label for="">所属地区:</label>
<span>{{ entityDetail.address }}</span>
</li>
<li>
<label for="">机构类型:</label>
<span>{{ entityDetail.type}}</span>
</li>
<li>
<label for="">简介:</label>
<span :title="entityDetail.description">{{ entityDetail.description ? entityDetail.description.length > 15 ? entityDetail.description.substring(0, 15) + '...' : entityDetail.description : '' }}</span>
</li>
</ul>
</section>
<section>
<div>
<h2>>已链接资源</h2>
<img :src="imgPathX1" alt="" @click="toggleListOfLinkedRes">
<div @click="toggleListOfSelfData">
<h2>>自定义属性</h2>
<img :src="imgPathX" alt="">
</div>
<ul v-if="isShowListOfLinkedRes">
<ul v-if="isShowListOfSelfData">
<li>
<label for="">名称:</label>
<span>爱新觉罗·努尔哈赤</span>
......@@ -183,6 +198,19 @@
</li>
</ul>
</section>
<section>
<div @click="toggleListOfLinkedRes">
<h2>>已链接资源</h2>
<img :src="imgPathX1" alt="">
</div>
<ul v-if="isShowListOfLinkedRes">
<li v-for="(item, key) in linkedResData" :key="key" @click="goResourceDetail(item)">
<span>
<a href="javascript:;" :title="item.name">{{ item.name ? item.name.length > 22 ? item.name.substring(0, 22) + '...' : item.name : '' }}</a>
</span>
</li>
</ul>
</section>
<div class="twoBtn">
<button @click="closeMark">取消</button>
<button @click="giveEntityToParent">确定</button>
......@@ -194,9 +222,14 @@
</template>
<script>
import { getEntityListAPI, getlinkedResAPI } from '@/api/resourcecommit'
import pagination from '@/components/pagination/pagination'
export default {
name: 'linkentity',
props: ['isShowLineEntityMark', 'entityData'],
components: {
pagination
},
data() {
return {
isShowListOfBasicInfo: true,
......@@ -206,67 +239,41 @@ export default {
imgPathX1: require('../../assets/img/zhanicon.png'),
imgPathS: require('../../assets/img/shouicon.png'),
current: 0,
dataList: [//左边列表的数据
{
id: 1,
imgpath: require('../../assets/img/default.png'),
name: '努尔哈赤1',
tag: '历史人物',
profession: '皇帝',
synopsis: '清太祖爱新觉罗·努尔哈赤,清朝基,通满语和汉语统一...',
choosedAlready: false,
},
{
id: 2,
imgpath: require('../../assets/img/default.png'),
name: '努尔哈赤2',
tag: '历史人物',
profession: '皇帝',
synopsis: '清太祖爱新觉罗·努尔哈赤,清朝基,通满语和汉语统一...',
choosedAlready: false,
},
{
id: 3,
imgpath: require('../../assets/img/default.png'),
name: '努尔哈赤3',
tag: '历史人物',
profession: '皇帝',
synopsis: '清太祖爱新觉罗·努尔哈赤,清朝基,通满语和汉语统一...',
choosedAlready: false,
options: [{
value: '',
label: '全部'
}, {
value: 1,
label: '历史人物'
}, {
value: 2,
label: '组织机构'
}, {
value: 3,
label: '地理位置'
}],
value: '',
searchForm: {
pageNum: 1,
pageSize: 6,
keyword: null,
state: null
},
{
id: 4,
imgpath: require('../../assets/img/default.png'),
name: '努尔哈赤4',
tag: '历史人物',
profession: '皇帝',
synopsis: '清太祖爱新觉罗·努尔哈赤,清朝基,通满语和汉语统一...',
choosedAlready: false,
linkedResParams: {
name: null,
state: null
},
{
id: 5,
imgpath: require('../../assets/img/default.png'),
name: '努尔哈赤',
tag: '历史人物',
profession: '皇帝',
synopsis: '清太祖爱新觉罗·努尔哈赤,清朝基,通满语和汉语统一...',
choosedAlready: false,
},
{
id: 6,
imgpath: require('../../assets/img/default.png'),
name: '努尔哈赤',
tag: '历史人物',
profession: '皇帝',
synopsis: '清太祖爱新觉罗·努尔哈赤,清朝基,通满语和汉语统一...',
choosedAlready: false,
}
linkedResData: [],
totalCount: null,
dataList: [//左边列表的数据
],
alreadyEntityData: []//已选择实体的数据
alreadyEntityData: [],//已选择实体的数据
entityDetail: {},//点击实体列表的实体,得到的对应的详情
}
},
mounted() {
this.getEntityList()
},
methods: {
toggleListOfBasicInfo() {
......@@ -308,6 +315,11 @@ export default {
choseThisItem(key, item) {
// this.current = key;
// let el = event.currentTarget;
this.entityDetail = item;
this.linkedResParams.name = item.keyword;
this.linkedResParams.state = item.state;
this.getlinkedRes();
console.log(this.entityDetail, '666666')
item.choosedAlready = !item.choosedAlready;
if (item.choosedAlready) {
this.alreadyEntityData.push(item)
......@@ -324,6 +336,8 @@ export default {
item.choosedAlready = false;
},
closeMark() {
this.searchForm.keyword = null;
this.getEntityList();
this.$emit('changeStateVal', false);
this.dataList.forEach((val, key) => {
val.choosedAlready = false;
......@@ -333,6 +347,70 @@ export default {
giveEntityToParent() {
this.$emit('getEntity', this.alreadyEntityData);
this.closeMark();
},
getEntityList() {
getEntityListAPI(this.searchForm)
.then(res => {
console.log(res, 'KLKLK')
if (res.data.code === 0) {
console.log(res.data.data.list, "OPL")
this.totalCount = res.data.data.total;
this.dataList = res.data.data.list;
this.dataList.map((item, index) => {
this.$set(item, 'stateVal', null)
if (item.state == 1) {
item.stateVal = '历史人物'
} else if (item.state == 2) {
item.stateVal = '组织机构'
} else if (item.state) {
item.stateVal = '地理位置'
}
})
}
})
},
change(e) {
this.$forceUpdate()
},
getSearchResult() {
this.getEntityList();
},
pagesizeFun(val){
console.log(val,"()()999")
this.searchForm.pageSize = val;
this.getEntityList()
},
currentPageFun(val){
this.searchForm.pageNum = val;
this.getEntityList()
},
getDiyEntityList(val) {
console.log(val, '大家都别吵,我最帅')
this.searchForm.state = val;
this.getEntityList();
},
getlinkedRes() {
getlinkedResAPI(this.linkedResParams)
.then(res => {
console.log(res, '32323231231231232');
if (res.data.code === 0) {
this.linkedResData = res.data.data
}
})
},
goResourceDetail(item) {
this.$router.push({
// path: '/submission/resourcecommit',
// query: {
// oid: item.id,
// flag: 'look'
// }
path: '/draw/msgPacket',
query: {
id: item.id,
resourceType: item.resourceType
}
})
}
}
}
......@@ -346,11 +424,11 @@ export default {
left:-180px;
top:-56px;
background:rgba(0, 0, 0, .5);
z-index:999999999;
z-index:2001;
}
.entityBox {
width:69.27%;
height:50%;
height:51%;
background:#fff;
margin:2.9% auto;
padding:0 30px;
......@@ -378,10 +456,18 @@ export default {
display:flex;
.contentBoxLeft {
width:58.35%;
position:relative;
.alreadyEntity {
position:absolute;
width:100%;
left:0;
bottom:10px;
}
}
.el-input {
float:left;
width:calc(80% - 10px);
width:calc(70% - 10px);
margin-right:10px;
}
.el-icon-plus {
float:left;
......@@ -397,6 +483,12 @@ export default {
}
.dataList {
width:100%;
max-height:420px;
overflow-y:auto;
&::-webkit-scrollbar {
width:5px;
height:5px;
}
dl {
margin-block-start:0;
margin-block-end:0;
......@@ -474,6 +566,8 @@ export default {
h3 {
color:#404E67;
font-size:14px;
margin-block-start: 0em;
margin-block-end: .2em;
}
.alreadyEntityBox {
width:100%;
......@@ -481,6 +575,11 @@ h3 {
border:1px solid #D3DAE6;
border-radius:4px;
padding:10px 10px;
overflow-y:auto;
&::-webkit-scrollbar {
width:5px;
height:5px;
}
span {
display:inline-block;
padding:0 11px;
......@@ -506,6 +605,7 @@ h3 {
display:flex;
position:relative;
height:47px;
cursor:pointer;
h2 {
color:#364366;
font-size:14px;
......@@ -527,7 +627,9 @@ h3 {
margin-block-start:0;
margin-block-end:0;
padding-inline-start:0;
margin-top:-10px;
// margin-top:-10px;
max-height:400px;
overflow-y:auto;
li {
list-style:none;
line-height:40px;
......@@ -544,6 +646,10 @@ h3 {
}
}
}
.listUl::-webkit-scrollbar {
width:5px;
height:5px;
}
}
}
.twoBtn {
......@@ -571,4 +677,7 @@ h3 {
}
}
}
.osis_pagination {
margin-top:5px;
}
</style>
\ No newline at end of file
......@@ -28,3 +28,10 @@
// top:80%;
// }
}
.contentBoxLeft {
.el-form-item__content {
display:flex;
}
}
......@@ -110,8 +110,8 @@
<el-form label-width="110px">
<el-form-item label="关联实体选择:">
<div style="display:flex;">
<div autocomplete="off" :disabled="true" style="height:36px; border:1px solid #DCDFE6; border-top-left-radius:4px; border-bottom-left-radius:4px; flex:1;">
<span v-for="(item, key) in entityData" :key="key" class="entitySpan" @click="deleteEntity(key, item)">{{ item.name }}<i class="el-icon-error" style="padding-left:5px;"></i></span>
<div class="entityDataCon" autocomplete="off" :disabled="true">
<span v-for="(item, key) in entityData" :key="key" class="entitySpan" @click="deleteEntity(key, item)">{{ item.keyword }}<i class="el-icon-error" style="padding-left:5px;"></i></span>
</div>
<i class="el-icon-star-off" @click="showEntityMark" style="width:111px; text-align:center; line-height:36px; color:#fff; background:#409EFF; border-top-right-radius:4px; border-bottom-right-radius:4px; cursor:pointer;">请选择实体</i>
</div>
......@@ -227,6 +227,13 @@ export default {
// resourceId: ''//新增不传
// }
],
relationParticiple:[
{
// keyword:
// participleId:
// participleType:
}
],
responsibility: '',
copyright: '',
score: null
......@@ -321,7 +328,18 @@ export default {
this.isShowLineEntityMark = val;
},
getEntity(val) {
console.log(val, '121212121');
this.entityData = val;
let entityArr = [];
val.map((item, index) => {
let entityObj = {
keyword: item.keyword,
participleId: item.id,
participleType: item.state
};
entityArr.push(entityObj)
});
this.formData.relationParticiple = entityArr;
},
deleteEntity(key,item) {
this.entityData.splice(key, 1);
......@@ -494,6 +512,9 @@ export default {
this.$set(item, 'label', item.typeName);
this.optionResourceDiyTypeShow.push(item.value);
})
if (res.data.data.participleList) {
this.entityData = res.data.data.participleList
}
}
})
} else {
......@@ -653,6 +674,19 @@ export default {
margin:0 10px 10px 0;
cursor:pointer;
}
.entityDataCon {
height:36px;
border:1px solid #DCDFE6;
border-top-left-radius:4px;
border-bottom-left-radius:4px;
flex:1;
overflow-y:auto;
padding:0 9px;
&::-webkit-scrollbar {
width:5px;
height:5px;
}
}
</style>
<style lang="scss">
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论