随笔分类 -  vue

摘要:https://www.nhooo.com/note/qa3v7f.html 通常我们会用到过滤两个时间段内的一些数据, 当我们用django rest framework的时候, 他可以根据字段filter_fields进行过滤, 但是对于日期来说并不起作用, 这个时候就需要我们设置重写query 阅读全文
posted @ 2023-02-03 13:13 门徒21 阅读(127) 评论(0) 推荐(0)
摘要:Js自动触发a标签的点击事件并跳转页面 阅读全文
posted @ 2022-12-27 15:35 门徒21 阅读(509) 评论(0) 推荐(0)
摘要:Promise.all([ request({ url: urlPrefix_custom, method: 'get', params: querys }) ]).then((res)=>{ console.log(" 自定义事件详情数据导出,回调数据 ") console.log(res[0]. 阅读全文
posted @ 2022-11-28 14:05 门徒21 阅读(1368) 评论(0) 推荐(0)
摘要:// 读取本地json文件 export function GetUserAction (query){ let quesa = axios.get('/json/userAction.json').then(res => { // 获取public下的buildmenu.json文件数据 cons 阅读全文
posted @ 2022-11-25 16:35 门徒21 阅读(1728) 评论(0) 推荐(0)
摘要:数据打印格式: VUE部分: <div style="height:80vw;"> <el-table :data="resultTable.slice((queryInfo.pagenum-1)*queryInfo.pagesize,queryInfo.pagenum*queryInfo.page 阅读全文
posted @ 2022-11-17 16:05 门徒21 阅读(79) 评论(0) 推荐(0)
摘要:取整 1.取整 // 丢弃小数部分,保留整数部分 parseInt(5/2) // 2 2.向上取整 // 向上取整,有小数就整数部分加1 Math.ceil(5/2) // 3 3.向下取整 // 向下取整,丢弃小数部分 Math.floor(5/2) // 2 4四舍五入 // 四舍五入 Mat 阅读全文
posted @ 2022-11-17 15:50 门徒21 阅读(421) 评论(0) 推荐(0)
摘要:<template> <div> <el-table :data="resultTable" border ref="multipleTable" tooltip-effect="light" size="mini"> <el-table-column type="index" label="序号" 阅读全文
posted @ 2022-11-16 15:20 门徒21 阅读(650) 评论(0) 推荐(0)
摘要:1·vue获取路径传值 getEqRequest (query) { query = { data_point_app_id: this.$route.query.data_point_app_id, data_point_app_name: this.$route.query.data_point 阅读全文
posted @ 2022-11-15 17:12 门徒21 阅读(57) 评论(0) 推荐(0)
摘要:浮点型时间格式转换: GMT_FORMAT = '%Y-%m-%d %H:%M:%S' ta = str(w['create_datetime']).split(".")[0] create_datetime = datetime.datetime.strptime(ta, GMT_FORMAT) 阅读全文
posted @ 2022-11-14 22:13 门徒21 阅读(38) 评论(0) 推荐(0)
摘要:代码: if user_actions_name: # 获取自定义事件详情 print(' 自定义事件名 ') print(user_actions_name) new_custom_item = [] for w in data: custom_name = json.loads(w['custo 阅读全文
posted @ 2022-11-14 21:41 门徒21 阅读(256) 评论(0) 推荐(0)
摘要:from dvadmin.utils.json_response import SuccessResponse return SuccessResponse(data=new_custom_item, msg="获取成功")数据格式为: [{'名字': '韩梅梅'}, {'动作': '跳舞'}, { 阅读全文
posted @ 2022-11-14 17:05 门徒21 阅读(33) 评论(0) 推荐(0)
摘要:def get(self, request): print(" 用户行为列表") dictionary_key = self.request.query_params.get('data_point_app_id') print(' 445 ') print(dictionary_key) if d 阅读全文
posted @ 2022-11-11 12:07 门徒21 阅读(26) 评论(0) 推荐(0)
摘要:api.postWachPay(param).then(res => { this.html = res.data; let data = JSON.parse(res.data) console.log(data.h5_url) window.location.href=data.h5_url; 阅读全文
posted @ 2022-10-06 04:11 门徒21 阅读(222) 评论(0) 推荐(0)
摘要:vue上服务器后因为插件原因报错: AttributeError: ‘str‘ object has no attribute ‘decode‘ 解决办法: str.encode('utf-8').decode('utf-8') 阅读全文
posted @ 2022-09-14 18:14 门徒21 阅读(30) 评论(0) 推荐(0)
摘要:亲自验证过的。 使用函数 //时间转换,时间转换 Wed Sep 16 2020 00:00:00 GMT+0800 (中国标准时间) dateFormat(dateData) { var date = new Date(dateData) var y = date.getFullYear() va 阅读全文
posted @ 2022-06-21 17:43 门徒21 阅读(2834) 评论(0) 推荐(0)
摘要:陷入死循环 mounted: function() { location.reload(); }, 正确方法 noReloaded: function () { if (location.href.indexOf("#reloaded") == -1) { location.href = locat 阅读全文
posted @ 2022-02-05 02:09 门徒21 阅读(2642) 评论(0) 推荐(0)
摘要:当你接收到400 这里失败请求的时候,其实已经成功访问服务器了,可能你发送的post数据在服务器那边校验失败了,如果你的服务器返回的是json格式的话,在前端接收到的也是json格式,如果你使用axios发送请求的话,在catch的时候,返回的error并不是一个对象,而是这样的字符串: 那么axi 阅读全文
posted @ 2022-01-12 21:55 门徒21 阅读(2708) 评论(0) 推荐(0)
摘要:官网https://panjiachen.github.io/vue-element-admin-site/zh/guide/#%E5%8A%9F%E8%83%BD vue项目做的少,elementUI也是最近才接触,所以文档看了一周才有了点思路,最难的就是用户登录权限部分 目录结构 页面都在/sr 阅读全文
posted @ 2021-08-18 17:32 门徒21 阅读(1518) 评论(0) 推荐(0)