Blame view

src/views/system/setobject/index.vue 3.38 KB
be966eff   jack   1.添加文件
1
  <template>
a61d16e2   jack   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
    <div>
      <Dec :content="content" />
      <div class="setobject">
        <div class="top-box">
          <el-row>
            <el-col :span="12">
              <el-button type="primary">添加</el-button>
              <el-button type="primary">批量添加</el-button>
              <el-button type="primary">批量导出</el-button>
              <el-button type="danger">删除</el-button>
            </el-col>
            <el-col :span="12">
              <el-input
                v-model="searchtext"
                placeholder="试卷名称、编号"
                style="width:220px;float:right"
              >
                <i slot="suffix" class="el-input__icon el-icon-search" @click="search" />
              </el-input>
            </el-col>
          </el-row>
        </div>
  
        <el-row style="height:calc(100% - 56px);">
          <el-col :span="6" style="height:100%;border-right:1px solid #eee">
            <ListBox
              ref="listbox"
              title="学制"
              title-bg="#ccc"
              :data="listData"
              active-color="rgb(64, 158, 255)"
              :acitve-index="1"
              @clicklist="clicklist"
              @removelist="removelist"
            />
          </el-col>
          <el-col :span="18" style="padding:10px;">
            <el-table
              :data="tableData"
              style="width: 100%"
            >
              <el-table-column
                type="selection"
                width="55"
              />
              <el-table-column
                prop="no"
                label="序号"
                width="50"
              />
              <el-table-column
                prop="schoollength"
                label="学制"
              />
              <el-table-column
                prop="subjectno"
                label="科目编号"
              />
              <el-table-column
                prop="subject"
                label="科目"
              />
              <el-table-column
                prop="user"
                label="添加者"
              />
              <el-table-column label="操作">
                <template slot-scope="scope">
                  <el-button
                    size="mini"
                    type="danger"
                    @click="handleDelete(scope.$index, scope.row)"
                  >删除</el-button>
                </template>
              </el-table-column>
            </el-table>
          </el-col>
        </el-row>
      </div>
be966eff   jack   1.添加文件
81
82
83
    </div>
  </template>
  <script>
a61d16e2   jack   1.更新文件
84
85
  import Dec from '@/components/Dec'
  import ListBox from '@/components/ListBox'
be966eff   jack   1.添加文件
86
  export default {
a61d16e2   jack   1.更新文件
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
    name: 'Setobject',
    components: {
      Dec,
      ListBox
    },
    data() {
      return {
        content: '',
        searchtext: '',
        listData: [
          { id: 0, name: '全部(30)', removeIcon: false },
          { id: 2, name: '小学(10)' },
          { id: 3, name: '初中(20)' }
        ],
        tableData: [
          {
            no: '1',
            schoollength: '小学',
            subjectno: '0001',
            subject: '语文',
            user: '张三'
          }
        ]
      }
    },
    methods: {
      search() {
  
      },
      clicklist(index) {
        console.log(index)
      },
      removelist(index) {
        console.log(index)
      },
      handleDelete(index, row) {
  
      }
    }
be966eff   jack   1.添加文件
126
127
128
  }
  </script>
  <style scoped>
a61d16e2   jack   1.更新文件
129
130
131
132
133
134
135
136
137
138
139
140
  .setobject{
      max-width: 1100px;
      height:calc(100vh - 115px);
      margin:0 auto;
      background: #fff;
      margin-top:15px;
      padding:20px;
  }
  .top-box{
      padding-bottom: 15px;
      border-bottom: 1px solid #ccc;
  }
be966eff   jack   1.添加文件
141
  </style>