加载效果

This commit is contained in:
shijingjing
2022-06-10 17:52:23 +08:00
parent 35de4f51de
commit 3fdc528ffe
3 changed files with 24 additions and 41 deletions

View File

@@ -76,6 +76,12 @@ export default {
],
}
},
created() {
if(this.params.id) {
this.getDetail()
}
},
methods: {
cancel(isRefresh) {
this.$emit('change', {
@@ -83,6 +89,12 @@ export default {
isRefresh: !!isRefresh,
})
},
getDetail() {
this.instance.post(`/app/appzyvideobroadcast/queryDetailById?id=${this.params.id}`).then((res) => {
console.log(res);
})
},
getList() {},
}
}
</script>

View File

@@ -25,7 +25,7 @@
<!-- <el-button icon="iconfont iconDelete" size="small" @click="removeAll" :disabled="ids.length == 0">删除 </el-button> -->
</template>
</ai-search-bar>
<ai-table :tableData="tableData" :col-configs="colConfigs" :total="total" :dict="dict"
<ai-table :tableData="tableData" :col-configs="colConfigs" :total="total" :dict="dict" v-loading="loading"
:current.sync="page.current" :size.sync="page.size" @getList="getList"
@selection-change="(v) => (ids = v.map((e) => e.id))">
<el-table-column slot="options" label="操作" align="center" width="180" fixed="right">
@@ -82,6 +82,7 @@ export default {
],
tableData: [],
areaId: '',
loading: false,
}
},
@@ -101,6 +102,7 @@ export default {
this.areaId = this.user.info.areaId
this.dict.load('dlbResourceType', 'dlbMessageUrgency', 'dlbBroadTaskType', 'dlbBroadcastStatus', 'dlbMessageUrgency').then(() => {
this.getList()
this.loading = true
})
},
@@ -116,7 +118,10 @@ export default {
if (res.code == 0) {
this.tableData = res.data.records
this.total = parseInt(res.data.total)
this.loading = false
}
}).catch(() => {
this.loading = false
})
},
onAdd(id) {

View File

@@ -16,7 +16,7 @@
:selectList="$dict.getDict('dlbMessageUrgency')"></ai-select>
</el-form-item>
<el-form-item label="行政区划" prop="areaId">
<ai-area-get v-model="areaId" :root="areaRootId" :instance="instance" @select="handleAreaSelect" size="small" placeholder="全部地区"/>
<ai-area-get v-model="formData.areaId" :root="areaRootId" :instance="instance" @select="handleAreaSelect" size="small" placeholder="请选择行政区划"/>
</el-form-item>
<el-form-item label="播放方式" prop="taskType" class="buildingTypes">
<el-radio-group v-model="formData.taskType">
@@ -59,8 +59,8 @@
value-format="HH:mm:ss"></el-time-picker>
</el-form-item>
<el-form-item label="播放设备" prop="serialNo" style="width: 100%;">
<ai-table-select :instance="instance" :action="`/app/appresident/list?householdName=1&areaId=${areaId}&auditStatus=1`"
@select="v=>chooseUser=v" multiple/>
<ai-table-select nodeName="deviceName" :instance="instance" :action="`/app/appdlbquipment/getDlbDeviceList?devStatus=5`"
@select="v=>formData.serialNo=v" multiple/>
</el-form-item>
</el-form>
</template>
@@ -269,44 +269,10 @@ export default {
},
// 地区选择
handleAreaSelect() {
this.areaName = v?.[0]?.label
},
// 全选按钮
handleCheckAllChange(val) {
this.checkedCities = val ? this.cities : [];
this.isIndeterminate = false;
},
// 复选框
handleCheckedCitiesChange(value) {
let checkedCount = value.length;
this.checkAll = checkedCount == this.cities.length;
this.isIndeterminate = checkedCount > 0 && checkedCount < this.cities.length;
},
// 搜索设备
searchEquipment() {
console.log('搜索设备');
},
// 关闭标签
closeTags(tag) {
this.tags.splice(this.tags.indexOf(tag), 1);
},
// 清空标签
emptyBtn() {
this.tags = []
},
handleNodeClick(data) {
console.log(data);
},
// 行政区划
bindAdministrative() {
this.instance.post(`/app/appdlbquipment/addOrUpdate`, this.changeInfo).then((res) => {
if (res.code == 0) {
// this.$message.success('绑定行政区划成功!')
// this.bindVisible = false
// this.getList()
}
})
this.form.areaName = v?.[0]?.label
},
// 播放
confirm() {
this.$refs['ruleForm'].validate((valid) => {
if (valid) {