export default {
  // URL:'http://192.168.1.104:60018/danger',
  URL:'http://127.0.0.1:60018/danger',
  titleArray: [],
  enterpriseId:'',
  componentUrl: {
    AlarmMg:'Alarm',
    EnseList:'EnseList',
    EnterprisesMg:'Enterprises',
	EnterprisesCheck:'Enterprises',
    GIS:'GIS',
	tongji:'Enterprises',
    HazardsListMg:'Hazards',
    PlansMg:'Plans',
    qyMap:'qyMap',
    qystatistics:'qystatistics',
    SafetyDeviceMg:'SafetyDevice',
    statistics:'statistics',
    SystemCode:'SystemCode',
    APIMg: "System",
    BranchMg: "System",
    MenuMg: "System",
    RoleMg: "System",
    UserMg: "System",
    VideoList: "Video"
  },
  deleteFun(that: any, url: any, callback: any) {
    (that as any)
      .$confirm("确定删除此条记录吗?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      })
      .then(() => {
        (that as any).$axios
          .get(url)
          .then((res: any) => {
            if (res.code == 0) {
              (that as any).$message({
                type: "success",
                message: "删除成功!"
              });
              callback()
            }
          });
      });
  },
  axiosPost(that: any, url: any,param:any, callback: any) {//post请求
    (that as any).$axios.post(url, param).then((res:any) => {
      callback(res)
    })
  },
  axiosGet(that: any, url: any, callback: any) {//get请求
    (that as any).$axios.get(url).then((res:any) => {
      callback(res)
    })
  },
    
}