提交 8d546054 authored 作者: quanlili's avatar quanlili
......@@ -43,10 +43,11 @@ export function relateAreaAPI(data) { //相关地点
})
}
export function relateResourceListAPI(data) { //关联资源列表
export function relateResourceListAPI(params) { //关联资源列表
return request({
url: `${requestPath.common}/people/get/resource?name=` + data,
url: `${requestPath.common}/people/get/resource`,
method: 'get',
params
})
}
......@@ -121,10 +122,10 @@ export function finallyAddTimerNamedEntityAPI(data) { //词语的时间实体确
})
}
export function deleteEntityAPI(params) { //删除实体,单个删除和批量删除统一接口
export function deleteEntityAPI(data) { //删除实体,单个删除和批量删除统一接口
return request({
url: `${requestPath.common}/participle/batch/delete`,
method: 'get',
params
method: 'post',
data
})
}
......@@ -241,7 +241,7 @@
<div class="relateResourceList">
<el-table
:data="tableData"
height="250"
max-height="250"
border
style="width: 100%"
@row-click="goResourceDetail">
......@@ -449,6 +449,7 @@ export default {
name: 'character',
data() {
return {
relateResListState: null,
relationChart: null,
keywordChart:null,
chartData:[],
......@@ -539,6 +540,7 @@ export default {
if (res.data.code === 0) {
_this.characterDetailData = res.data.data;
_this.peopleName = res.data.data.keyword;
_this.relateResListState = 1;
}
})
} else if (this.$route.query.entityType == 3) {
......@@ -547,6 +549,7 @@ export default {
if (res.data.code === 0) {
_this.characterDetailData = res.data.data;
_this.peopleName = res.data.data.keyword;
_this.relateResListState = 3;
}
})
} else if (this.$route.query.entityType == 2) {
......@@ -556,6 +559,7 @@ export default {
_this.characterDetailData = res.data.data;
console.log(_this.characterDetailData,"IIIIIII")
_this.peopleName = res.data.data.keyword;
_this.relateResListState = 2;
}
})
}
......@@ -611,7 +615,12 @@ export default {
getRelateResourceListAPI() {//关联资源列表
var _this = this;
setTimeout(() => {
relateResourceListAPI(this.peopleName)
let params = {
name: this.peopleName,
state: this.relateResListState
}
console.log(this.relateResListState, ")))))))))00000")
relateResourceListAPI(params)
.then(res => {
console.log(res, "11818188")
if (res.data.code === 0) {
......@@ -876,7 +885,7 @@ export default {
height:270px;
img {
width:100%;
height:100%;
height:auto;
}
}
dd {
......
......@@ -13,13 +13,14 @@
<label for="">排列:</label>
<span @click="createdateSort" class="btn" :class="[createdate?'active':'']">形成时间<i :class="[createdate=='desc'?'icon-projectjiantouxia':'icon-projectjiantoushang']"></i></span>
<span>共找到 {{ totalNum }} 条数据</span>
<el-button type="success" plain size="mini" @click="batchDelete" style="margin-left: 20px;">批量删除</el-button>
<div class="contentBoxTop">
<el-button type="primary" size="mini" icon="el-icon-plus" style="background:#00B5B8; height:30px; float:right;" @click="addNewEntity">新增实体</el-button>
</div>
</div>
<div class="contentBox">
<div class="dataList">
<el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>
<el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" v-if="totalNum != 0" @change="handleCheckAllChange">全选</el-checkbox>
<el-checkbox-group v-model="multipleSelection" @change="handleCheckedCitiesChange">
<ul class="ulOne" v-for="(item, key) in characterList" :key="key">
<li>
......@@ -43,7 +44,7 @@
<li>{{ item.confirmstateVal }}</li>
<li>
<el-button type="success" size="mini" icon="el-icon-search" @click="goCharacterDetail(item)">查看</el-button>
<el-button type="danger" size="mini" icon="el-icon-delete" @click="goCharacterDetail(item)">删除</el-button>
<el-button type="danger" size="mini" icon="el-icon-delete" @click="deleteEntity(item, key)">删除</el-button>
</li>
</ul>
</el-checkbox-group>
......@@ -116,9 +117,11 @@ import {
namedEntityListAPI,
addNamedEntityAPI,
showNamedEntityAPI,
finallyAddNamedEntityAPI
finallyAddNamedEntityAPI,
deleteEntityAPI
} from '@/api/storagemodule'
import pagination from '@/components/pagination/pagination'
import { operationMsg, confirm } from '@/utils/publicFunctions'
export default {
name: 'characterentry',
components:{pagination},
......@@ -126,15 +129,15 @@ export default {
return {
checkAll: false,
isIndeterminate: true,
multipleSelection: [],
allIds: [],
multipleSelection: [],//选中的
allIds: [], //所有的
dialogFormVisible: false,
dialogFormVisible1: false,
addNewGloss: false,
formLabelWidth1: '120px',
formLabelWidth: '92px',
deleteEntityForm: {
ids: [],
entityid: [],
state: 1
},
form: {//新增实体所需参数
......@@ -279,6 +282,7 @@ export default {
console.log(res, 'uiui');
if (res.data.code === 0) {
this.characterList = res.data.data.list;
this.allIds = [];
if (res.data.data.list && res.data.data.list.length > 0) {
res.data.data.list.map((item, index) => {
this.allIds.push(item.id)
......@@ -398,13 +402,54 @@ export default {
this.getNamedEntityListAPI();
},
handleCheckAllChange(val) {
//val是true或false
this.multipleSelection = val ? this.allIds : [];
this.isIndeterminate = false;
},
handleCheckedCitiesChange(value) {
console.log(value, "1111111111")
let checkedCount = value.length;
this.checkAll = checkedCount === this.allIds.length;
this.isIndeterminate = checkedCount > 0 && checkedCount < this.allIds.length;
},
deleteEntity(item, key) {
this.deleteEntityForm.entityid = [];
this.deleteEntityForm.entityid.push(item.id)
confirm.apply(this, ['确认删除当前条目吗?']).then(() => {
deleteEntityAPI(this.deleteEntityForm)
.then(res => {
console.log(res, '()()()(')
if (res.data.code === 0) {
this.characterList.splice(key, 1);
this.$message.success('删除实体成功');
this.getNamedEntityListAPI();
} else {
this.$message.error('删除实体失败')
}
})
})
},
batchDelete() {
this.deleteEntityForm.entityid = [];
if (this.multipleSelection.length > 0) {
this.deleteEntityForm.entityid = [];
this.deleteEntityForm.entityid = this.multipleSelection;
confirm.apply(this, ['确认删除当前这些条目吗?']).then(() => {
deleteEntityAPI(this.deleteEntityForm)
.then(res => {
console.log(res, '()()()(')
if (res.data.code === 0) {
this.$message.success('删除实体成功');
this.multipleSelection = [];
this.getNamedEntityListAPI();
} else {
this.$message.error('删除实体失败')
}
})
})
} else {
this.$message.warning("请先至少选择一条需要删除的条目");
}
}
}
}
......@@ -451,7 +496,7 @@ export default {
}
.contentBoxTop {
float:right;
margin-top:-6px;
margin-top:9px;
span {
color:#222222;
font-size:16px;
......@@ -553,9 +598,9 @@ export default {
color:#62738D;
border-bottom: 1px solid #DCE1E9;
border-top: 1px solid #DCE1E9;
padding:15px 20px 0;
margin:0px 0 -26px;
height:46px;
line-height:46px;
background:#F9FAFC;
.el-button--success.is-plain{
color: #62738D !important;
......
......@@ -13,33 +13,41 @@
<label for="">排列:</label>
<span @click="createdateSort" class="btn" :class="[createdate?'active':'']">形成时间<i :class="[createdate=='desc'?'icon-projectjiantouxia':'icon-projectjiantoushang']"></i></span>
<span>共找到 {{ totalNum }} 条数据</span>
<el-button type="success" plain size="mini" @click="batchDelete" style="margin-left: 20px;">批量删除</el-button>
<div class="contentBoxTop">
<el-button type="primary" size="mini" icon="el-icon-plus" style="background:#00B5B8; height:30px; float:right;" @click="addNewEntity">新增实体</el-button>
</div>
</div>
<div class="contentBox">
<div class="dataList">
<ul class="ulOne" v-for="(item, key) in characterList" :key="key">
<li>
<dl>
<dt>
<img :src="item.img" alt="" v-if="item.img">
<img src="../../../assets/img/pic_ops.png" alt="" v-else>
</dt>
<dd>
<ul>
<li>{{ item.keyword }}</li>
<li>经纬度:{{ item.longitude }}<span v-if="item.longitude"></span>{{ item.latitude }}</li>
<li>{{ item.description }}</li>
</ul>
</dd>
</dl>
</li>
<li>已确认</li>
<li>
<el-button type="success" size="mini" icon="el-icon-search" @click="goLocaltionDetail(item)">查看</el-button>
</li>
</ul>
<el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" v-if="totalNum != 0" @change="handleCheckAllChange">全选</el-checkbox>
<el-checkbox-group v-model="multipleSelection" @change="handleCheckedCitiesChange">
<ul class="ulOne" v-for="(item, key) in characterList" :key="key">
<li>
<el-checkbox class="checkbox" :label="item.id" :key="item.id"></el-checkbox>
</li>
<li>
<dl>
<dt>
<img :src="item.img" alt="" v-if="item.img">
<img src="../../../assets/img/pic_ops.png" alt="" v-else>
</dt>
<dd>
<ul>
<li>{{ item.keyword }}</li>
<li>经纬度:{{ item.longitude }}<span v-if="item.longitude"></span>{{ item.latitude }}</li>
<li>{{ item.description }}</li>
</ul>
</dd>
</dl>
</li>
<li>{{ item.confirmstateVal }}</li>
<li>
<el-button type="success" size="mini" icon="el-icon-search" @click="goLocaltionDetail(item)">查看</el-button>
<el-button type="danger" size="mini" icon="el-icon-delete" @click="deleteEntity(item, key)">删除</el-button>
</li>
</ul>
</el-checkbox-group>
</div>
<pagination v-if="totalNum>0" :total="totalNum" @pagesize="pagesizeFun" @currentPage="currentPageFun"></pagination>
<div class="noDataPic" style="text-align:center;" v-if="totalNum === 0">
......@@ -91,11 +99,13 @@
<script>
import BaiduMap from 'vue-baidu-map/components/map/Map.vue'
import pagination from '@/components/pagination/pagination'
import { operationMsg, confirm } from '@/utils/publicFunctions'
import {
namedEntityListAPI,
addNamedEntityAPI,
showNamedEntityAPI,
finallyAddLocaltionNamedEntityAPI
finallyAddLocaltionNamedEntityAPI,
deleteEntityAPI
} from '@/api/storagemodule'
export default {
name: 'location',
......@@ -111,7 +121,14 @@ export default {
// },
zoom: 3,
//keyword: '',//地图搜索需要关键字
checkAll: false,
isIndeterminate: true,
multipleSelection: [],//选中的
allIds: [], //所有的
deleteEntityForm: {
entityid: [],
state: 3
},
dialogFormVisible: false,
dialogFormVisible1: false,
formLabelWidth1: '120px',
......@@ -205,6 +222,20 @@ export default {
console.log(res, 'uiui');
if (res.data.code === 0) {
this.characterList = res.data.data.list;
this.allIds = [];
if (res.data.data.list && res.data.data.list.length > 0) {
res.data.data.list.map((item, index) => {
this.allIds.push(item.id)
})
}
this.characterList.map((item, index) => {
this.$set(item, 'confirmstateVal', null)
if (item.confirmstate === 0) {
item.confirmstateVal = '待确认'
} else {
item.confirmstateVal = '已确认'
}
})
this.totalNum = res.data.data.total;
} else {
this.$message.error('人物实体列表数据获取错误')
......@@ -316,6 +347,56 @@ export default {
},
searchByKeyword() {
this.getNamedEntityListAPI();
},
handleCheckAllChange(val) {
//val是true或false
this.multipleSelection = val ? this.allIds : [];
this.isIndeterminate = false;
},
handleCheckedCitiesChange(value) {
console.log(value, "1111111111")
let checkedCount = value.length;
this.checkAll = checkedCount === this.allIds.length;
this.isIndeterminate = checkedCount > 0 && checkedCount < this.allIds.length;
},
deleteEntity(item, key) {
this.deleteEntityForm.entityid = [];
this.deleteEntityForm.entityid.push(item.id)
confirm.apply(this, ['确认删除当前条目吗?']).then(() => {
deleteEntityAPI(this.deleteEntityForm)
.then(res => {
console.log(res, '()()()(')
if (res.data.code === 0) {
this.characterList.splice(key, 1);
this.$message.success('删除实体成功');
this.getNamedEntityListAPI();
} else {
this.$message.error('删除实体失败')
}
})
})
},
batchDelete() {
this.deleteEntityForm.entityid = [];
if (this.multipleSelection.length > 0) {
this.deleteEntityForm.entityid = [];
this.deleteEntityForm.entityid = this.multipleSelection;
confirm.apply(this, ['确认删除当前这些条目吗?']).then(() => {
deleteEntityAPI(this.deleteEntityForm)
.then(res => {
console.log(res, '()()()(')
if (res.data.code === 0) {
this.$message.success('删除实体成功');
this.multipleSelection = [];
this.getNamedEntityListAPI();
} else {
this.$message.error('删除实体失败')
}
})
})
} else {
this.$message.warning("请先至少选择一条需要删除的条目");
}
}
}
}
......@@ -362,7 +443,7 @@ export default {
}
.contentBoxTop {
float:right;
margin-top:-6px;
margin-top:9px;
span {
color:#222222;
font-size:16px;
......@@ -382,8 +463,9 @@ export default {
align-items:center;
li {
list-style:none;
&:nth-of-type(1) {
&:nth-of-type(2) {
flex:1;
margin-left:10px;
dl {
display:flex;
align-items: center;
......@@ -422,13 +504,21 @@ export default {
}
&:nth-of-type(3) {
line-height:22px;
width:initial;
height:initial;
text-align:initial;
background:initial;
font-size:14px;
color:#5B616D;
border-radius:initial;
margin:initial;
}
}
}
}
}
}
&:nth-of-type(2) {
&:nth-of-type(3) {
width:60px;
height:22px;
text-align:center;
......@@ -439,6 +529,15 @@ export default {
border-radius:5px;
margin:0 20px 0 40px;
}
&:nth-of-type(4) {
.el-button {
display:block;
&:nth-of-type(2) {
margin-left:initial;
margin-top:10px;
}
}
}
}
}
}
......@@ -446,9 +545,9 @@ export default {
color:#62738D;
border-bottom: 1px solid #DCE1E9;
border-top: 1px solid #DCE1E9;
padding:15px 20px 0;
margin:0px 0 -26px;
height:46px;
line-height:46px;
background:#F9FAFC;
.el-button--success.is-plain{
color: #62738D !important;
......
......@@ -13,33 +13,41 @@
<label for="">排列:</label>
<span @click="createdateSort" class="btn" :class="[createdate?'active':'']">形成时间<i :class="[createdate=='desc'?'icon-projectjiantouxia':'icon-projectjiantoushang']"></i></span>
<span>共找到 {{ totalNum }} 条数据</span>
<el-button type="success" plain size="mini" @click="batchDelete" style="margin-left: 20px;">批量删除</el-button>
<div class="contentBoxTop">
<el-button type="primary" size="mini" icon="el-icon-plus" style="background:#00B5B8; height:30px; float:right;" @click="addNewEntity">新增实体</el-button>
</div>
</div>
<div class="contentBox">
<div class="dataList">
<ul class="ulOne" v-for="(item, key) in characterList" :key="key">
<li>
<dl>
<dt>
<img :src="item.img" alt="" v-if="item.img">
<img src="../../../assets/img/pic_user.png" alt="" v-else>
</dt>
<dd>
<ul>
<li>{{ item.keyword }}</li>
<li>创建时间:{{ item.foundertime }}</li>
<li>{{ item.description }}</li>
</ul>
</dd>
</dl>
</li>
<li>已确认</li>
<li>
<el-button type="success" size="mini" icon="el-icon-search" @click="goOrganDetail(item)">查看</el-button>
</li>
</ul>
<el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" v-if="totalNum != 0" @change="handleCheckAllChange">全选</el-checkbox>
<el-checkbox-group v-model="multipleSelection" @change="handleCheckedCitiesChange">
<ul class="ulOne" v-for="(item, key) in characterList" :key="key">
<li>
<el-checkbox class="checkbox" :label="item.id" :key="item.id"></el-checkbox>
</li>
<li>
<dl>
<dt>
<img :src="item.img" alt="" v-if="item.img">
<img src="../../../assets/img/pic_user.png" alt="" v-else>
</dt>
<dd>
<ul>
<li>{{ item.keyword }}</li>
<li>创建时间:{{ item.foundertime }}</li>
<li>{{ item.description }}</li>
</ul>
</dd>
</dl>
</li>
<li>已确认</li>
<li>
<el-button type="success" size="mini" icon="el-icon-search" @click="goOrganDetail(item)">查看</el-button>
<el-button type="danger" size="mini" icon="el-icon-delete" @click="deleteEntity(item, key)">删除</el-button>
</li>
</ul>
</el-checkbox-group>
</div>
<pagination v-if="totalNum>0" :total="totalNum" @pagesize="pagesizeFun" @currentPage="currentPageFun"></pagination>
<div class="noDataPic" style="text-align:center;" v-if="totalNum === 0">
......@@ -94,18 +102,28 @@ import {
namedEntityListAPI,
addNamedEntityAPI,
showNamedEntityAPI,
finallyAddOrganNamedEntityAPI
finallyAddOrganNamedEntityAPI,
deleteEntityAPI
} from '@/api/storagemodule'
import pagination from '@/components/pagination/pagination'
import { operationMsg, confirm } from '@/utils/publicFunctions'
export default {
name: 'characterentry',
components:{pagination},
data() {
return {
checkAll: false,
isIndeterminate: true,
multipleSelection: [],//选中的
allIds: [], //所有的
dialogFormVisible: false,
dialogFormVisible1: false,
formLabelWidth: '92px',
formLabelWidth1: '120px',
deleteEntityForm: {
entityid: [],
state: 2
},
form: {
keyword: '',
state: 2
......@@ -231,6 +249,20 @@ export default {
console.log(res, 'uiui');
if (res.data.code === 0) {
this.characterList = res.data.data.list;
this.allIds = [];
if (res.data.data.list && res.data.data.list.length > 0) {
res.data.data.list.map((item, index) => {
this.allIds.push(item.id)
})
}
this.characterList.map((item, index) => {
this.$set(item, 'confirmstateVal', null)
if (item.confirmstate === 0) {
item.confirmstateVal = '待确认'
} else {
item.confirmstateVal = '已确认'
}
})
this.totalNum = res.data.data.total;
} else {
this.$message.error('人物实体列表数据获取错误')
......@@ -335,6 +367,56 @@ export default {
},
searchByKeyword() {
this.getNamedEntityListAPI();
},
handleCheckAllChange(val) {
//val是true或false
this.multipleSelection = val ? this.allIds : [];
this.isIndeterminate = false;
},
handleCheckedCitiesChange(value) {
console.log(value, "1111111111")
let checkedCount = value.length;
this.checkAll = checkedCount === this.allIds.length;
this.isIndeterminate = checkedCount > 0 && checkedCount < this.allIds.length;
},
deleteEntity(item, key) {
this.deleteEntityForm.entityid = [];
this.deleteEntityForm.entityid.push(item.id)
confirm.apply(this, ['确认删除当前条目吗?']).then(() => {
deleteEntityAPI(this.deleteEntityForm)
.then(res => {
console.log(res, '()()()(')
if (res.data.code === 0) {
this.characterList.splice(key, 1);
this.$message.success('删除实体成功');
this.getNamedEntityListAPI();
} else {
this.$message.error('删除实体失败')
}
})
})
},
batchDelete() {
this.deleteEntityForm.entityid = [];
if (this.multipleSelection.length > 0) {
this.deleteEntityForm.entityid = [];
this.deleteEntityForm.entityid = this.multipleSelection;
confirm.apply(this, ['确认删除当前这些条目吗?']).then(() => {
deleteEntityAPI(this.deleteEntityForm)
.then(res => {
console.log(res, '()()()(')
if (res.data.code === 0) {
this.$message.success('删除实体成功');
this.multipleSelection = [];
this.getNamedEntityListAPI();
} else {
this.$message.error('删除实体失败')
}
})
})
} else {
this.$message.warning("请先至少选择一条需要删除的条目");
}
}
}
}
......@@ -381,7 +463,7 @@ export default {
}
.contentBoxTop {
float:right;
margin-top:-6px;
margin-top:9px;
span {
color:#222222;
font-size:16px;
......@@ -401,8 +483,9 @@ export default {
align-items:center;
li {
list-style:none;
&:nth-of-type(1) {
&:nth-of-type(2) {
flex:1;
margin-left:10px;
dl {
display:flex;
align-items: center;
......@@ -441,13 +524,21 @@ export default {
}
&:nth-of-type(3) {
line-height:22px;
width:initial;
height:initial;
text-align:initial;
background:initial;
font-size:14px;
color:#5B616D;
border-radius:initial;
margin:initial;
}
}
}
}
}
}
&:nth-of-type(2) {
&:nth-of-type(3) {
width:60px;
height:22px;
text-align:center;
......@@ -458,6 +549,15 @@ export default {
border-radius:5px;
margin:0 20px 0 40px;
}
&:nth-of-type(4) {
.el-button {
display:block;
&:nth-of-type(2) {
margin-left:initial;
margin-top:10px;
}
}
}
}
}
}
......@@ -465,9 +565,9 @@ export default {
color:#62738D;
border-bottom: 1px solid #DCE1E9;
border-top: 1px solid #DCE1E9;
padding:15px 20px 0;
margin:0px 0 -26px;
height:46px;
line-height:46px;
background:#F9FAFC;
.el-button--success.is-plain{
color: #62738D !important;
......
......@@ -27,9 +27,9 @@
class="upload-demo"
drag>
<img :src="`${this.domain}${this.requestPath.file}?fileName=${this.formData.fileName}&isOnLine=true`" alt="" v-if="formData.fileName && this.$route.query.resourceType === '2'" style="width:auto; height:100%;">
<p v-else-if="formData.name && this.$route.query.resourceType == 1 || this.$route.query.oid">{{ formData.name }}</p>
<p v-else-if="formData.name && this.$route.query.resourceType == 3 || this.$route.query.oid">{{ formData.name }}</p>
<p v-else-if="formData.name && this.$route.query.resourceType == 4 || this.$route.query.oid">{{ formData.name }}</p>
<p v-else-if="uploadFileName && this.$route.query.resourceType == 1 || this.$route.query.oid">{{ uploadFileName }}</p>
<p v-else-if="uploadFileName && this.$route.query.resourceType == 3 || this.$route.query.oid">{{ uploadFileName }}</p>
<p v-else-if="uploadFileName && this.$route.query.resourceType == 4 || this.$route.query.oid">{{ uploadFileName }}</p>
<div v-else>
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
......@@ -231,6 +231,7 @@ export default {
copyright: '',
score: null
},
uploadFileName: null,
rulesOne: {
name: [
{ required: true, message: '请输入题名', trigger: 'blur' },
......@@ -378,7 +379,7 @@ export default {
this.formData.size = response.size;
this.formData.suffix = response.suffixName;
this.formData.fileName = response.fileName;
this.formData.name = response.originalFileName;
this.uploadFileName = response.originalFileName;
this.formData.pdfName = response.pdfPath;
},
getresourceDiyTypeList() { //获取资源分类的数据
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论