|
@@ -87,18 +87,8 @@
|
|
|
</el-form-item>
|
|
|
<p class="page-inquire-common-style-button" @click="handleQuery">查询</p>
|
|
|
<p class="page-reset-common-style-button" @click="resetQuery">重置</p>
|
|
|
- <el-form-item label="" prop="title" style="float: right">
|
|
|
- <el-dropdown @command="exportButton" style="float: left">
|
|
|
- <div class="form-dropdown-box">
|
|
|
- <img src="@/assets/ZDimages/basicsModules/icon_jzgxx_sc.png">
|
|
|
- <p>导出</p>
|
|
|
- <img src="@/assets/ZDimages/basicsModules/icon_jzggl_xljt.png">
|
|
|
- </div>
|
|
|
- <el-dropdown-menu slot="dropdown">
|
|
|
- <el-dropdown-item style="border-bottom:1px solid #E0E0E0;margin:0 10px;color:#333;" :command="{command:1}">导出全部数据</el-dropdown-item>
|
|
|
- <el-dropdown-item style="margin:0 10px;color:#666;" :command="{command:2}">导出选中数据</el-dropdown-item>
|
|
|
- </el-dropdown-menu>
|
|
|
- </el-dropdown>
|
|
|
+ <el-form-item style="float: right;">
|
|
|
+ <export-component :exportConfig="exportConfig" v-hasPermiRouter="['demo:demo:demo']"></export-component>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</div>
|
|
@@ -144,13 +134,16 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import exportComponent from "@/components/exportComponent/exportComponent.vue";
|
|
|
import { iotTypeList,iotTypeDetail,iotTypeAdd,iotTypeUpdate,iotTypeDelete } from "@/api/iotDevice/index";
|
|
|
import infoPage from "./infoPage.vue"
|
|
|
import {listDepartments} from "@/api/commonality/noPermission";
|
|
|
export default {
|
|
|
name: 'index',
|
|
|
components: {
|
|
|
- infoPage
|
|
|
+ exportComponent,
|
|
|
+ infoPage,
|
|
|
+
|
|
|
},
|
|
|
data(){
|
|
|
return{
|
|
@@ -169,6 +162,11 @@
|
|
|
deptList:[],
|
|
|
//组件传参
|
|
|
propsData:{},
|
|
|
+ exportConfig:{
|
|
|
+ api:'system/user/student/export', //导出接口地址
|
|
|
+ ids:'', //勾选导出,勾选的IDS
|
|
|
+ fileName:'导出文件名', //导出文件的命名
|
|
|
+ },
|
|
|
}
|
|
|
},
|
|
|
created(){
|
|
@@ -233,67 +231,6 @@
|
|
|
this.deptList = response.data;
|
|
|
});
|
|
|
},
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- //弹层关闭
|
|
|
- dialogOff(){
|
|
|
- this.$set(this,'dialogType',false);
|
|
|
- },
|
|
|
- //弹层开启
|
|
|
- dialogOpen(){
|
|
|
- this.dialogFormReset();
|
|
|
- this.$set(this,'dialogTitle','新增');
|
|
|
- this.$set(this,'dialogType',true);
|
|
|
- },
|
|
|
- //弹层确定
|
|
|
- dialogSubmit(){
|
|
|
- this.$refs["dialogForm"].validate(valid => {
|
|
|
- if (valid) {
|
|
|
- if(this.dialogForm.typeId){
|
|
|
- let obj = {
|
|
|
- typeId:this.dialogForm.typeId,
|
|
|
- typeName:this.dialogForm.typeName,
|
|
|
- typeKey:this.dialogForm.typeKey,
|
|
|
- state:this.dialogForm.state,
|
|
|
- remark:this.dialogForm.remark,
|
|
|
- }
|
|
|
- iotTypeUpdate(obj).then(response => {
|
|
|
- this.msgSuccess(response.message);
|
|
|
- this.getList();
|
|
|
- this.$set(this,'dialogType',false);
|
|
|
- });
|
|
|
- }else{
|
|
|
- iotTypeAdd(this.dialogForm).then(response => {
|
|
|
- this.msgSuccess(response.message);
|
|
|
- this.getList();
|
|
|
- this.$set(this,'dialogType',false);
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- handleQuery(){
|
|
|
- this.$set(this.queryParams,'page',1);
|
|
|
- this.getList();
|
|
|
- },
|
|
|
- resetQuery(){
|
|
|
- this.$set(this,'queryParams',{
|
|
|
- page:1,
|
|
|
- pageSize:20,
|
|
|
- searchValue :"",
|
|
|
- state :null,
|
|
|
- });
|
|
|
- this.getList();
|
|
|
- },
|
|
|
- dialogFormReset(){
|
|
|
- this.$set(this,'dialogForm',{
|
|
|
- typeName:"",
|
|
|
- typeKey:"",
|
|
|
- state:true,
|
|
|
- remark:"",
|
|
|
- });
|
|
|
- },
|
|
|
//获取数据列表
|
|
|
getList(){
|
|
|
this.$set(this,'loading',true);
|
|
@@ -309,6 +246,8 @@
|
|
|
//详情
|
|
|
this.$set(this,'propsData',JSON.parse(JSON.stringify(row)));
|
|
|
this.$set(this,'pageType',2);
|
|
|
+ }else if(type ==7){
|
|
|
+ this.$set(this,'pageType',1);
|
|
|
}
|
|
|
},
|
|
|
},
|
|
@@ -316,31 +255,7 @@
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
-/*导出按钮样式*/
|
|
|
-.form-dropdown-box{
|
|
|
- display: flex;
|
|
|
- margin:0;
|
|
|
- padding:0 10px;
|
|
|
- cursor: pointer;
|
|
|
- height:40px;
|
|
|
- img:nth-child(1){
|
|
|
- width:16px;
|
|
|
- height:16px;
|
|
|
- margin-top:12px;
|
|
|
- }
|
|
|
- p{
|
|
|
- width:47px;
|
|
|
- text-align: center;
|
|
|
- font-size:14px;
|
|
|
- margin:0;
|
|
|
- line-height:40px;
|
|
|
- }
|
|
|
- img:nth-child(3){
|
|
|
- width:10px;
|
|
|
- height:6px;
|
|
|
- margin-top:17px;
|
|
|
- }
|
|
|
-}
|
|
|
+
|
|
|
.useLedger{
|
|
|
.useLedger-page{
|
|
|
|