管道基础大数据平台系统开发-【前端】-新系統界面
surprise
2024-04-22 3ffbf14664836032438b1fd496aefbd99187e2c9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
<template>
  <div class="authorityManagement_box">
    <My-bread :list="['数据管理', '加密设置']"></My-bread>
    <el-divider />
    <div class="selectComp">
      <div class="title">加密/解密</div>
      <div class="checkbox">
        <el-select v-model="value" placeholder="请选择">
          <el-option
            v-for="item in options"
            :key="item.value"
            :label="item.label"
            :value="item.value"
          >
          </el-option>
        </el-select>
      </div>
    </div>
    <div class="bottom">
      <div class="title">数据文件</div>
      <div class="upload">
        <el-upload
          class="upload-demo"
          ref="upload"
          action="#"
          :on-preview="handlePreview"
          :on-remove="handleRemove"
          :on-success="handleSuccess"
          :file-list="fileList"
          :auto-upload="false"
        >
          <el-button slot="trigger" size="small" type="primary"
            >选取文件</el-button
          >
          <el-button
            style="margin-left: 10px"
            size="small"
            type="success"
            @click="submitUpload"
            >执行</el-button
          >
          <!-- <div class="btnBox">
            <el-button type="info" size="medium" @click="submitUpload"
              >确定</el-button
            >
            <el-button
              type="info"
              class="cancel"
              size="medium"
              @click="submitAbort"
              >取消</el-button
            >
          </div> -->
        </el-upload>
      </div>
    </div>
    <div class="output">
      <div class="title">输出路径</div>
      <el-input v-model="output" disabled />
    </div>
  </div>
</template>
 
<script>
import MyBread from "../../components/MyBread.vue";
export default {
  name: "encryption",
  components: { MyBread },
  data() {
    return {
      checkList: [],
      fileList: [],
      options: [
        {
          value: "1",
          label: "加密",
        },
        {
          value: "0",
          label: "解密",
        },
      ],
      value: "",
      output: "",
    };
  },
  methods: {
    submitUpload() {
      this.$refs.upload.submit();
      setTimeout(() => {
        this.output = "C:\\Users\\user\\Downloads";
      }, 2000);
    },
    handleRemove(file, fileList) {
      console.log(file, fileList);
    },
    handlePreview(file) {
      console.log(file);
    },
    handleSuccess(file) {
      console.log(file);
    },
    submitAbort() {
      //   console.log(file);
    },
  },
};
</script>
<style lang="less" scoped>
//@import url(); 引入公共css类
.authorityManagement_box {
  background: rgb(240, 242, 245);
  border-radius: 10px;
  height: 100%;
  padding: 10px;
  box-sizing: border-box;
  .selectComp {
    margin: 50px 0 0 30px;
    width: 600px;
    height: 5%;
    display: flex;
    justify-content: space-around;
    align-items: center;
    .title {
      width: 100px;
    }
    .checkbox {
      width: 500px;
    }
  }
  .bottom {
    margin: 50px 0 0 30px;
    width: 600px;
    height: 260px;
    // background-color: #fff;
    display: flex;
    .title {
      width: 100px;
    }
    .upload {
      /deep/ .el-upload-list {
        margin-top: 15px;
        // background-color: #bfa;
        overflow: auto;
        width: 500px;
        height: 200px;
        border: 1px solid rgb(126, 125, 125);
        // border-radius: 10px;
      }
    }
    // .btnBox {
    //   position: relative;
    //   top: 250px;
    //   left: 100px;
    //   width: 300px;
    //   display: flex;
    //   justify-content: space-between;
    // }
  }
  .output {
    margin: 10px 0 0 30px;
    display: flex;
    align-items: center;
    .title {
      width: 100px;
    }
    .el-input {
      width: 467px;
    }
  }
}
</style>