Commit 3aa0e826 authored by zenglun's avatar zenglun

提交部分代码

parent 09a94d26
......@@ -188,7 +188,7 @@ input:focus {
color: rgba(92, 100, 118, 1);
}
.btn-determine {
background: rgba(63, 121, 254, 1);
background: #0cc399;
color: white;
}
</style>
......
<template>
<div class="category-add">
<h2 class="dialog_add-title">增量更新</h2>
<dialog-input
class="dialog_add-form dialog_add-input_name"
v-model="name"
:errorShowing="isErrorShowing"
placeholder="请输入增量名称"
/>
<button class="dialog_add-btn_confirm" @click="checkForm">确定</button>
<button class="dialog_add-btn_cancel" @click="closeDialog">取消</button>
</div>
</template>
<script lang="ts">
import Vue from "vue";
import DialogInput from "@/components/DialogInput.vue";
import * as storage from "@/plugins/storage";
import { Prop, Component } from "vue-property-decorator";
import { GO_URLS } from "@/config/URLS";
@Component({
components: {
DialogInput,
},
})
export default class CategoryAdd extends Vue {
@Prop() pre_hash!: string;
@Prop() evidenceName!: string;
name: string = "";
isErrorShowing: Boolean = false;
isInActive: Boolean = false;
// 获取基准值
get getDepositCertificate() {
return this.$store.state.depositCertificate;
}
async checkForm() {
if (this.isInActive) return;
this.isInActive = true;
this.isErrorShowing = true;
// 追加非空验证
if (this.name.trim().length === 0) {
this.$message({
showClose: true,
message: "名称不可为空",
type: "warning",
});
this.isInActive = false;
return null;
}
// else if (this.name.trim().length > 10) {
// this.$message({
// showClose: true,
// message: "增量名称长度不可大于10",
// type: "warning",
// });
// return false;
// }
const data = await this.$ajax({
type: "post",
url: GO_URLS.increment,
params: {
base_id: this.getDepositCertificate.base_id, //基础存证id
base_hash: this.getDepositCertificate.base_hash, //基础存证哈希
name: this.name,
pre_hash: this.pre_hash, //上一条存证哈希
note: JSON.stringify({
version: 1,
userName: this.$store.state.userInfos.user || "",
userIcon: this.$store.state.userInfos.icon || "",
evidenceName: this.evidenceName,
stepName: this.name,
banners: [],
}),
detail: JSON.stringify([
{
label: "ext",
key: "",
type: 3,
data: [
{
data: {
type: "text",
format: "string",
value: this.name,
},
type: 0,
key: "存证名称",
label: "存证名称",
},
{
data: {
type: "text",
format: "hash",
value: this.getDepositCertificate.base_hash,
},
type: 0,
key: "basehash",
label: "basehash",
},
{
data: {
type: "text",
format: "hash",
value: this.pre_hash,
},
type: 0,
key: "prehash",
label: "prehash",
},
{
data: {
type: "text",
format: "string",
value: this.name,
},
type: 0,
key: "存证类型",
label: "存证类型",
},
],
},
{},
]),
},
});
if (data) {
this.$message({
message: "增量更新成功",
type: "success",
});
// this.$store.commit("setTheAnchor", index);
this.$router.push({
path: "/editTemplate",
query: {
personalTemplateId: this.getDepositCertificate.base_id, //父级id
personalTemplateName: this.evidenceName, // 父级name
childId: data.data.id, // 当前存证id
},
});
}
this.isInActive = false;
}
// 关闭弹窗
async closeDialog() {
this.$emit("close", {});
}
}
</script>
<style scoped lang="less">
.category-add {
padding: 34px 50px 0 50px;
height: 221px; /* 325px - 34px */
width: 500px; /* 600px - 100px */
}
.dialog_add-title {
margin: 0;
color: #000;
font-size: 22px;
line-height: 30px;
}
.dialog_add-select_subject {
margin-top: 29px;
}
.dialog_add-input_name {
margin: 20px 0 34px 0;
}
.dialog_add-btn_confirm {
float: right;
width: 120px;
height: 40px;
color: #fff;
font-size: 14px;
outline: none;
background: #0CC399;
border-radius: 4px;
border: none;
cursor: pointer;
}
.dialog_add-btn_cancel {
float: right;
margin-right: 18px; /* 28 - 10 */
border: none;
width: 48px; /* 28 + 增大20 */
height: 40px;
outline: none;
background: #fff;
color: #5c6476;
font-size: 14px;
cursor: pointer;
}
</style>
......@@ -7,7 +7,7 @@
<li class="list-name">存证名称</li>
<li class="list-time">操作日期</li>
<li class="list-chain">上链</li>
<li class="list-qrcode">二维码</li>
<!-- <li class="list-qrcode">二维码</li> -->
<li class="list-search">区块链查询</li>
<li class="list-set">操作</li>
</ul>
......@@ -51,7 +51,7 @@
@click="$emit('privacy-settings', item)"
>隐藏失败</div>
</li>
<li class="content-qrcode">
<!-- <li class="content-qrcode">
<div class="content-code-box">
<div class="icon-box">
<i
......@@ -75,7 +75,7 @@
</div>
</div>
</div>
</li>
</li> -->
<li class="content-search">
<div class="block">
<div class="icon-box">
......@@ -383,12 +383,12 @@ export default {
width: 70px;
height: 25px;
line-height: 25px;
background: #E3FFF8;
background: #e3fff8;
border-radius: 4px;
text-align: center;
font-size: 12px;
cursor: pointer;
color: #0CC399;
color: #0cc399;
margin: 0 auto;
margin-top: 14px;
}
......@@ -550,7 +550,7 @@ export default {
}
}
.iconerweima--check {
color: #0CC399;
color: #0cc399;
cursor: pointer;
}
.iconerweima--no-check {
......
......@@ -119,12 +119,12 @@ import CommonDialog from "@/components/CommonDialog.vue";
import Pagination from "@/components/Pagination.vue";
import defaultPage from "@/components/newProductList/defaultPage.vue";
import IncrementalDataList from "../../components/incrementalDataList/incrementalDataList.vue"; //增量数据列表
import Increments from "@/components/newProductList/increment.vue"; // 增量
import Increments from "../increment/increment.vue"; // 增量
import AddGoods from "@/components/category/addGoods.vue"; // 添加存证
import deleteGoods from "@/components/category/deleteGoods.vue"; // 删除组件
import Uncertified from "@/components/Uncertified.vue"; // 未认证提示组件
import copyGoods from "@/components/newProductList/copyGoods.vue";
import prompt from "@/components/newProductList/prompt.vue";
import prompt from "../prompt/prompt.vue";
export default {
components: {
......
<template>
<section>
<h2 class="dialog-title">提示</h2>
<p class="dialog-tip">{{ tip }}</p>
<button class="dialog_btn_confirm" @click="checkForm">确定</button>
<button class="dialog_btn_cancel" @click="closeDialog">取消</button>
</section>
</template>
<script>
export default {
props: ["tip"],
methods: {
checkForm() {
this.$emit("confirm");
},
closeDialog() {
this.$emit("close");
},
},
};
</script>
<style lang="less" scoped>
section {
width: 535px;
height: 285px;
background: #ffffff;
box-shadow: 0px 0px 20px 0px rgba(61, 118, 249, 0.18);
}
.dialog-title {
padding-left: 44px;
padding-top: 34px;
color: #000;
font-size: 22px;
}
.dialog-tip {
text-align: center;
padding-top: 48px;
font-size: 22px;
padding-bottom: 54px;
}
.dialog_btn_confirm {
float: right;
width: 120px;
height: 40px;
color: #fff;
font-size: 14px;
margin-right: 50px;
outline: none;
background: #0CC399;
border-radius: 4px;
border: none;
cursor: pointer;
}
.dialog_btn_cancel {
float: right;
margin-right: 18px; /* 28 - 10 */
border: none;
width: 48px; /* 28 + 增大20 */
height: 40px;
outline: none;
background: #fff;
color: #5c6476;
font-size: 14px;
cursor: pointer;
}
</style>
\ No newline at end of file
......@@ -61,10 +61,6 @@
<!-- 已删除 -->
<deleted :ToUpdate="ToUpdate"></deleted>
</div>
<!-- 引导页 -->
<common-dialog showMask2 close class="cdg-boot-page" v-if="showbootPage">
<boot-page @close="showbootPage = false"></boot-page>
</common-dialog>
</div>
</template>
......@@ -77,14 +73,12 @@ import productList from "../../components/productList/productList.vue";
//删除页
import deleted from "@/views/category/deleted.vue";
// 引导页
import bootPage from "@/components/bootPage.vue";
import CommonDialog from "@/components/CommonDialog.vue";
@Component({
components: {
productList,
TemplateManage,
deleted,
bootPage,
CommonDialog,
},
})
......@@ -92,17 +86,11 @@ export default class Template extends Vue {
[x: string]: any;
trigger: boolean = false;
ToUpdate: boolean = false;
showbootPage: Boolean = false;
created() {
this.getGoods;
this.getTemplate;
this.SelectedStatus;
}
mounted() {
if (localStorage.getItem("bootPage") === "show") {
this.showbootPage = true;
}
}
update() {
this.ToUpdate = !this.ToUpdate;
}
......@@ -136,11 +124,6 @@ export default class Template extends Vue {
}
</script>
<style scoped lang="less">
.cdg-boot-page {
/deep/.dialog_content {
border-radius: 10px !important;
}
}
.category {
display: flex;
height: 100%;
......@@ -169,7 +152,7 @@ export default class Template extends Vue {
color: rgba(53, 53, 53, 1);
}
.title__check {
color: #4a90e2;
color: #0CC399;
}
.num {
font-size: 12px;
......
......@@ -617,7 +617,6 @@ export default class editTemplate extends Vue {
message: "编辑成功",
type: "success"
});
this.$router.push("/categoryManage");
}
}
// 模板>新存证
......@@ -696,7 +695,6 @@ export default class editTemplate extends Vue {
message: "创建成功",
type: "success"
});
this.$router.push("/categoryManage");
}
}
// 展示修改标题弹窗
......
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