123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 |
- <template>
- <el-card class="box-card">
- <test v-model="formData" :form-config="formConfig" :labelWidth="60" :clearable="false" :disabled="false" :label-width="100" :span="2">
- <template v-slot:testSlot>
- {{ '测试插槽' }}
- </template>
- </test>
- </el-card>
- </template>
- <script>
- import * as API from '@/api/Internet-of-things/Industry-management.js'
- import test from '@/components/form-test'
- export default {
- name: 'Industry-management',
- components: { test },
- data() {
- return {
- formData: {
- pageNum: 1,
- pageSize: 10,
- keyword: '',
- },
- formConfig: {
- keyword: {
- label: '关键字',
- span: 6,
- },
- operation: {
- // 搜索按钮操作
- query: () => {
- this.formData.pageNum = 1
- this.getList()
- },
- // 重置按钮操作
- reset: () => {
- this.formData = { pageNum: 1, pageSize: 10, keyword: '' }
- this.formData.pageNum = 1
- this.getList()
- },
- },
- otherButton: [
- {
- name: '新建行业',
- methodsText: 'add',
- add: () => {
- this.handleAdd()
- },
- },
- ],
- },
- }
- },
- created() {},
- mounted() {
- this.getList()
- },
- methods: {
- getList() {
- this.loading = true
- API.tdaApplicationPage(this.formData).then(
- (res) => {
- console.log(res)
- this.loading = false
- },
- (err) => {
- console.log('tdaApplicationPage: ' + err)
- this.loading = false
- },
- )
- },
- handleAdd() {
- console.log('add')
- },
- },
- }
- </script>
- <style lang="scss" scoped>
- * {
- font-size: 12px;
- }
- .box-card {
- height: calc(100vh - 110px);
- overflow-y: auto;
- }
- .searchBtn {
- background: #20b2aa;
- color: #fff;
- border: 1px solid #20b2aa;
- }
- ::v-deep {
- .el-input__inner {
- border-radius: 1px;
- }
- .el-button--mini {
- border-radius: 1px;
- }
- .tableHeader th {
- background-color: #edf0f5;
- height: 35px;
- padding: 0;
- }
- }
- </style>
|