Commit 337b257c authored by zenglun's avatar zenglun

提交代码

parent ad27dc7b
...@@ -27,28 +27,42 @@ ...@@ -27,28 +27,42 @@
</div> </div>
<span class="content-number">{{ serialNumber(index) }}</span> <span class="content-number">{{ serialNumber(index) }}</span>
</li> </li>
<li class="content-name" @click="showProduct(item, index)">{{ item.name }}</li> <li class="content-name" @click="showProduct(item, index)">
{{ item.name }}
</li>
<li class="content-time">{{ item.update_time | formatTime }}</li> <li class="content-time">{{ item.update_time | formatTime }}</li>
<li class="content-chain"> <li class="content-chain">
<div class="content-the-above-link" v-if="item.status === 2">已上链</div> <div class="content-the-above-link" v-if="item.status === 2">
已上链
</div>
<div <div
class="content-on-the-chain" class="content-on-the-chain"
v-if="item.status === 0" v-if="item.status === 0"
@click="$emit('upload', item)" @click="$emit('upload', item)"
>点击上链</div> >
点击上链
</div>
<div v-if="item.status === 1" class="content-status-ing">上链中</div> <div v-if="item.status === 1" class="content-status-ing">上链中</div>
<div <div
v-if="item.status === 3" v-if="item.status === 3"
class="content-status--fail" class="content-status--fail"
@click="$emit('upload', item)" @click="$emit('upload', item)"
>上链失败</div> >
<div v-if="item.status === 4" class="content-the-above-link">隐藏中</div> 上链失败
<div v-if="item.status === 5" class="content-the-above-link">已隐藏</div> </div>
<div v-if="item.status === 4" class="content-the-above-link">
隐藏中
</div>
<div v-if="item.status === 5" class="content-the-above-link">
已隐藏
</div>
<div <div
v-if="item.status === 6" v-if="item.status === 6"
class="content-status--fail" class="content-status--fail"
@click="$emit('privacy-settings', item)" @click="$emit('privacy-settings', item)"
>隐藏失败</div> >
隐藏失败
</div>
</li> </li>
<li class="content-search"> <li class="content-search">
<div class="block"> <div class="block">
...@@ -63,7 +77,11 @@ ...@@ -63,7 +77,11 @@
]" ]"
></i> ></i>
<!-- 浮动弹框 --> <!-- 浮动弹框 -->
<ul class="set-menu block-ul" v-if="checkBlock === index" @mousedown.stop> <ul
class="set-menu block-ul"
v-if="checkBlock === index"
@mousedown.stop
>
<li @click="handleChain(item)">查看区块链</li> <li @click="handleChain(item)">查看区块链</li>
<li @click="CopyAddress(item)">复制存证地址</li> <li @click="CopyAddress(item)">复制存证地址</li>
</ul> </ul>
...@@ -72,7 +90,10 @@ ...@@ -72,7 +90,10 @@
</li> </li>
<li class="content-set"> <li class="content-set">
<div class="set-btn_wrapper"> <div class="set-btn_wrapper">
<i @click.stop="openSet(item, index)" class="iconfont icongengduocaozuo"></i> <i
@click.stop="openSet(item, index)"
class="iconfont icongengduocaozuo"
></i>
<ul class="set-menu" v-if="checkSet === index" @mousedown.stop> <ul class="set-menu" v-if="checkSet === index" @mousedown.stop>
<li <li
v-if="item.status === 2 || item.status === 6" v-if="item.status === 2 || item.status === 6"
...@@ -80,20 +101,28 @@ ...@@ -80,20 +101,28 @@
$emit('privacy-settings', item); $emit('privacy-settings', item);
checkSet = -1; checkSet = -1;
" "
>隐私设置</li> >
<li v-if="item.status === 2" @click="increment(item, index)">增量更新</li> 隐私设置
</li>
<li v-if="item.status === 2" @click="increment(item, index)">
增量更新
</li>
<li <li
@click=" @click="
$emit('create-copy', item); $emit('create-copy', item);
checkSet = -1; checkSet = -1;
" "
>创建副本</li> >
创建副本
</li>
<li <li
@click=" @click="
$emit('delete-goods', item); $emit('delete-goods', item);
checkSet = -1; checkSet = -1;
" "
>删除</li> >
删除
</li>
</ul> </ul>
</div> </div>
</li> </li>
...@@ -102,7 +131,11 @@ ...@@ -102,7 +131,11 @@
style="width: 100%; overflow-y: auto; max-height: 250px" style="width: 100%; overflow-y: auto; max-height: 250px"
v-show="expandTheListIndex === index" v-show="expandTheListIndex === index"
> >
<ul class="incremental-list" v-for="(item2, index2) in item.incrementList" :key="index2"> <ul
class="incremental-list"
v-for="(item2, index2) in item.incrementList"
:key="index2"
>
<li class="incremental-icon"> <li class="incremental-icon">
<i <i
class="iconfont" class="iconfont"
...@@ -111,7 +144,12 @@ ...@@ -111,7 +144,12 @@
]" ]"
></i> ></i>
</li> </li>
<li class="incremental-name" @click="enterDetails(item2, item, index)">{{ item2.name }}</li> <li
class="incremental-name"
@click="enterDetails(item2, item, index)"
>
{{ item2.name }}
</li>
<li class="incremental-time">{{ item2.update_time | formatTime }}</li> <li class="incremental-time">{{ item2.update_time | formatTime }}</li>
<li class="incremental-state"> <li class="incremental-state">
<span v-if="item2.status === 2" class="state-ban">已上链</span> <span v-if="item2.status === 2" class="state-ban">已上链</span>
...@@ -119,7 +157,8 @@ ...@@ -119,7 +157,8 @@
v-if="item2.status === 0" v-if="item2.status === 0"
class="state-start" class="state-start"
@click="$emit('incremental-chain', item2, item)" @click="$emit('incremental-chain', item2, item)"
>点击上链</span> >点击上链</span
>
<span v-if="item2.status === 1" class="state-ing">上链中</span> <span v-if="item2.status === 1" class="state-ing">上链中</span>
<span v-if="item2.status === 3" class="state-fail">上链失败</span> <span v-if="item2.status === 3" class="state-fail">上链失败</span>
<span v-if="item2.status === 5" class="state-ing">已隐藏</span> <span v-if="item2.status === 5" class="state-ing">已隐藏</span>
...@@ -133,7 +172,8 @@ ...@@ -133,7 +172,8 @@
:class="{ :class="{
'span-ban': item2.status === 1 || item2.status === 2, 'span-ban': item2.status === 1 || item2.status === 2,
}" }"
>删除</span> >删除</span
>
<span class="span-ban">复制</span> <span class="span-ban">复制</span>
</div> </div>
</li> </li>
...@@ -155,7 +195,7 @@ export default { ...@@ -155,7 +195,7 @@ export default {
}; };
}, },
watch: { watch: {
getInfoList: function(newv, oldv) { getInfoList: function (newv, oldv) {
this.expandTheListIndex = -1; this.expandTheListIndex = -1;
if (this.$store.state.theAnchor != -1) { if (this.$store.state.theAnchor != -1) {
this.expandTheList( this.expandTheList(
...@@ -163,27 +203,26 @@ export default { ...@@ -163,27 +203,26 @@ export default {
this.$store.state.theAnchor this.$store.state.theAnchor
); );
} }
} },
}, },
computed: { computed: {
// 获取存证信息列表 // 获取存证信息列表
getInfoList: function() { getInfoList: function () {
return this.$store.state.listOfInformation; return this.$store.state.listOfInformation;
}, },
// 获取当前页码 // 获取当前页码
getPage: function() { getPage: function () {
return this.$store.state.page; return this.$store.state.page;
}, },
// 序号 // 序号
serialNumber: function(index) { serialNumber: function (index) {
return function(index) { return function (index) {
return (this.getPage - 1) * 10 + (index + 1); return (this.getPage - 1) * 10 + (index + 1);
}; };
} },
}, },
methods: { methods: {
increment(item, index) { increment(item, index) {
this.$store.commit("setTheAnchor", index);
this.$emit("increment", item); this.$emit("increment", item);
this.checkSet = -1; this.checkSet = -1;
}, },
...@@ -196,8 +235,8 @@ export default { ...@@ -196,8 +235,8 @@ export default {
query: { query: {
personalTemplateId: item.id, //父级id personalTemplateId: item.id, //父级id
personalTemplateName: item.name, // 父级name personalTemplateName: item.name, // 父级name
childId: item2.id // 当前存证id childId: item2.id, // 当前存证id
} },
}); });
}, },
// 展开增量数据列表 // 展开增量数据列表
...@@ -212,8 +251,8 @@ export default { ...@@ -212,8 +251,8 @@ export default {
params: { params: {
base_hash: item.hash, base_hash: item.hash,
page: 1, page: 1,
page_size: 10 page_size: 10,
} },
}); });
if (res) { if (res) {
let list = res.data.results; let list = res.data.results;
...@@ -242,7 +281,7 @@ export default { ...@@ -242,7 +281,7 @@ export default {
document.body.removeChild(input); document.body.removeChild(input);
this.$message({ this.$message({
message: "复制成功,请右键粘贴使用", message: "复制成功,请右键粘贴使用",
type: "success" type: "success",
}); });
}, },
// 隐藏条件选中 // 隐藏条件选中
...@@ -262,8 +301,8 @@ export default { ...@@ -262,8 +301,8 @@ export default {
this.$router.push({ this.$router.push({
path: "/editTemplate", path: "/editTemplate",
query: { query: {
personalTemplateId: item.id personalTemplateId: item.id,
} },
}); });
}, },
openSet(item, index) { openSet(item, index) {
...@@ -277,7 +316,7 @@ export default { ...@@ -277,7 +316,7 @@ export default {
this.checkBlock = index; this.checkBlock = index;
document.addEventListener("mousedown", this.onHindMenu); document.addEventListener("mousedown", this.onHindMenu);
}, },
} },
}; };
</script> </script>
...@@ -499,7 +538,7 @@ export default { ...@@ -499,7 +538,7 @@ export default {
height: 30px; height: 30px;
background: white; background: white;
padding-left: 50px; padding-left: 50px;
color: #0CC399; color: #0cc399;
i { i {
font-size: 12px; font-size: 12px;
} }
...@@ -507,6 +546,9 @@ export default { ...@@ -507,6 +546,9 @@ export default {
.incremental-name { .incremental-name {
width: 176px; width: 176px;
cursor: pointer; cursor: pointer;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
} }
.incremental-state { .incremental-state {
width: 80px; width: 80px;
...@@ -519,7 +561,7 @@ export default { ...@@ -519,7 +561,7 @@ export default {
} }
.state-start { .state-start {
font-size: 12px; font-size: 12px;
color: #0CC399; color: #0cc399;
cursor: pointer; cursor: pointer;
} }
.state-ban { .state-ban {
...@@ -546,7 +588,7 @@ export default { ...@@ -546,7 +588,7 @@ export default {
background: #fafafb; background: #fafafb;
// border: 1px solid #000; // border: 1px solid #000;
span { span {
color: #0CC399; color: #0cc399;
padding-right: 10%; padding-right: 10%;
float: right; float: right;
cursor: pointer; cursor: pointer;
......
...@@ -2,7 +2,11 @@ ...@@ -2,7 +2,11 @@
<template> <template>
<div class="new-product-list"> <div class="new-product-list">
<!-- 缺省页 --> <!-- 缺省页 -->
<default-page tips="您还未添加存证" v-if="FirstEntry" @to-add="toEditTemplate" /> <default-page
tips="您还未添加存证"
v-if="FirstEntry"
@to-add="toEditTemplate"
/>
<!-- 主体 --> <!-- 主体 -->
<div v-else class="new-product_list"> <div v-else class="new-product_list">
<!-- 头 --> <!-- 头 -->
...@@ -51,7 +55,13 @@ ...@@ -51,7 +55,13 @@
/> />
</div> </div>
<!-- 页码组件 --> <!-- 页码组件 -->
<pagination class="pager" v-model="page" :total="total" @change="pagechange" :size="10"> <pagination
class="pager"
v-model="page"
:total="total"
@change="pagechange"
:size="10"
>
<span class="pager-count">{{ Math.ceil(total / 10) }}</span> <span class="pager-count">{{ Math.ceil(total / 10) }}</span>
</pagination> </pagination>
</div> </div>
...@@ -62,7 +72,11 @@ ...@@ -62,7 +72,11 @@
@cancel="UncertifiedConfirm" @cancel="UncertifiedConfirm"
></uncertified> ></uncertified>
<!-- 增量 --> <!-- 增量 -->
<common-dialog v-if="showIncrements" @closePopup="showIncrements = false" showMask> <common-dialog
v-if="showIncrements"
@closePopup="showIncrements = false"
showMask
>
<Increments <Increments
:pre_hash="preHash" :pre_hash="preHash"
:evidenceName="localName" :evidenceName="localName"
...@@ -71,7 +85,11 @@ ...@@ -71,7 +85,11 @@
></Increments> ></Increments>
</common-dialog> </common-dialog>
<!-- 删除组件 --> <!-- 删除组件 -->
<common-dialog v-if="showDeleteDialog" @closePopup="showDeleteDialog = false" showMask> <common-dialog
v-if="showDeleteDialog"
@closePopup="showDeleteDialog = false"
showMask
>
<delete-goods <delete-goods
@CloseDg="showDeleteDialog = false" @CloseDg="showDeleteDialog = false"
:id="infoId" :id="infoId"
...@@ -80,7 +98,12 @@ ...@@ -80,7 +98,12 @@
></delete-goods> ></delete-goods>
</common-dialog> </common-dialog>
<!-- 添加存证弹窗 --> <!-- 添加存证弹窗 -->
<common-dialog v-if="isShowAdd" @closePopup="isShowAdd = false" showMask class="style-addgoods"> <common-dialog
v-if="isShowAdd"
@closePopup="isShowAdd = false"
showMask
class="style-addgoods"
>
<add-goods @cancel="isShowAdd = false"></add-goods> <add-goods @cancel="isShowAdd = false"></add-goods>
</common-dialog> </common-dialog>
<!-- copyGoods --> <!-- copyGoods -->
...@@ -90,23 +113,38 @@ ...@@ -90,23 +113,38 @@
showMask showMask
class="style-addgoods" class="style-addgoods"
> >
<copy-goods @close="isShowCopy = false" :Copydetails="Copydetails" @update="getList"></copy-goods> <copy-goods
@close="isShowCopy = false"
:Copydetails="Copydetails"
@update="getList"
></copy-goods>
</common-dialog> </common-dialog>
<!-- prompt --> <!-- prompt -->
<common-dialog showMask v-if="PromptShow" @closePopup="PromptShow = false"> <common-dialog showMask v-if="PromptShow" @closePopup="PromptShow = false">
<prompt tip="确定要隐藏该条记录吗" @close="PromptShow = false" @confirm="hiddenCertificate" /> <prompt
tip="确定要隐藏该条记录吗"
@close="PromptShow = false"
@confirm="hiddenCertificate"
/>
</common-dialog> </common-dialog>
<!-- 增量弹窗 --> <!-- 增量弹窗 -->
<div class="chain-dialog" v-show="isShowToChainDialog"> <div class="chain-dialog" v-show="isShowToChainDialog">
<div class="chain-mask" @click="isShowToChainDialog = false"></div> <div class="chain-mask" @click="isShowToChainDialog = false"></div>
<div class="chain-content"> <div class="chain-content">
<i class="iconfont iconjiufuqianbaoicon08" @click="isShowToChainDialog = false"></i> <i
class="iconfont iconjiufuqianbaoicon08"
@click="isShowToChainDialog = false"
></i>
<img src="../../../../assets/images/category/chain_notice.png" /> <img src="../../../../assets/images/category/chain_notice.png" />
<div class="part-bottom"> <div class="part-bottom">
<h3>上链提示</h3> <h3>上链提示</h3>
<p class="line-one">信息上链后,即将展示在区块链上以作永恒记录,如有虚假,</p> <p class="line-one">
信息上链后,即将展示在区块链上以作永恒记录,如有虚假,
</p>
<p class="line-two">登记⽅需⾃愿承担由此产⽣的⼀切后果。</p> <p class="line-two">登记⽅需⾃愿承担由此产⽣的⼀切后果。</p>
<div class="chain-btn" @click.stop="Confirm(TheIncrementalData)">确定上链</div> <div class="chain-btn" @click.stop="Confirm(TheIncrementalData)">
确定上链
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -137,7 +175,7 @@ export default { ...@@ -137,7 +175,7 @@ export default {
deleteGoods, deleteGoods,
Uncertified, Uncertified,
copyGoods, copyGoods,
prompt prompt,
}, },
data() { data() {
return { return {
...@@ -166,7 +204,7 @@ export default { ...@@ -166,7 +204,7 @@ export default {
isShowCopy: false, isShowCopy: false,
Copydetails: {}, Copydetails: {},
PromptShow: false, PromptShow: false,
PromptID: -1 PromptID: -1,
}; };
}, },
created() { created() {
...@@ -200,15 +238,15 @@ export default { ...@@ -200,15 +238,15 @@ export default {
type: "POST", type: "POST",
url: GO_URLS.deleteBlockChainProof, url: GO_URLS.deleteBlockChainProof,
params: { params: {
id: this.PromptID id: this.PromptID,
} },
}); });
if (res) { if (res) {
this.getList(); this.getList();
this.PromptShow = false; this.PromptShow = false;
this.$message({ this.$message({
type: "success", type: "success",
message: "隐藏成功!" message: "隐藏成功!",
}); });
} }
}, },
...@@ -260,7 +298,7 @@ export default { ...@@ -260,7 +298,7 @@ export default {
} else { } else {
this.$message({ this.$message({
message: "增量数据未上链,无法继续增量", message: "增量数据未上链,无法继续增量",
type: "warning" type: "warning",
}); });
} }
}, },
...@@ -271,7 +309,7 @@ export default { ...@@ -271,7 +309,7 @@ export default {
this.$confirm("此操作将永久删除该存证, 是否继续?", "提示", { this.$confirm("此操作将永久删除该存证, 是否继续?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning",
}) })
.then(() => { .then(() => {
that.deleteIncremental(item.id); that.deleteIncremental(item.id);
...@@ -279,7 +317,7 @@ export default { ...@@ -279,7 +317,7 @@ export default {
.catch(() => { .catch(() => {
this.$message({ this.$message({
type: "info", type: "info",
message: "已取消删除" message: "已取消删除",
}); });
}); });
}, },
...@@ -299,13 +337,13 @@ export default { ...@@ -299,13 +337,13 @@ export default {
async deleteIncremental(id) { async deleteIncremental(id) {
const res = await this.$ajax({ const res = await this.$ajax({
type: "delete", type: "delete",
url: GO_URLS.deleteIncrement + `/` + id url: GO_URLS.deleteIncrement + `/` + id,
}); });
if (res) { if (res) {
this.getList(); this.getList();
this.$message({ this.$message({
type: "success", type: "success",
message: "删除成功!" message: "删除成功!",
}); });
} }
}, },
...@@ -330,12 +368,12 @@ export default { ...@@ -330,12 +368,12 @@ export default {
const res = await this.$ajax({ const res = await this.$ajax({
type: "post", type: "post",
url: GO_URLS.sendBlockIncrementChain, url: GO_URLS.sendBlockIncrementChain,
params: { id: this.TheIncrementalData.id } params: { id: this.TheIncrementalData.id },
}); });
if (res) { if (res) {
this.$message({ this.$message({
type: "success", type: "success",
message: "上链信息提交成功!" message: "上链信息提交成功!",
}); });
this.isShowToChainDialog = false; this.isShowToChainDialog = false;
this.getList(); this.getList();
...@@ -356,12 +394,12 @@ export default { ...@@ -356,12 +394,12 @@ export default {
const res = await this.$ajax({ const res = await this.$ajax({
type: "post", type: "post",
url: GO_URLS.sendBlockChian, url: GO_URLS.sendBlockChian,
params: { id: this.infoId } params: { id: this.infoId },
}); });
if (res) { if (res) {
this.$message({ this.$message({
type: "success", type: "success",
message: "上链信息提交成功!" message: "上链信息提交成功!",
}); });
this.isShowToChainDialog = false; this.isShowToChainDialog = false;
this.getList(); this.getList();
...@@ -375,7 +413,7 @@ export default { ...@@ -375,7 +413,7 @@ export default {
this.$emit("update"); this.$emit("update");
this.$message({ this.$message({
type: "success", type: "success",
message: "删除存证成功!" message: "删除存证成功!",
}); });
}, },
// 展开删除存证弹窗 // 展开删除存证弹窗
...@@ -392,18 +430,19 @@ export default { ...@@ -392,18 +430,19 @@ export default {
is_valid: 0, //可用 is_valid: 0, //可用
page: this.page, page: this.page,
key_words: this.searchvalue, key_words: this.searchvalue,
page_size: 10 page_size: 10,
}; };
const res = await this.$ajax({ const res = await this.$ajax({
type: "post", type: "post",
url: GO_URLS.list, url: GO_URLS.list,
params params,
}); });
if (res) { if (res) {
this.total = res.data.total; this.total = res.data.total;
this.$store.commit("setListOfInformation", res.data.results || []); this.$store.commit("setListOfInformation", res.data.results || []);
this.$store.commit("setGoodsNum", res.data.total); this.$store.commit("setGoodsNum", res.data.total);
this.$store.commit("setPage", this.page); this.$store.commit("setPage", this.page);
this.$store.commit("setTheAnchor", -1);
if (!res.data.results && !this.isFirst) { if (!res.data.results && !this.isFirst) {
if (this.isFirst) return; if (this.isFirst) return;
this.FirstEntry = true; this.FirstEntry = true;
...@@ -461,8 +500,8 @@ export default { ...@@ -461,8 +500,8 @@ export default {
// 添加存证 // 添加存证
toEditTemplate() { toEditTemplate() {
this.isShowAdd = true; this.isShowAdd = true;
} },
} },
}; };
</script> </script>
...@@ -483,7 +522,7 @@ export default { ...@@ -483,7 +522,7 @@ export default {
width: 120px; width: 120px;
height: 36px; height: 36px;
cursor: pointer; cursor: pointer;
background: #0CC399; background: #0cc399;
box-shadow: 0px 2px 10px 0px rgba(30, 15, 255, 0.14), box-shadow: 0px 2px 10px 0px rgba(30, 15, 255, 0.14),
0px 2px 10px 0px rgba(140, 255, 229, 0.32); 0px 2px 10px 0px rgba(140, 255, 229, 0.32);
border-radius: 18px; border-radius: 18px;
...@@ -958,7 +997,7 @@ export default { ...@@ -958,7 +997,7 @@ export default {
.chain-content .part-bottom .chain-btn { .chain-content .part-bottom .chain-btn {
font-size: 14px; font-size: 14px;
color: white; color: white;
background-color: #0CC399; background-color: #0cc399;
border-radius: 4px; border-radius: 4px;
width: 120px; width: 120px;
height: 40px; height: 40px;
......
...@@ -1053,6 +1053,10 @@ export default class editTemplate extends Vue { ...@@ -1053,6 +1053,10 @@ export default class editTemplate extends Vue {
color: white; color: white;
background: #0cc399; background: #0cc399;
border: 1px solid #0cc399; border: 1px solid #0cc399;
max-width: 200px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
} }
li { li {
list-style: none; list-style: none;
...@@ -1066,6 +1070,10 @@ export default class editTemplate extends Vue { ...@@ -1066,6 +1070,10 @@ export default class editTemplate extends Vue {
border-radius: 5px; border-radius: 5px;
margin-right: 10px; margin-right: 10px;
line-height: 34px; line-height: 34px;
max-width: 200px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
i { i {
color: white; color: white;
} }
...@@ -1309,6 +1317,9 @@ export default class editTemplate extends Vue { ...@@ -1309,6 +1317,9 @@ export default class editTemplate extends Vue {
.header-title { .header-title {
margin-left: 31px; margin-left: 31px;
/deep/.input_text {
max-width: 300px;
}
} }
.header-select { .header-select {
float: right; float: right;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment