From 884ad944d947738efe407f7388dd5c32b02fd5a7 Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期四, 25 四月 2024 11:18:33 +0800
Subject: [PATCH] 2
---
src/views/systemSetting/encodeManage/index.vue | 192 ++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 185 insertions(+), 7 deletions(-)
diff --git a/src/views/systemSetting/encodeManage/index.vue b/src/views/systemSetting/encodeManage/index.vue
index 62b78c9..548b941 100644
--- a/src/views/systemSetting/encodeManage/index.vue
+++ b/src/views/systemSetting/encodeManage/index.vue
@@ -1,21 +1,199 @@
<template>
- <div class="container"></div>
+ <div class="silkStandardSetting-container">
+ <div class="filter-card">
+ <CommonSearch :show-add="false" :amount-view="false" placeholder="璇疯緭鍏ュ叧閿瘝" @searchClick="onFilterSearch">
+ <template slot="leftButton">
+ <el-button size="small" type="primary" @click="addBtnClick" >鏂板</el-button>
+ <el-button size="small" type="primary" >鍒犻櫎</el-button>
+ <el-button size="small" type="primary" @click="addBtnClick" >淇敼</el-button>
+ <el-button size="small" type="primary" @click="refreshClick">鍒锋柊</el-button>
+ </template>
+ </CommonSearch>
+ </div>
+ <div class="body-card">
+ <!-- <div class="edit-save">
+ <div class="edit-save-icon" @click="editSaveClick">
+ <i :class="isEdit ? 'el-icon-unlock' : 'el-icon-lock'"></i>
+ </div>
+ <div class="edit-sace-label">{{ isEdit ? "閿佸畾淇濆瓨" : "鐣岄潰璁捐" }}</div>
+ </div> -->
+ <div class="list-view">
+ <SilkTableList
+ :detail-enter="isEdit"
+ :silk-table-list="silkTableList"
+ @inputContent="inputContent"
+ @addProjectClick="addBtnClick"
+ @clearupProject="clearupProject"
+ @deleteClick="clearupProject"
+ @addColumnClick="addColumnClick"
+ @clearupColumn="clearupColumn"
+ >
+ </SilkTableList>
+ </div>
+ <div class="btn-pager">
+ <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
+ </div>
+ </div>
+ </div>
</template>
<script>
+import SilkTableList from "@/views/systemSetting/workshopManage/components/silkTableList"
+import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
export default {
name: "encodeManage",
props: {},
- components: {},
- mixins: [],
+ components: { SilkTableList },
+ mixins: [pageMixin],
computed: {},
data() {
- return {}
+ return {
+ isEdit: false,
+ silkTableList: {},
+ tableData: [],
+ tableColumn: [
+ { label: "缂栫爜鍚嶇О", prop: "projectName", projectName: true },
+ { label: "缂栫爜绫诲瀷", prop: "start", inputFloat: true },
+ { label: "鎻忚堪", prop: "end", inputFloat: true },
+ ],
+ columnNum: 0,
+ dataObj: {
+ projectName: "",
+ start: 0,
+ end: 0,
+ price1: 0,
+ price2: 0,
+ price3: 0
+ }
+ }
},
- created() {},
- methods: {}
+ created() {
+ this.setTableForm()
+ },
+ methods: {
+ setTableForm() {
+ this.silkTableList = {
+ tableData: this.tableData,
+ isReturn: false,
+ tableColumn: this.tableColumn
+ }
+ },
+ // 鎼滅储
+ onFilterSearch(searchText) {
+ console.log(searchText)
+ },
+ // 鏂板
+ addBtnClick() {
+ if(this.isEdit){
+ this.$message.warning("璇峰厛淇濆瓨褰撳墠缂栬緫")
+ }else{
+ this.isEdit = true
+ // array.splice(index, 0, item)
+ this.tableData.splice(0,0,{
+ projectName: "",
+ start: 0,
+ end: 0,
+ price1: 0,
+ price2: 0,
+ price3: 0,
+ isAdd:true,
+ })
+ }
+
+
+ },
+ // 淇濆瓨
+ saveBtnClick(){
+ this.tableData.forEach((item)=>{
+ item.isAdd=false
+ })
+ this.isEdit = false
+ },
+ // 鍒锋柊
+ refreshClick() {},
+ // 鎵撳嵃
+ printClick() {},
+ // 鍒楄〃杈撳叆鍥炶皟
+ inputContent(val, prop, row) {
+ console.log(val, prop, row,"鍒楄〃鎵撳嵃鍥炶皟")
+ },
+ // 鍒犻櫎
+ clearupProject(data, index) {
+ this.tableData.splice(index, 1)
+ },
+ // 淇濆瓨缂栬緫鎸夐挳鍒囨崲
+ editSaveClick() {
+ this.isEdit = !this.isEdit
+ },
+ // 娣诲姞鍒�
+ addColumnClick() {
+ let propStr = "trends" + this.columnNum
+ this.tableColumn.splice(2, 0, { label: "", prop: propStr, inputFloat: true, addColumn: true })
+ this.$set(this.dataObj, propStr, 0)
+ this.silkTableList.tableColumn = this.tableColumn
+ this.columnNum += 1
+ },
+ // 鍒犻櫎鍒�
+ clearupColumn(prop) {
+ let currentIndex = 0
+ this.tableColumn.map((item, index) => {
+ if (item.prop == prop) {
+ currentIndex = index
+ }
+ })
+ this.tableColumn.splice(currentIndex, 1)
+ this.silkTableList.tableColumn = this.tableColumn
+ this.$delete(this.dataObj, prop)
+ }
+ }
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
-<style lang="scss" scoped></style>
+<style lang="scss" scoped>
+.silkStandardSetting-container {
+ height: 100%;
+ .filter-card {
+ margin: 20px 30px;
+ height: 80px;
+ display: flex;
+ align-items: center;
+ padding: 0 20px 0 20px;
+ border-radius: 4px;
+ background-color: #fff;
+ }
+ .body-card {
+ margin: 0 30px;
+ background-color: #fff;
+ padding: 10px 15px;
+ height: calc(100% - 180px);
+ border-radius: 4px;
+ .edit-save {
+ display: flex;
+ align-items: center;
+ margin-bottom: 10px;
+ .edit-save-icon {
+ font-size: 24px;
+ color: #5582f3;
+ cursor: pointer;
+ }
+ .edit-sace-label {
+ margin-left: 10px;
+ font-size: 14px;
+ color: #000000d8;
+ }
+ }
+ }
+}
+.list-view {
+ height: calc(100% - 60px);
+ overflow: hidden;
+}
+.btn-pager {
+ display: flex;
+ margin-top: 10px;
+ .page {
+ margin-left: auto;
+ }
+}
+</style>
--
Gitblit v1.8.0