diff --git a/common/http.api.js b/common/http.api.js
index 2837700..cf893ca 100644
--- a/common/http.api.js
+++ b/common/http.api.js
@@ -10,80 +10,106 @@ const install = (Vue, vm) => {
id: 2
});
// 此处使用了传入的params参数,一切自定义即可
- let getUserInfo = (params = {}) => vm.$u.get('/system/user/info/', params);//获取用户信息
-
+ let getUserInfo = (params = {}) => vm.$u.get('/system/user/info/', params); //获取用户信息
+
let getCode = (data = {}) => vm.$u.post('/auth/sms_code/', data); //获取短信验证码
-
+
let codeLogin = (data = {}) => vm.$u.post('/auth/login_sms_code/', data); //短信验证码登录
-
+
let login = (data = {}) => vm.$u.post('auth/token/', data); //账户密码登录
let loginOut = () => vm.$u.post('/auth/logout/'); //账户密码退出
// 将各个定义的接口名称,统一放进对象挂载到vm.$u.api(因为vm就是this,也即this.$u.api)下
-
- let wxmplogin = (data = {}) => vm.$u.post('auth/login_wxmp/', data); //微信登录
-
- let bindmp = (data = {}) => vm.$u.post('/system/user/bind_wxmp/', data); //微信小程序绑定
-
- let unbindmp = (data = {}) => vm.$u.post('/system/user/unbind_wxmp/', data); //微信小程序解绑
- let getDickey = (params={})=>vm.$u.get('/system/dict/', params);//查询字典
- let userList = (params={})=>vm.$u.get('/system/user/', params);//
- let deptList = (params={})=>vm.$u.get('/system/dept/', params);//
- let getTickets = (params={})=>vm.$u.get('/wf/ticket/', params);//工单查询/wf/ticket/{id}/
- let getTicketItem = (id)=>vm.$u.get(`/wf/ticket/${id}/`);//工单详情
- let getTicketTransitions = (id)=>vm.$u.get(`/wf/ticket/${id}/transitions/`);//工单按钮查询
-
- let addNode = (id,data={})=>vm.$u.get(`/wf/ticket/${id}/add_node/`,data);//加签
- let addNodeEnd = (id,data={})=>vm.$u.get(`/wf/ticket/${id}/add_node_end/`,data);//加签处理
- let deliver = (id,data={})=>vm.$u.get(`/wf/ticket/${id}/deliver/`,data);//转交工单
- let ticketHandle = (id,data={})=>vm.$u.get(`/wf/ticket/${id}/handle/`,data);//工单处理
-
- let operationCreat = (data = {}) => vm.$u.post('/opm/operation/', data);//作业
- let operationItem = (id) => vm.$u.get(`/opm/operation/${id}/`);//作业许可证类型
- let getOpreation = (id)=>vm.$u.get(`/opm/operation/${id}/`);//rpj查询
- let getOpl = (id)=>vm.$u.get(`/opm/opl/${id}/`);//opl作业许可证查询
- let oplLists = (data = {}) => vm.$u.get('/opm/opl/', data);//作业许可证
- let oplCate = (data = {}) => vm.$u.get('/opm/opl_cate/', data);//作业许可证类型
- let oplCateItem = (id) => vm.$u.get(`/opm/opl_cate/${id}/`);//作业许可证类型详情
-
-
- let areaLists = (data = {}) => vm.$u.get('/am/area/', data);//作业区域
-
- let getVisit = (id)=>vm.$u.get(`/vm/visit/${id}/`);//visit查询
- let vmVisitor = (data={})=>vm.$u.get(`/vm/visitor/`,data);//visit查询
- let addVisitor = (data={})=>vm.$u.post(`vm/visitor/`,data);//visitor添加
-
- let getRpj = (id)=>vm.$u.get(`/rpm/rpj/${id}`);//rpj查询
+ let wxmplogin = (data = {}) => vm.$u.post('auth/login_wxmp/', data); //微信登录
+
+ let bindmp = (data = {}) => vm.$u.post('/system/user/bind_wxmp/', data); //微信小程序绑定
+
+ let unbindmp = (data = {}) => vm.$u.post('/system/user/unbind_wxmp/', data); //微信小程序解绑
+ let getDickey = (params = {}) => vm.$u.get('/system/dict/', params); //查询字典
+ let userList = (params = {}) => vm.$u.get('/system/user/', params); //
+ let deptList = (params = {}) => vm.$u.get('/system/dept/', params); //
- vm.$u.api = {getUserInfo,
- getCode,
- codeLogin,
- login,
- loginOut,
- wxmplogin,
- bindmp,
- unbindmp,
- userList,
- deptList,
- getDickey,
- getTickets,
- getTicketItem,
- getTicketTransitions,
- getVisit,
- vmVisitor,
- addVisitor,
- getRpj,
- getOpreation,
- oplCateItem,
- oplLists,
- getOpl,
- oplCate,
- operationItem,
- operationCreat,
- areaLists
- };
+ let getTickets = (params = {}) => vm.$u.get('/wf/ticket/', params); //工单查询/wf/ticket/{id}/
+ let ticketCreate = (data = {}) => vm.$u.post('/wf/ticket/', data); //工单
+ let getTicketItem = (id) => vm.$u.get(`/wf/ticket/${id}/`); //工单详情
+ let getTicketTransitions = (id) => vm.$u.get(`/wf/ticket/${id}/transitions/`); //工单按钮查询
+ let workflowInit = (key) => vm.$u.get(`/wf/workflow/${key}/init_key/`); //工单按钮查询
+
+
+ let addNode = (id, data = {}) => vm.$u.get(`/wf/ticket/${id}/add_node/`, data); //加签
+ let addNodeEnd = (id, data = {}) => vm.$u.get(`/wf/ticket/${id}/add_node_end/`, data); //加签处理
+ let deliver = (id, data = {}) => vm.$u.get(`/wf/ticket/${id}/deliver/`, data); //转交工单
+ let ticketHandle = (id, data = {}) => vm.$u.post(`/wf/ticket/${id}/handle/`, data); //工单处理
+
+ let operationList = (data = {}) => vm.$u.get('/opm/operation/', data); //作业列表
+ let operationItem = (id) => vm.$u.get(`/opm/operation/${id}/`); //作业详情
+ let operationCreat = (data = {}) => vm.$u.post('/opm/operation/', data); //作业新建
+ let operationUpdate = (id, data = {}) => vm.$u.get(`/opm/operation/${id}/`, data); //作业编辑
+ let oplItem = (id) => vm.$u.get(`/opm/opl/${id}/`); //opl作业许可证查询
+ let oplLists = (data = {}) => vm.$u.get('/opm/opl/', data); //作业许可证
+ let oplCate = (data = {}) => vm.$u.get('/opm/opl_cate/', data); //作业许可证类型
+ let oplCateItem = (id) => vm.$u.get(`/opm/opl_cate/${id}/`); //作业许可证类型详情
+
+ let rpjList = (data = {}) => vm.$u.get(`/rpm/rpj/`, data); //rpj查询
+ let rpjItem = (id) => vm.$u.get(`/rpm/rpj/${id}`); //rpj查询
+
+ let areaLists = (data = {}) => vm.$u.get('/am/area/', data); //作业区域
+
+ let visitList = (data = {}) => vm.$u.get(`/vm/visit/`, data); //来访项目查询
+ let visitItem = (id) => vm.$u.get(`/vm/visit/${id}/`); //来访项目详情
+ let visitCreate = (data = {}) => vm.$u.post(`/vm/visit/`, data); //新增来访项目
+ let visitUpdate = (id, data = {}) => vm.$u.put(`/vm/visit/${id}/`, data); //编辑来访项目
+ let vmVisitor = (data = {}) => vm.$u.get(`/vm/visitor/`, data); //来访人员列表
+ let visitorCreate = (data = {}) => vm.$u.post(`vm/visitor/`, data); //来访人员添加
+ let visitorUpdate = (data = {}) => vm.$u.put(`vm/visitor/${id}/`, data); //来访人员编辑
+ let vmVpeople = (data = {}) => vm.$u.get(`/vm/vpeople/`, data); //来访人员列表
+ let vpeopleCreate = (data = {}) => vm.$u.post(`vm/vpeople/`, data); //来访人员添加
+ let vpeopleUpdate = (data = {}) => vm.$u.put(`vm/vpeople/${id}/`, data); //来访人员编辑
+
+ vm.$u.api = {
+ getUserInfo,
+ getCode,
+ codeLogin,
+ login,
+ loginOut,
+ wxmplogin,
+ bindmp,
+ unbindmp,
+ userList,
+ deptList,
+ ticketCreate,
+ getDickey,
+ getTickets,
+ getTicketItem,
+ workflowInit,
+ getTicketTransitions,
+
+ visitList,
+ visitItem,
+ visitCreate,
+ visitUpdate,
+ vmVisitor,
+ visitorCreate,
+ visitorUpdate,
+ vmVpeople,
+ vpeopleCreate,
+ vpeopleUpdate,
+
+ rpjItem,
+ rpjList,
+
+ oplCateItem,
+ operationItem,
+ operationCreat,
+ operationList,
+ oplLists,
+ oplItem,
+ oplCate,
+
+ areaLists
+ };
}
export default {
install
-}
\ No newline at end of file
+}
diff --git a/pages.json b/pages.json
index 906d6a1..d162ed1 100644
--- a/pages.json
+++ b/pages.json
@@ -92,29 +92,22 @@
}
},
{
- "path": "pages/workSpace/newWork/work",
+ "path": "pages/workSpace/rpj/rpjLisst",
"style": {
- "navigationBarTitleText": "新建作业",
+ "navigationBarTitleText": "入厂项目",
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
},
{
- "path": "pages/workSpace/newWork/relevant",
+ "path": "pages/workSpace/rpj/rpjCreate",
"style": {
"navigationBarTitleText": "新建入厂项目",
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
},
- {
- "path": "pages/workSpace/newWork/visit",
- "style": {
- "navigationBarTitleText": "新建来访项目",
- "navigationStyle": "custom",
- "enablePullDownRefresh": false
- }
- },
+
{
"path": "pages/workSpace/newWork/userList",
"style": {
@@ -132,7 +125,7 @@
}
},
{
- "path": "pages/workSpace/list/opreation",
+ "path": "pages/workSpace/operation/operationList",
"style": {
"navigationBarTitleText": "作业列表",
"navigationStyle": "custom",
@@ -140,7 +133,15 @@
}
},
{
- "path": "pages/workSpace/list/oplCate",
+ "path": "pages/workSpace/operation/operationCreate",
+ "style": {
+ "navigationBarTitleText": "新建作业",
+ "navigationStyle": "custom",
+ "enablePullDownRefresh": false
+ }
+ },
+ {
+ "path": "pages/workSpace/operation/oplCate",
"style": {
"navigationBarTitleText": "许可证类型",
"navigationStyle": "custom",
@@ -148,17 +149,17 @@
}
},
{
- "path": "pages/workSpace/list/rpj",
+ "path": "pages/workSpace/visit/visitList",
"style": {
- "navigationBarTitleText": "入厂项目",
+ "navigationBarTitleText": "来访项目",
"navigationStyle": "custom",
- "enablePullDownRefresh": false
+ "enablePullDownRefresh": false
}
},
{
- "path": "pages/workSpace/list/visit",
+ "path": "pages/workSpace/visit/visitCreate",
"style": {
- "navigationBarTitleText": "来访项目",
+ "navigationBarTitleText": "新建来访项目",
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
@@ -171,6 +172,14 @@
"enablePullDownRefresh": false
}
},
+ {
+ "path": "pages/workSpace/visit/vpeopleList",
+ "style": {
+ "navigationBarTitleText": "人员确定",
+ "navigationStyle": "custom",
+ "enablePullDownRefresh": false
+ }
+ },
{
"path": "pages/my/my",
"style": {
diff --git a/pages/workSpace/newWork/addUser.vue b/pages/workSpace/newWork/addUser.vue
index cc9ffb1..d4165c5 100644
--- a/pages/workSpace/newWork/addUser.vue
+++ b/pages/workSpace/newWork/addUser.vue
@@ -31,7 +31,7 @@
-
+
@@ -50,11 +50,11 @@
},
methods: {
- saveUser(){
- this.$u.api.addVisitor(this.formData).then(res=>{
+ saveVisitor(){
+ this.$u.api.visitorCreate(this.formData).then(res=>{
if(res.err_msg){}else{
uni.navigateTo({
- url: '/pages/workSpace/newWork/userList'
+ url: '/pages/workSpace/visit/vpeopleList'
})
}
})
diff --git a/pages/workSpace/newWork/userList.vue b/pages/workSpace/newWork/userList.vue
index 4d61ca8..81e3287 100644
--- a/pages/workSpace/newWork/userList.vue
+++ b/pages/workSpace/newWork/userList.vue
@@ -15,30 +15,43 @@
-
-
-
-
-
-
+
+
+
+ 选择来访人员
+
+
+
@@ -81,13 +94,13 @@
page: 0
}).then(res => {
that.userRange = [];
- res.forEach(item=>{
+ res.forEach(item => {
let obj = {};
- obj=item;
- obj.checked = false;
+ obj = item;
+ obj.checked = false;
that.userRange.push(obj)
})
-
+
})
},
select(row) {},
@@ -143,18 +156,24 @@
}
.add {
+ width: 50px;
+ height: 50px;
+ border-radius: 25px;
+ line-height: 50px;
+ box-shadow: 0 0 6px 2px rgba(0, 0, 0, .3);
+ z-index: 100;
position: fixed;
- bottom: 0;
- width: 100%;
- height: 120upx;
- justify-content: center;
- align-items: center;
+ bottom: 100px;
+ right: 20px;
}
- .btn {
+ .select {
margin: auto;
box-shadow: 0upx 5upx 10upx rgba(0, 0, 0, 0.4);
- width: 70%;
+ width: 400rpx;
+ height: 80rpx;
+ line-height: 80rpx;
+ font-size: 30rpx;
}
.save-btn {
diff --git a/pages/workSpace/newWork/work.vue b/pages/workSpace/operation/operationCreate.vue
similarity index 77%
rename from pages/workSpace/newWork/work.vue
rename to pages/workSpace/operation/operationCreate.vue
index cb8ec2f..05b576c 100644
--- a/pages/workSpace/newWork/work.vue
+++ b/pages/workSpace/operation/operationCreate.vue
@@ -1,16 +1,16 @@
-
+
-
+
*
作业简介
-
+
@@ -99,9 +99,8 @@
-
-
-
+
+
@@ -112,7 +111,7 @@
var that;
var promise;
export default {
- name: "work",
+ name: "operation",
data() {
const currentDate = this.getDate({
format: true
@@ -135,24 +134,8 @@
publishRangeCon: '',
- menuId: "",
- itemId: "",
- detail: false,
- principal: {},
- pkId: '',
- isDisabled: false,
- btnShow: true,
- lsId: "",
- sta: null,
- eventStatus: "",
- execId: '',
- // 2022年3月20日
- result: [],
- // 文件进度
- imgFlag: false,
- //文件下载
- downFiles: {},
- timeShow: false,
+
+ showBtns: false,
// 发布网站
releaseWeb: [],
createTimeFromShow: false,
@@ -188,7 +171,18 @@
}
},
onLoad(params) {
-
+ if(params.operationId){
+ this.operationId = params.operationId;
+ this.type = params.type;
+ this.getOperation();
+ if(params.type==='edit'){
+ this.showBtns = true;
+ }else{
+ this.showBtns = false;
+ }
+ }else{
+ this.showBtns = true;
+ }
},
onShow() {
this.getdept();
@@ -197,12 +191,21 @@
this.range = [];
},
methods: {
+ //获取工作operation
+ getOperation() {
+ let that = this;
+ that.$u.api.operationItem(that.operationId).then((res) => {
+ that.formData.start_time = res.start_time; //作业开始时间
+ that.formData.end_time = res.end_time; //作业结束时间
+ that.operationName = res.name; //作业
+ console.log(res);
+ });
+ },
saveSubmit() {
console.log(this.formData)
this.formData.start_time = new Date(this.formData.start_time).toISOString();
this.formData.end_time = new Date(this.formData.end_time).toISOString();
this.$u.api.operationCreat(this.formData).then(res => {
- debugger;
let params = `?operationId=${res.id}`;
uni.navigateTo({
url: '/pages/workSpace/list/oplCate'+params
@@ -320,18 +323,7 @@
console.log(arr);
return arr;
},
- onSubmit(type) {
- if (!this.paramsCheck()) return;
-
- if (this.detail && !this.formData.id) {
- uni.showToast({
- title: '缺少pkid',
- icon: "none"
- })
- return;
- }
- this._updatePrintList(this.formData, type);
- },
+
/* 参数验证 */
paramsCheck() {
var typeArr = [];
@@ -440,138 +432,24 @@
return true;
},
- /* 保存数据 */
- _updatePrintList(data, type) {
- this.formData.createTimeTo = this.formData.createTimeTo + ' ' + '00:00:00'
- this.isDisabled = true;
- let method = "post";
- if (this.detail) {
- /* 是详情页,就使用put请求,申请人自回显处得到。否则为新增页,申请人为当前登录人*/
- if (this.eventStatus == 4) { //未提交的数据
- method = "put";
- } else {
- method = "post";
- const newData = JSON.parse(JSON.stringify(data))
- delete newData.newsBulletinId;
- data = newData;
- }
- } else {
- this.formData.itemInfo.applicant = this.userId;
- }
- bulletinNew(method, data).then(res => {
-
- if (res.statusCode === 200) {
- this.itemId = res.data.data.itemId;
- if (type.indexOf("提交") > -1) {
- this.$refs.submitApproval.submitApproval(this.itemId); /* 创建审批数据 */
- } else {
- /* 临时保存,不需要审批的数据,直接跳转*/
- uni.showToast({
- title: '保存成功',
- icon: 'none',
- duration: 2000,
- success() {
- setTimeout(function() {
- this.isDisabled = false;
- uni.navigateBack({
- delta: 1
- })
- }, 2000)
- }
- })
-
-
- }
- } else {
- this.formData.createTimeTo = this.formData.createTimeTo.substring(0, 10);
- uni.showToast({
- title: res.data.message,
- icon: 'none'
- })
- }
- }).catch(err => {
- this.formData.createTimeTo = this.formData.createTimeTo.substring(0, 10);
- uni.showToast({
- title: '网络异常, 请求失败',
- icon: 'none'
- })
- })
- },
-
+
publishChange(e) {
var i = e.detail.value;
that.publishRangeCon = that.publishRange[i].name;
that.formData.scopeOfPublication = that.publishRange[i].id;
},
goBack() {
- uni.navigateBack({
- delta: 1
+ uni.navigateTo({
+ url: '/pages/workSpace/visit/visitList'
})
},
- /* 获取部门列表 */
- _getDeptListMenu() {
- getDeptListMenu().then(res => {
- if (res.statusCode === 200) {
- let list = res.data.data;
- this.depRange = list;
-
- // 2022年3月20日
- this.result = [];
- if (list !== undefined && list !== null && list !== "" && Array.isArray(list) && list
- .length > 0) {
- this.result = flatten(list);
- }
-
-
- } else {
- if (res.data.message == "token无效") return;
- uni.showToast({
- title: res.data.message,
- icon: 'none'
- })
- }
- }).catch(err => {
- uni.showToast({
- title: '网络异常, 请求失败',
- icon: 'none'
- })
- })
- },
onPopupclosed() {
if (this.lsId) {
this.formData.itemInfo.applicationDept = this.lsId;
}
},
- onNodeClick(e) {
- if (e.id !== undefined && e.id !== null && e.id !== "") {
- this.lsId = e.id;
-
-
- // 2022年3月20日
- const currObj = this.result.find((item) => {
- return item.id == this.lsId
- });
- if (currObj !== undefined && currObj !== null && currObj !== "") {
- console.log(currObj);
- if (currObj.children === null || currObj.children === undefined || currObj.children === "") {
- this.formData.itemInfo.applicationDept = this.lsId;
- }
- }
-
-
-
- }
- },
- /* 选择部门后得到最后部门名称 */
- onchange(e) {
- const value = e.detail.value;
- let lastDepName = "";
- if (value.length > 0) {
- lastDepName = value[value.length - 1].text;
- }
- this.subscribeDeptName = lastDepName || "";
- },
+
depChange(e) {
const idx = e.detail.value;
this.selectedDep = this.depRange[idx].name;
@@ -611,11 +489,11 @@
>>>.uni-status-bar {
background-image: linear-gradient(90deg, #164cc3 0%, #2c6fd9 100%), linear-gradient(#e60012, #e60012) !important;
}
- .qingjia-apply {
+ .operation-body {
background-color: #f3fbff;
- padding-bottom: 227rpx;
+ padding-bottom: 20rpx;
}
- .qingjia-apply>>>uni-input {
+ .operation-body>>>uni-input {
/* height: 100%; */
font-size: 30rpx;
}
@@ -624,8 +502,8 @@
font-size: 32rpx !important;
}
- .apply-info {
- width: 720rpx;
+ .form-info {
+ width: 710rpx;
margin: 0 auto;
background-color: #FFFFFF;
border-radius: 10rpx;
diff --git a/pages/workSpace/list/opreation.vue b/pages/workSpace/operation/operationList.vue
similarity index 72%
rename from pages/workSpace/list/opreation.vue
rename to pages/workSpace/operation/operationList.vue
index d907575..7b9a78d 100644
--- a/pages/workSpace/list/opreation.vue
+++ b/pages/workSpace/operation/operationList.vue
@@ -15,21 +15,28 @@
-
+
- {{val.title}}
+ {{val.name}}
- 所属工作流:{{val.workflow_.name}}
- 工单状态:{{val.state_.name}}
- 提交时间:{{val.create_time}}
+ 作业状态:{{stateOptions[val.state]}}
+ 生产状态:{{val.state_work}}
+ 作业区域:{{val.area_.name}}
更新时间:{{val.update_time}}
+ 属地部门:{{val.dept_ter_.name}}
+ 业务部门:{{val.dept_bus_.name}}
+ 创建人:{{val.create_by_.name}}
-
+
- 处理
+ 编辑
+
+
+
+ 查看
@@ -47,7 +54,14 @@
pageSize: 10,
pageNum: 1,
totalNum: 0,
- ticketList: [],
+ lists: [],
+ stateOptions: {
+ 10: "创建中",
+ 20: "审批中",
+ 30: "待作业",
+ 40: "作业中",
+ 50: "已关闭",
+ },
}
},
//上拉加载
@@ -64,44 +78,34 @@
}
},
onShow() {
- this.ticketList = [];
- // this.getTicketLists();
+ this.lists = [];
+ this.getLists();
},
//下拉刷新
onPullDownRefresh() {
this.pageNum = 1;
this.ticketList = [];
- // this.getTicketLists();
+ this.getLists();
},
methods: {
- getTicketLists() {
+ getLists() {
let that = this;
let obj = {};
- obj.category = 'duty';
obj.pageNum = this.pageNum;
obj.pageSize = this.pageSize;
if (that.search !== '') {
obj.search = that.search;
}
- obj.pageSize = this.pageSize;
- that.$u.api.getTickets(obj).then(res => {
- that.ticketList = that.ticketList.concat(res.results);
+ that.$u.api.operationList(obj).then(res => {
+ that.lists = that.lists.concat(res.results);
this.totalNum = res.count;
})
},
- ticketHandle(val) {
- let projectId = '',//项目、许可证Id
- operation = null;//作业id
- let catetype = val.workflow_.key;
- if (catetype === 'visit') {
- projectId = val.ticket_data.visit;
- } else if (catetype === 'Fire') {
- projectId = val.ticket_data.opl;
- operation = val.ticket_data.operation ? val.ticket_data.operation : null;
- }
- const params = `?ticketId=${val.id}&projectId=${projectId}&cateType=${catetype}&operation=${operation}`;
+ operationHandle(val,type) {
+ let operation = val.id;//作业id
+ const params = `?operationId=${val.id}&type=${type}`;
uni.navigateTo({
- url: '../detail/ticketHandle' + params,
+ url: '/pages/workSpace/operation/operationCreate' + params,
})
},
goBack() {
@@ -111,14 +115,14 @@
},
searchHandle() {
this.pageNum = 1;
- this.ticketList = [];
- this.getTicketLists()
+ this.lists = [];
+ this.getLists()
},
resetSearch() {
this.pageNum = 1;
this.search = "";
- this.ticketList = [];
- this.getTicketLists();
+ this.lists = [];
+ this.getLists();
},
}
}
@@ -216,10 +220,11 @@
}
.search-wrap {
- background-blend-mode: normal,
- normal;
+ background-blend-mode: normal,normal;
padding-bottom: 44rpx;
padding-top: 20rpx;
+ box-sizing: border-box;
+ background: #f3fbff;
}
.search-body {
diff --git a/pages/workSpace/list/oplCate.vue b/pages/workSpace/operation/oplCate.vue
similarity index 100%
rename from pages/workSpace/list/oplCate.vue
rename to pages/workSpace/operation/oplCate.vue
diff --git a/pages/workSpace/newWork/relevant.vue b/pages/workSpace/rpj/rpjCreate.vue
similarity index 100%
rename from pages/workSpace/newWork/relevant.vue
rename to pages/workSpace/rpj/rpjCreate.vue
diff --git a/pages/workSpace/list/rpj.vue b/pages/workSpace/rpj/rpjLisst.vue
similarity index 100%
rename from pages/workSpace/list/rpj.vue
rename to pages/workSpace/rpj/rpjLisst.vue
diff --git a/pages/workSpace/newWork/visit.vue b/pages/workSpace/visit/visitCreate.vue
similarity index 74%
rename from pages/workSpace/newWork/visit.vue
rename to pages/workSpace/visit/visitCreate.vue
index a381513..5b8549c 100644
--- a/pages/workSpace/newWork/visit.vue
+++ b/pages/workSpace/visit/visitCreate.vue
@@ -1,6 +1,6 @@
-
@@ -25,7 +25,6 @@
- *
来访详述
@@ -40,9 +39,10 @@
来访时间
-
+
+
@@ -51,9 +51,10 @@
离开时间
-
+
+
@@ -68,7 +69,6 @@
- *
来访单位
@@ -94,8 +94,8 @@
-
-
+
+
@@ -103,23 +103,17 @@
diff --git a/pages/workSpace/list/visit.vue b/pages/workSpace/visit/visitList.vue
similarity index 72%
rename from pages/workSpace/list/visit.vue
rename to pages/workSpace/visit/visitList.vue
index f149934..8db106c 100644
--- a/pages/workSpace/list/visit.vue
+++ b/pages/workSpace/visit/visitList.vue
@@ -15,21 +15,28 @@
-
+
- {{val.title}}
+ {{val.name}}
- 所属工作流:{{val.workflow_.name}}
- 工单状态:{{val.state_.name}}
- 提交时间:{{val.create_time}}
+
+ 来访概述:{{val.description}}
+
-
+
- 处理
+ 编辑
+
+
+
+ 查看
@@ -47,7 +54,14 @@
pageSize: 10,
pageNum: 1,
totalNum: 0,
- ticketList: [],
+ lists: [],
+ stateOptions: {
+ 10: "创建中",
+ 20: "审批中",
+ 30: "待作业",
+ 40: "作业中",
+ 50: "已关闭",
+ },
}
},
//上拉加载
@@ -55,7 +69,7 @@
const totalPage = Math.ceil(this.totalNum / this.pageSize);
if (this.pageNum < totalPage) {
this.pageNum += 1;
- // this._getMyApplyList(false);
+
} else {
uni.showToast({
title: "已全部加载",
@@ -64,44 +78,33 @@
}
},
onShow() {
- this.ticketList = [];
- // this.getTicketLists();
+ this.lists = [];
+ this.getLists();
},
//下拉刷新
onPullDownRefresh() {
this.pageNum = 1;
this.ticketList = [];
- // this.getTicketLists();
+ this.getLists();
},
methods: {
- getTicketLists() {
+ getLists() {
let that = this;
let obj = {};
- obj.category = 'duty';
obj.pageNum = this.pageNum;
obj.pageSize = this.pageSize;
if (that.search !== '') {
obj.search = that.search;
}
- obj.pageSize = this.pageSize;
- that.$u.api.getTickets(obj).then(res => {
- that.ticketList = that.ticketList.concat(res.results);
+ that.$u.api.visitList(obj).then(res => {
+ that.lists = that.lists.concat(res.results);
this.totalNum = res.count;
})
},
- ticketHandle(val) {
- let projectId = '',//项目、许可证Id
- operation = null;//作业id
- let catetype = val.workflow_.key;
- if (catetype === 'visit') {
- projectId = val.ticket_data.visit;
- } else if (catetype === 'Fire') {
- projectId = val.ticket_data.opl;
- operation = val.ticket_data.operation ? val.ticket_data.operation : null;
- }
- const params = `?ticketId=${val.id}&projectId=${projectId}&cateType=${catetype}&operation=${operation}`;
+ visitHandle(val,type) {
+ const params = `?visit=${val.id}&type=${type}`;
uni.navigateTo({
- url: '../detail/ticketHandle' + params,
+ url: '/pages/workSpace/visit/visitCreate' + params,
})
},
goBack() {
@@ -111,14 +114,14 @@
},
searchHandle() {
this.pageNum = 1;
- this.ticketList = [];
- this.getTicketLists()
+ this.lists = [];
+ this.getLists()
},
resetSearch() {
this.pageNum = 1;
this.search = "";
- this.ticketList = [];
- this.getTicketLists();
+ this.lists = [];
+ this.getLists();
},
}
}
@@ -216,10 +219,11 @@
}
.search-wrap {
- background-blend-mode: normal,
- normal;
+ background-blend-mode: normal,normal;
padding-bottom: 44rpx;
padding-top: 20rpx;
+ box-sizing: border-box;
+ background: #f3fbff;
}
.search-body {
diff --git a/pages/workSpace/visit/vpeopleList.vue b/pages/workSpace/visit/vpeopleList.vue
new file mode 100644
index 0000000..b5aeab5
--- /dev/null
+++ b/pages/workSpace/visit/vpeopleList.vue
@@ -0,0 +1,288 @@
+
+
+
+
+
+
+
+ 姓名:{{row.text}}
+ 手机号:{{row.visitor_.phone}}
+ 身份证号:{{row.visitor_.id_number}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 选择来访人员
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/workSpace/workSpace.vue b/pages/workSpace/workSpace.vue
index 8e44d3b..16debca 100644
--- a/pages/workSpace/workSpace.vue
+++ b/pages/workSpace/workSpace.vue
@@ -6,32 +6,16 @@
-
-
{{item.name}}
-
-
-
-
@@ -45,31 +29,6 @@
-
-
-
- {{val.itemName}}
-
-
- {{val.eventStatusValue}}
-
-
-
-
- 所属模块:{{val.menuName}}
-
-
-
- 申请人:{{val.applicantName}}
-
-
-
- {{val.submissionTime}}
-
-
-
-
-
@@ -84,31 +43,6 @@
-
-
-
- {{val.itemName}}
-
-
- {{val.eventStatusValue}}
-
-
-
-
- 所属模块:{{val.menuName}}
-
-
-
- 申请人:{{val.applicantName}}
-
-
-
- {{val.submissionTime}}
-
-
-
-
-
@@ -123,31 +57,6 @@
-
-
-
- {{val.itemName}}
-
-
- {{val.eventStatusValue}}
-
-
-
-
- 所属模块:{{val.menuName}}
-
-
-
- 申请人:{{val.applicantName}}
-
-
-
- {{val.submissionTime}}
-
-
-
-
-
@@ -160,42 +69,17 @@
name: "",
username: "",
routerList: [{
- name: '作业管理',
+ name: '新增作业',
icon: 'specialmatter.png',
path: 'index',
- childItems: [{
- name: "请假申请"
- },
- {
- name: "公出申请"
- },
- {
- name: "出差申请"
- },
- {
- name: "值班申请"
- },
- {
- name: "未打卡说明"
- }
-
- ],
- childUrls: [
- "/pages/workSpace/new_apply/del",
- "/pages/workSpace/new_apply/del",
- "/pages/workSpace/new_apply/del",
- "/pages/workSpace/new_apply/del",
- "/pages/workSpace/new_apply/del",
-
- ]
},
{
- name: '入厂项目',
+ name: '新增入厂',
icon: 'hetong.png',
path: 'index'
},
{
- name: '来访项目',
+ name: '新增来访',
icon: 'renli.png',
path: 'index'
},
@@ -212,15 +96,15 @@
goInto(index) {
if (index == 0) {
uni.navigateTo({
- url: '/pages/workSpace/newWork/work'
+ url: '/pages/workSpace/operation/operationCreate'
})
} else if (index == 1) {
uni.navigateTo({
- url: '/pages/workSpace/newWork/relevant'
+ url: '/pages/workSpace/rpj/rpjCreate'
})
} else if (index == 2) {
uni.navigateTo({
- url: '/pages/workSpace/newWork/visit'
+ url: '/pages/workSpace/visit/visitCreate'
})
}
@@ -269,233 +153,6 @@
})
},
- initList(routes) {
- const obj = routes.find(item => {
- return item.path === '/apply'
- })
- //合同管理
- const project = routes.find(item => {
- return item.path === '/project_management'
- })
- //通知公告
- const inform = routes.find(item => {
- return item.path === '/press'
- })
- let projectObj;
- let informObj;
- if (project) { //创建合同
- projectObj = project.children.find(item => {
- return item.path == "hetongxinxi_shoukuan";
- })
- }
- if (inform) { //通知公告
- informObj = inform.children.find(item => {
- return item.path == "index";
- })
- }
-
- if (obj) {
- const newObj = JSON.parse(JSON.stringify(obj));
- let arr = newObj.children;
- const index = arr.findIndex(item => {
- return item.path == "index";
- });
- if (index !== -1) {
- arr.splice(index, 1); //去除‘新建申请 index’
- }
-
- if (informObj) {
- const newInformObj = JSON.parse(JSON.stringify(informObj));
- arr.splice(arr.length, 0, newInformObj); //‘通知公告’放到倒数第一个
- }
-
- let htBackItem;
- for (let val of arr) {
- if (val.path == "yewufeiyong") {
- htBackItem = val;
- break;
- } else if (val.path == "jiesuanguanli") {
- htBackItem = val;
- break;
- } else if (val.path == "index_detail_xinwen") {
- htBackItem = val;
- break;
- } else if (val.path == "special_matter") {
- htBackItem = val;
- break;
- } else if (val.path == "issue_report") {
- htBackItem = val;
- break;
- } else if (val.path == "index") {
- htBackItem = val;
- break;
- }
- }
- if (projectObj) {
- const newProjectObj = JSON.parse(JSON.stringify(projectObj));
- newProjectObj.name = "创建合同";
- if (htBackItem) {
- const backIndex = arr.findIndex(item => {
- return item == htBackItem;
- })
- if (backIndex !== -1) {
- arr.splice(backIndex, 0, newProjectObj); //‘合同’插入业务费用之前
- } else {
- arr.push(newProjectObj) //容错处理
- }
- } else {
- arr.push(newProjectObj)
- }
- }
-
- this.routerList = arr.map(item => {
- item.childItems = [];
- item.childUrls = [];
- item.icon = "kaoqin.png";
- if (item.path == "kqgl") {
- item.icon = "kaoqin.png";
- item.childItems = [{
- name: "请假申请"
- },
- {
- name: "公出申请"
- },
- {
- name: "出差申请"
- },
- {
- name: "值班申请"
- },
- {
- name: "未打卡说明"
- }
-
- ];
- item.childUrls = [
- "/pages/workSpace/new_apply/kaoqin_management/qingjia_apply",
- "/pages/workSpace/new_apply/kaoqin_management/gongchu_apply",
- "/pages/workSpace/new_apply/kaoqin_management/chuchai_apply",
- "/pages/workSpace/new_apply/kaoqin_management/zhiban_apply",
- "/pages/workSpace/new_apply/kaoqin_management/weidaka_apply",
-
- ]
- } else if (item.path == "cl") {
- item.icon = "cheliang.png";
- item.childItems = [{
- name: "车辆维修、保养"
- },
- {
- name: "私车公用申请"
- },
- {
- name: "车辆使用登记"
- },
- ];
- item.childUrls = [
- "/pages/workSpace/new_apply/car_management/repair_car_apply",
- "/pages/workSpace/new_apply/car_management/private_car_public",
- "/pages/workSpace/new_apply/car_management/paicheshenqing",
- ]
- } else if (item.path == "cg") {
- item.icon = "caigou.png";
- item.childItems = [{
- name: "印刷品清单"
- },
- {
- name: "办公用品采购申请表"
- },
- {
- name: "固定资产采购申请表"
- },
- {
- name: "低值易耗品购置申请表"
- }
- ];
- item.childUrls = [
- "/pages/workSpace/new_apply/caigou_management/print_list_apply",
- "/pages/workSpace/new_apply/caigou_management/office_supplies_apply",
- "/pages/workSpace/new_apply/caigou_management/fixed_assets_apply",
- "/pages/workSpace/new_apply/caigou_management/low_value_products_apply"
- ];
- } else if (item.path == "gdzc") {
- item.icon = "fixedassets.png";
- item.childItems = [{
- name: "验收记录"
- },
- {
- name: "内部调拨记录表"
- },
- {
- name: "报废申请表"
- },
- {
- name: "维修申请表"
- }
- ];
- item.childUrls = [
- "/pages/workSpace/new_apply/fixed_assets_management/yanshoujilu",
- "/pages/workSpace/new_apply/fixed_assets_management/neibu_diaobo_apply",
- "/pages/workSpace/new_apply/fixed_assets_management/baofeishenqing",
- "/pages/workSpace/new_apply/fixed_assets_management/weixiushenqing"
- ];
- } else if (item.path == "jiesuanguanli") {
- item.icon = "jiesuan.png";
- } else if (item.path == "xinziguanli") {
- item.icon = "xinzi.png";
- } else if (item.path == "yewufeiyong") {
- item.icon = "yewu.png";
- } else if (item.path == "hetongxinxi_shoukuan") {
- item.icon = "hetong.png";
-
- } else if (item.path == "yzgl") {
- item.icon = "yinzhang.png";
- item.childItems = [{
- name: "刻章申请表"
- },
- {
- name: "重要文件/印鉴借用"
- },
- {
- name: '销毁印鉴申请表'
- },
- {
- name: "印章申请表"
- }
- ];
- item.childUrls = [
- "/pages/workSpace/new_apply/yinzhang__management/kedushenqingbiao",
- "/pages/workSpace/new_apply/yinzhang__management/zhongyaowenjian",
- "/pages/workSpace/new_apply/yinzhang__management/xiaohuiyinjian",
- "/pages/workSpace/new_apply/yinzhang__management/yinzhangshenqingbiao"
- ];
- } else if (item.path == "zdwj") {
- item.name = "制度文件";
- item.icon = "zhidu.png";
- item.childItems = [{
- name: "红头文件审批"
- },
- {
- name: "红头文件审批(涉及财务)"
- },
- ];
- item.childUrls = [
- "/pages/workSpace/new_apply/zhiduwenjian_management/hongtouwenjian",
- "/pages/workSpace/new_apply/zhiduwenjian_management/hongtouwenjian_cw"
- ];
- } else if (item.path == "issue_report") {
- item.icon = "fafang.png"
- } else if (item.path == "special_matter") {
- item.icon = "specialmatter.png"
- } else if (item.path == "index") {
- item.name = "通知公告";
- item.icon = "tongzhigonggao.png"
- }
- return item;
- })
- }
- },
-
-
/* 跳转详情页 */
intoUpdataPage(val) {
@@ -582,15 +239,15 @@
goIntoMoreApply(index) {
if (index === 'operation')
uni.navigateTo({
- url: '/pages/workSpace/list/opreation'
+ url: '/pages/workSpace/operation/operationList'
})
else if (index === 'rpj')
uni.navigateTo({
- url: '/pages/workSpace/list/rpj'
+ url: '/pages/workSpace/rpj/rpjLisst'
})
else if (index === 'visit')
uni.navigateTo({
- url: '/pages/workSpace/list/visit'
+ url: '/pages/workSpace/visit/visitList'
})
}
}
diff --git a/uni_modules/uni-card/changelog.md b/uni_modules/uni-card/changelog.md
new file mode 100644
index 0000000..c3cd8c4
--- /dev/null
+++ b/uni_modules/uni-card/changelog.md
@@ -0,0 +1,26 @@
+## 1.3.1(2021-12-20)
+- 修复 在vue页面下略缩图显示不正常的bug
+## 1.3.0(2021-11-19)
+- 重构插槽的用法 ,header 替换为 title
+- 新增 actions 插槽
+- 新增 cover 封面图属性和插槽
+- 新增 padding 内容默认内边距离
+- 新增 margin 卡片默认外边距离
+- 新增 spacing 卡片默认内边距
+- 新增 shadow 卡片阴影属性
+- 取消 mode 属性,可使用组合插槽代替
+- 取消 note 属性 ,使用actions插槽代替
+- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
+- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-card](https://uniapp.dcloud.io/component/uniui/uni-card)
+## 1.2.1(2021-07-30)
+- 优化 vue3下事件警告的问题
+## 1.2.0(2021-07-13)
+- 组件兼容 vue3,如何创建vue3项目详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
+## 1.1.8(2021-07-01)
+- 优化 图文卡片无图片加载时,提供占位图标
+- 新增 header 插槽,自定义卡片头部( 图文卡片 mode="style" 时,不支持)
+- 修复 thumbnail 不存在仍然占位的 bug
+## 1.1.7(2021-05-12)
+- 新增 组件示例地址
+## 1.1.6(2021-02-04)
+- 调整为uni_modules目录规范
diff --git a/uni_modules/uni-card/components/uni-card/uni-card.vue b/uni_modules/uni-card/components/uni-card/uni-card.vue
new file mode 100644
index 0000000..38cf594
--- /dev/null
+++ b/uni_modules/uni-card/components/uni-card/uni-card.vue
@@ -0,0 +1,270 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/uni-card/package.json b/uni_modules/uni-card/package.json
new file mode 100644
index 0000000..f16224d
--- /dev/null
+++ b/uni_modules/uni-card/package.json
@@ -0,0 +1,90 @@
+{
+ "id": "uni-card",
+ "displayName": "uni-card 卡片",
+ "version": "1.3.1",
+ "description": "Card 组件,提供常见的卡片样式。",
+ "keywords": [
+ "uni-ui",
+ "uniui",
+ "card",
+ "",
+ "卡片"
+],
+ "repository": "https://github.com/dcloudio/uni-ui",
+ "engines": {
+ "HBuilderX": ""
+ },
+ "directories": {
+ "example": "../../temps/example_temps"
+ },
+ "dcloudext": {
+ "category": [
+ "前端组件",
+ "通用组件"
+ ],
+ "sale": {
+ "regular": {
+ "price": "0.00"
+ },
+ "sourcecode": {
+ "price": "0.00"
+ }
+ },
+ "contact": {
+ "qq": ""
+ },
+ "declaration": {
+ "ads": "无",
+ "data": "无",
+ "permissions": "无"
+ },
+ "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
+ },
+ "uni_modules": {
+ "dependencies": [
+ "uni-icons",
+ "uni-scss"
+ ],
+ "encrypt": [],
+ "platforms": {
+ "cloud": {
+ "tcb": "y",
+ "aliyun": "y"
+ },
+ "client": {
+ "App": {
+ "app-vue": "y",
+ "app-nvue": "y"
+ },
+ "H5-mobile": {
+ "Safari": "y",
+ "Android Browser": "y",
+ "微信浏览器(Android)": "y",
+ "QQ浏览器(Android)": "y"
+ },
+ "H5-pc": {
+ "Chrome": "y",
+ "IE": "y",
+ "Edge": "y",
+ "Firefox": "y",
+ "Safari": "y"
+ },
+ "小程序": {
+ "微信": "y",
+ "阿里": "y",
+ "百度": "y",
+ "字节跳动": "y",
+ "QQ": "y"
+ },
+ "快应用": {
+ "华为": "u",
+ "联盟": "u"
+ },
+ "Vue": {
+ "vue2": "y",
+ "vue3": "y"
+ }
+ }
+ }
+ }
+}
diff --git a/uni_modules/uni-card/readme.md b/uni_modules/uni-card/readme.md
new file mode 100644
index 0000000..7434e71
--- /dev/null
+++ b/uni_modules/uni-card/readme.md
@@ -0,0 +1,12 @@
+
+
+## Card 卡片
+> **组件名:uni-card**
+> 代码块: `uCard`
+
+卡片视图组件。
+
+### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-card)
+#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
+
+
diff --git a/uni_modules/uni-datetime-picker/changelog.md b/uni_modules/uni-datetime-picker/changelog.md
new file mode 100644
index 0000000..5c9735a
--- /dev/null
+++ b/uni_modules/uni-datetime-picker/changelog.md
@@ -0,0 +1,93 @@
+## 2.2.6(2022-06-30)
+- 优化 组件样式,调整了组件图标大小、高度、颜色等,与uni-ui风格保持一致
+## 2.2.5(2022-06-24)
+- 修复 日历顶部年月及底部确认未国际化 bug
+## 2.2.4(2022-03-31)
+- 修复 Vue3 下动态赋值,单选类型未响应的 bug
+## 2.2.3(2022-03-28)
+- 修复 Vue3 下动态赋值未响应的 bug
+## 2.2.2(2021-12-10)
+- 修复 clear-icon 属性在小程序平台不生效的 bug
+## 2.2.1(2021-12-10)
+- 修复 日期范围选在小程序平台,必须多点击一次才能取消选中状态的 bug
+## 2.2.0(2021-11-19)
+- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
+- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-datetime-picker](https://uniapp.dcloud.io/component/uniui/uni-datetime-picker)
+## 2.1.5(2021-11-09)
+- 新增 提供组件设计资源,组件样式调整
+## 2.1.4(2021-09-10)
+- 修复 hide-second 在移动端的 bug
+- 修复 单选赋默认值时,赋值日期未高亮的 bug
+- 修复 赋默认值时,移动端未正确显示时间的 bug
+## 2.1.3(2021-09-09)
+- 新增 hide-second 属性,支持只使用时分,隐藏秒
+## 2.1.2(2021-09-03)
+- 优化 取消选中时(范围选)直接开始下一次选择, 避免多点一次
+- 优化 移动端支持清除按钮,同时支持通过 ref 调用组件的 clear 方法
+- 优化 调整字号大小,美化日历界面
+- 修复 因国际化导致的 placeholder 失效的 bug
+## 2.1.1(2021-08-24)
+- 新增 支持国际化
+- 优化 范围选择器在 pc 端过宽的问题
+## 2.1.0(2021-08-09)
+- 新增 适配 vue3
+## 2.0.19(2021-08-09)
+- 新增 支持作为 uni-forms 子组件相关功能
+- 修复 在 uni-forms 中使用时,选择时间报 NAN 错误的 bug
+## 2.0.18(2021-08-05)
+- 修复 type 属性动态赋值无效的 bug
+- 修复 ‘确认’按钮被 tabbar 遮盖 bug
+- 修复 组件未赋值时范围选左、右日历相同的 bug
+## 2.0.17(2021-08-04)
+- 修复 范围选未正确显示当前值的 bug
+- 修复 h5 平台(移动端)报错 'cale' of undefined 的 bug
+## 2.0.16(2021-07-21)
+- 新增 return-type 属性支持返回 date 日期对象
+## 2.0.15(2021-07-14)
+- 修复 单选日期类型,初始赋值后不在当前日历的 bug
+- 新增 clearIcon 属性,显示框的清空按钮可配置显示隐藏(仅 pc 有效)
+- 优化 移动端移除显示框的清空按钮,无实际用途
+## 2.0.14(2021-07-14)
+- 修复 组件赋值为空,界面未更新的 bug
+- 修复 start 和 end 不能动态赋值的 bug
+- 修复 范围选类型,用户选择后再次选择右侧日历(结束日期)显示不正确的 bug
+## 2.0.13(2021-07-08)
+- 修复 范围选择不能动态赋值的 bug
+## 2.0.12(2021-07-08)
+- 修复 范围选择的初始时间在一个月内时,造成无法选择的bug
+## 2.0.11(2021-07-08)
+- 优化 弹出层在超出视窗边缘定位不准确的问题
+## 2.0.10(2021-07-08)
+- 修复 范围起始点样式的背景色与今日样式的字体前景色融合,导致日期字体看不清的 bug
+- 优化 弹出层在超出视窗边缘被遮盖的问题
+## 2.0.9(2021-07-07)
+- 新增 maskClick 事件
+- 修复 特殊情况日历 rpx 布局错误的 bug,rpx -> px
+- 修复 范围选择时清空返回值不合理的bug,['', ''] -> []
+## 2.0.8(2021-07-07)
+- 新增 日期时间显示框支持插槽
+## 2.0.7(2021-07-01)
+- 优化 添加 uni-icons 依赖
+## 2.0.6(2021-05-22)
+- 修复 图标在小程序上不显示的 bug
+- 优化 重命名引用组件,避免潜在组件命名冲突
+## 2.0.5(2021-05-20)
+- 优化 代码目录扁平化
+## 2.0.4(2021-05-12)
+- 新增 组件示例地址
+## 2.0.3(2021-05-10)
+- 修复 ios 下不识别 '-' 日期格式的 bug
+- 优化 pc 下弹出层添加边框和阴影
+## 2.0.2(2021-05-08)
+- 修复 在 admin 中获取弹出层定位错误的bug
+## 2.0.1(2021-05-08)
+- 修复 type 属性向下兼容,默认值从 date 变更为 datetime
+## 2.0.0(2021-04-30)
+- 支持日历形式的日期+时间的范围选择
+ > 注意:此版本不向后兼容,不再支持单独时间选择(type=time)及相关的 hide-second 属性(时间选可使用内置组件 picker)
+## 1.0.6(2021-03-18)
+- 新增 hide-second 属性,时间支持仅选择时、分
+- 修复 选择跟显示的日期不一样的 bug
+- 修复 chang事件触发2次的 bug
+- 修复 分、秒 end 范围错误的 bug
+- 优化 更好的 nvue 适配
diff --git a/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar-item.vue b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar-item.vue
new file mode 100644
index 0000000..3d2dbea
--- /dev/null
+++ b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar-item.vue
@@ -0,0 +1,185 @@
+
+
+
+
+ {{weeks.date}}
+
+
+
+
+
+
+
+
diff --git a/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar.vue b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar.vue
new file mode 100644
index 0000000..8f7f181
--- /dev/null
+++ b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar.vue
@@ -0,0 +1,907 @@
+
+
+
+
+
+
+
+ {{nowDate.month}}
+
+
+
+ {{SUNText}}
+
+
+ {{MONText}}
+
+
+ {{TUEText}}
+
+
+ {{WEDText}}
+
+
+ {{THUText}}
+
+
+ {{FRIText}}
+
+
+ {{SATText}}
+
+
+
+
+
+
+
+
+
+
+ {{tempSingleDate ? tempSingleDate : selectDateText}}
+
+
+
+
+
+
+ {{tempRange.before ? tempRange.before : startDateText}}
+
+
+
+
+
+
+ {{tempRange.after ? tempRange.after : endDateText}}
+
+
+
+
+
+
+ {{confirmText}}
+
+
+
+
+
+
+
+
diff --git a/uni_modules/uni-datetime-picker/components/uni-datetime-picker/i18n/en.json b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/i18n/en.json
new file mode 100644
index 0000000..9acf1ab
--- /dev/null
+++ b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/i18n/en.json
@@ -0,0 +1,22 @@
+{
+ "uni-datetime-picker.selectDate": "select date",
+ "uni-datetime-picker.selectTime": "select time",
+ "uni-datetime-picker.selectDateTime": "select datetime",
+ "uni-datetime-picker.startDate": "start date",
+ "uni-datetime-picker.endDate": "end date",
+ "uni-datetime-picker.startTime": "start time",
+ "uni-datetime-picker.endTime": "end time",
+ "uni-datetime-picker.ok": "ok",
+ "uni-datetime-picker.clear": "clear",
+ "uni-datetime-picker.cancel": "cancel",
+ "uni-datetime-picker.year": "-",
+ "uni-datetime-picker.month": "",
+ "uni-calender.MON": "MON",
+ "uni-calender.TUE": "TUE",
+ "uni-calender.WED": "WED",
+ "uni-calender.THU": "THU",
+ "uni-calender.FRI": "FRI",
+ "uni-calender.SAT": "SAT",
+ "uni-calender.SUN": "SUN",
+ "uni-calender.confirm": "confirm"
+}
diff --git a/uni_modules/uni-datetime-picker/components/uni-datetime-picker/i18n/index.js b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/i18n/index.js
new file mode 100644
index 0000000..de7509c
--- /dev/null
+++ b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/i18n/index.js
@@ -0,0 +1,8 @@
+import en from './en.json'
+import zhHans from './zh-Hans.json'
+import zhHant from './zh-Hant.json'
+export default {
+ en,
+ 'zh-Hans': zhHans,
+ 'zh-Hant': zhHant
+}
diff --git a/uni_modules/uni-datetime-picker/components/uni-datetime-picker/i18n/zh-Hans.json b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/i18n/zh-Hans.json
new file mode 100644
index 0000000..d2df5e7
--- /dev/null
+++ b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/i18n/zh-Hans.json
@@ -0,0 +1,22 @@
+{
+ "uni-datetime-picker.selectDate": "选择日期",
+ "uni-datetime-picker.selectTime": "选择时间",
+ "uni-datetime-picker.selectDateTime": "选择日期时间",
+ "uni-datetime-picker.startDate": "开始日期",
+ "uni-datetime-picker.endDate": "结束日期",
+ "uni-datetime-picker.startTime": "开始时间",
+ "uni-datetime-picker.endTime": "结束时间",
+ "uni-datetime-picker.ok": "确定",
+ "uni-datetime-picker.clear": "清除",
+ "uni-datetime-picker.cancel": "取消",
+ "uni-datetime-picker.year": "年",
+ "uni-datetime-picker.month": "月",
+ "uni-calender.SUN": "日",
+ "uni-calender.MON": "一",
+ "uni-calender.TUE": "二",
+ "uni-calender.WED": "三",
+ "uni-calender.THU": "四",
+ "uni-calender.FRI": "五",
+ "uni-calender.SAT": "六",
+ "uni-calender.confirm": "确认"
+}
\ No newline at end of file
diff --git a/uni_modules/uni-datetime-picker/components/uni-datetime-picker/i18n/zh-Hant.json b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/i18n/zh-Hant.json
new file mode 100644
index 0000000..d23fa3c
--- /dev/null
+++ b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/i18n/zh-Hant.json
@@ -0,0 +1,22 @@
+{
+ "uni-datetime-picker.selectDate": "選擇日期",
+ "uni-datetime-picker.selectTime": "選擇時間",
+ "uni-datetime-picker.selectDateTime": "選擇日期時間",
+ "uni-datetime-picker.startDate": "開始日期",
+ "uni-datetime-picker.endDate": "結束日期",
+ "uni-datetime-picker.startTime": "開始时间",
+ "uni-datetime-picker.endTime": "結束时间",
+ "uni-datetime-picker.ok": "確定",
+ "uni-datetime-picker.clear": "清除",
+ "uni-datetime-picker.cancel": "取消",
+ "uni-datetime-picker.year": "年",
+ "uni-datetime-picker.month": "月",
+ "uni-calender.SUN": "日",
+ "uni-calender.MON": "一",
+ "uni-calender.TUE": "二",
+ "uni-calender.WED": "三",
+ "uni-calender.THU": "四",
+ "uni-calender.FRI": "五",
+ "uni-calender.SAT": "六",
+ "uni-calender.confirm": "確認"
+}
\ No newline at end of file
diff --git a/uni_modules/uni-datetime-picker/components/uni-datetime-picker/keypress.js b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/keypress.js
new file mode 100644
index 0000000..9601aba
--- /dev/null
+++ b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/keypress.js
@@ -0,0 +1,45 @@
+// #ifdef H5
+export default {
+ name: 'Keypress',
+ props: {
+ disable: {
+ type: Boolean,
+ default: false
+ }
+ },
+ mounted () {
+ const keyNames = {
+ esc: ['Esc', 'Escape'],
+ tab: 'Tab',
+ enter: 'Enter',
+ space: [' ', 'Spacebar'],
+ up: ['Up', 'ArrowUp'],
+ left: ['Left', 'ArrowLeft'],
+ right: ['Right', 'ArrowRight'],
+ down: ['Down', 'ArrowDown'],
+ delete: ['Backspace', 'Delete', 'Del']
+ }
+ const listener = ($event) => {
+ if (this.disable) {
+ return
+ }
+ const keyName = Object.keys(keyNames).find(key => {
+ const keyName = $event.key
+ const value = keyNames[key]
+ return value === keyName || (Array.isArray(value) && value.includes(keyName))
+ })
+ if (keyName) {
+ // 避免和其他按键事件冲突
+ setTimeout(() => {
+ this.$emit(keyName, {})
+ }, 0)
+ }
+ }
+ document.addEventListener('keyup', listener)
+ this.$once('hook:beforeDestroy', () => {
+ document.removeEventListener('keyup', listener)
+ })
+ },
+ render: () => {}
+}
+// #endif
\ No newline at end of file
diff --git a/uni_modules/uni-datetime-picker/components/uni-datetime-picker/time-picker.vue b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/time-picker.vue
new file mode 100644
index 0000000..699aa63
--- /dev/null
+++ b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/time-picker.vue
@@ -0,0 +1,927 @@
+
+
+
+
+
+ {{time}}
+
+ {{selectTimeText}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue
new file mode 100644
index 0000000..9bdf8bc
--- /dev/null
+++ b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue
@@ -0,0 +1,1012 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{rangeSeparator}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/uni-datetime-picker/components/uni-datetime-picker/util.js b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/util.js
new file mode 100644
index 0000000..efa5773
--- /dev/null
+++ b/uni_modules/uni-datetime-picker/components/uni-datetime-picker/util.js
@@ -0,0 +1,410 @@
+class Calendar {
+ constructor({
+ date,
+ selected,
+ startDate,
+ endDate,
+ range,
+ // multipleStatus
+ } = {}) {
+ // 当前日期
+ this.date = this.getDate(new Date()) // 当前初入日期
+ // 打点信息
+ this.selected = selected || [];
+ // 范围开始
+ this.startDate = startDate
+ // 范围结束
+ this.endDate = endDate
+ this.range = range
+ // 多选状态
+ this.cleanMultipleStatus()
+ // 每周日期
+ this.weeks = {}
+ // this._getWeek(this.date.fullDate)
+ // this.multipleStatus = multipleStatus
+ this.lastHover = false
+ }
+ /**
+ * 设置日期
+ * @param {Object} date
+ */
+ setDate(date) {
+ this.selectDate = this.getDate(date)
+ this._getWeek(this.selectDate.fullDate)
+ }
+
+ /**
+ * 清理多选状态
+ */
+ cleanMultipleStatus() {
+ this.multipleStatus = {
+ before: '',
+ after: '',
+ data: []
+ }
+ }
+
+ /**
+ * 重置开始日期
+ */
+ resetSatrtDate(startDate) {
+ // 范围开始
+ this.startDate = startDate
+
+ }
+
+ /**
+ * 重置结束日期
+ */
+ resetEndDate(endDate) {
+ // 范围结束
+ this.endDate = endDate
+ }
+
+ /**
+ * 获取任意时间
+ */
+ getDate(date, AddDayCount = 0, str = 'day') {
+ if (!date) {
+ date = new Date()
+ }
+ if (typeof date !== 'object') {
+ date = date.replace(/-/g, '/')
+ }
+ const dd = new Date(date)
+ switch (str) {
+ case 'day':
+ dd.setDate(dd.getDate() + AddDayCount) // 获取AddDayCount天后的日期
+ break
+ case 'month':
+ if (dd.getDate() === 31) {
+ dd.setDate(dd.getDate() + AddDayCount)
+ } else {
+ dd.setMonth(dd.getMonth() + AddDayCount) // 获取AddDayCount天后的日期
+ }
+ break
+ case 'year':
+ dd.setFullYear(dd.getFullYear() + AddDayCount) // 获取AddDayCount天后的日期
+ break
+ }
+ const y = dd.getFullYear()
+ const m = dd.getMonth() + 1 < 10 ? '0' + (dd.getMonth() + 1) : dd.getMonth() + 1 // 获取当前月份的日期,不足10补0
+ const d = dd.getDate() < 10 ? '0' + dd.getDate() : dd.getDate() // 获取当前几号,不足10补0
+ return {
+ fullDate: y + '-' + m + '-' + d,
+ year: y,
+ month: m,
+ date: d,
+ day: dd.getDay()
+ }
+ }
+
+
+ /**
+ * 获取上月剩余天数
+ */
+ _getLastMonthDays(firstDay, full) {
+ let dateArr = []
+ for (let i = firstDay; i > 0; i--) {
+ const beforeDate = new Date(full.year, full.month - 1, -i + 1).getDate()
+ dateArr.push({
+ date: beforeDate,
+ month: full.month - 1,
+ disable: true
+ })
+ }
+ return dateArr
+ }
+ /**
+ * 获取本月天数
+ */
+ _currentMonthDys(dateData, full) {
+ let dateArr = []
+ let fullDate = this.date.fullDate
+ for (let i = 1; i <= dateData; i++) {
+ let isinfo = false
+ let nowDate = full.year + '-' + (full.month < 10 ?
+ full.month : full.month) + '-' + (i < 10 ?
+ '0' + i : i)
+ // 是否今天
+ let isDay = fullDate === nowDate
+ // 获取打点信息
+ let info = this.selected && this.selected.find((item) => {
+ if (this.dateEqual(nowDate, item.date)) {
+ return item
+ }
+ })
+
+ // 日期禁用
+ let disableBefore = true
+ let disableAfter = true
+ if (this.startDate) {
+ // let dateCompBefore = this.dateCompare(this.startDate, fullDate)
+ // disableBefore = this.dateCompare(dateCompBefore ? this.startDate : fullDate, nowDate)
+ disableBefore = this.dateCompare(this.startDate, nowDate)
+ }
+
+ if (this.endDate) {
+ // let dateCompAfter = this.dateCompare(fullDate, this.endDate)
+ // disableAfter = this.dateCompare(nowDate, dateCompAfter ? this.endDate : fullDate)
+ disableAfter = this.dateCompare(nowDate, this.endDate)
+ }
+ let multiples = this.multipleStatus.data
+ let checked = false
+ let multiplesStatus = -1
+ if (this.range) {
+ if (multiples) {
+ multiplesStatus = multiples.findIndex((item) => {
+ return this.dateEqual(item, nowDate)
+ })
+ }
+ if (multiplesStatus !== -1) {
+ checked = true
+ }
+ }
+ let data = {
+ fullDate: nowDate,
+ year: full.year,
+ date: i,
+ multiple: this.range ? checked : false,
+ beforeMultiple: this.isLogicBefore(nowDate, this.multipleStatus.before, this.multipleStatus.after),
+ afterMultiple: this.isLogicAfter(nowDate, this.multipleStatus.before, this.multipleStatus.after),
+ month: full.month,
+ disable: !(disableBefore && disableAfter),
+ isDay,
+ userChecked: false
+ }
+ if (info) {
+ data.extraInfo = info
+ }
+
+ dateArr.push(data)
+ }
+ return dateArr
+ }
+ /**
+ * 获取下月天数
+ */
+ _getNextMonthDays(surplus, full) {
+ let dateArr = []
+ for (let i = 1; i < surplus + 1; i++) {
+ dateArr.push({
+ date: i,
+ month: Number(full.month) + 1,
+ disable: true
+ })
+ }
+ return dateArr
+ }
+
+ /**
+ * 获取当前日期详情
+ * @param {Object} date
+ */
+ getInfo(date) {
+ if (!date) {
+ date = new Date()
+ }
+ const dateInfo = this.canlender.find(item => item.fullDate === this.getDate(date).fullDate)
+ return dateInfo
+ }
+
+ /**
+ * 比较时间大小
+ */
+ dateCompare(startDate, endDate) {
+ // 计算截止时间
+ startDate = new Date(startDate.replace('-', '/').replace('-', '/'))
+ // 计算详细项的截止时间
+ endDate = new Date(endDate.replace('-', '/').replace('-', '/'))
+ if (startDate <= endDate) {
+ return true
+ } else {
+ return false
+ }
+ }
+
+ /**
+ * 比较时间是否相等
+ */
+ dateEqual(before, after) {
+ // 计算截止时间
+ before = new Date(before.replace('-', '/').replace('-', '/'))
+ // 计算详细项的截止时间
+ after = new Date(after.replace('-', '/').replace('-', '/'))
+ if (before.getTime() - after.getTime() === 0) {
+ return true
+ } else {
+ return false
+ }
+ }
+
+ /**
+ * 比较真实起始日期
+ */
+
+ isLogicBefore(currentDay, before, after) {
+ let logicBefore = before
+ if (before && after) {
+ logicBefore = this.dateCompare(before, after) ? before : after
+ }
+ return this.dateEqual(logicBefore, currentDay)
+ }
+
+ isLogicAfter(currentDay, before, after) {
+ let logicAfter = after
+ if (before && after) {
+ logicAfter = this.dateCompare(before, after) ? after : before
+ }
+ return this.dateEqual(logicAfter, currentDay)
+ }
+
+ /**
+ * 获取日期范围内所有日期
+ * @param {Object} begin
+ * @param {Object} end
+ */
+ geDateAll(begin, end) {
+ var arr = []
+ var ab = begin.split('-')
+ var ae = end.split('-')
+ var db = new Date()
+ db.setFullYear(ab[0], ab[1] - 1, ab[2])
+ var de = new Date()
+ de.setFullYear(ae[0], ae[1] - 1, ae[2])
+ var unixDb = db.getTime() - 24 * 60 * 60 * 1000
+ var unixDe = de.getTime() - 24 * 60 * 60 * 1000
+ for (var k = unixDb; k <= unixDe;) {
+ k = k + 24 * 60 * 60 * 1000
+ arr.push(this.getDate(new Date(parseInt(k))).fullDate)
+ }
+ return arr
+ }
+
+ /**
+ * 获取多选状态
+ */
+ setMultiple(fullDate) {
+ let {
+ before,
+ after
+ } = this.multipleStatus
+ if (!this.range) return
+ if (before && after) {
+ if (!this.lastHover) {
+ this.lastHover = true
+ return
+ }
+ this.multipleStatus.before = fullDate
+ this.multipleStatus.after = ''
+ this.multipleStatus.data = []
+ this.multipleStatus.fulldate = ''
+ this.lastHover = false
+ } else {
+ if (!before) {
+ this.multipleStatus.before = fullDate
+ this.lastHover = false
+ } else {
+ this.multipleStatus.after = fullDate
+ if (this.dateCompare(this.multipleStatus.before, this.multipleStatus.after)) {
+ this.multipleStatus.data = this.geDateAll(this.multipleStatus.before, this.multipleStatus
+ .after);
+ } else {
+ this.multipleStatus.data = this.geDateAll(this.multipleStatus.after, this.multipleStatus
+ .before);
+ }
+ this.lastHover = true
+ }
+ }
+ this._getWeek(fullDate)
+ }
+
+ /**
+ * 鼠标 hover 更新多选状态
+ */
+ setHoverMultiple(fullDate) {
+ let {
+ before,
+ after
+ } = this.multipleStatus
+
+ if (!this.range) return
+ if (this.lastHover) return
+
+ if (!before) {
+ this.multipleStatus.before = fullDate
+ } else {
+ this.multipleStatus.after = fullDate
+ if (this.dateCompare(this.multipleStatus.before, this.multipleStatus.after)) {
+ this.multipleStatus.data = this.geDateAll(this.multipleStatus.before, this.multipleStatus.after);
+ } else {
+ this.multipleStatus.data = this.geDateAll(this.multipleStatus.after, this.multipleStatus.before);
+ }
+ }
+ this._getWeek(fullDate)
+ }
+
+ /**
+ * 更新默认值多选状态
+ */
+ setDefaultMultiple(before, after) {
+ this.multipleStatus.before = before
+ this.multipleStatus.after = after
+ if (before && after) {
+ if (this.dateCompare(before, after)) {
+ this.multipleStatus.data = this.geDateAll(before, after);
+ this._getWeek(after)
+ } else {
+ this.multipleStatus.data = this.geDateAll(after, before);
+ this._getWeek(before)
+ }
+ }
+ }
+
+ /**
+ * 获取每周数据
+ * @param {Object} dateData
+ */
+ _getWeek(dateData) {
+ const {
+ fullDate,
+ year,
+ month,
+ date,
+ day
+ } = this.getDate(dateData)
+ let firstDay = new Date(year, month - 1, 1).getDay()
+ let currentDay = new Date(year, month, 0).getDate()
+ let dates = {
+ lastMonthDays: this._getLastMonthDays(firstDay, this.getDate(dateData)), // 上个月末尾几天
+ currentMonthDys: this._currentMonthDys(currentDay, this.getDate(dateData)), // 本月天数
+ nextMonthDays: [], // 下个月开始几天
+ weeks: []
+ }
+ let canlender = []
+ const surplus = 42 - (dates.lastMonthDays.length + dates.currentMonthDys.length)
+ dates.nextMonthDays = this._getNextMonthDays(surplus, this.getDate(dateData))
+ canlender = canlender.concat(dates.lastMonthDays, dates.currentMonthDys, dates.nextMonthDays)
+ let weeks = {}
+ // 拼接数组 上个月开始几天 + 本月天数+ 下个月开始几天
+ for (let i = 0; i < canlender.length; i++) {
+ if (i % 7 === 0) {
+ weeks[parseInt(i / 7)] = new Array(7)
+ }
+ weeks[parseInt(i / 7)][i % 7] = canlender[i]
+ }
+ this.canlender = canlender
+ this.weeks = weeks
+ }
+
+ //静态方法
+ // static init(date) {
+ // if (!this.instance) {
+ // this.instance = new Calendar(date);
+ // }
+ // return this.instance;
+ // }
+}
+
+
+export default Calendar
diff --git a/uni_modules/uni-datetime-picker/package.json b/uni_modules/uni-datetime-picker/package.json
new file mode 100644
index 0000000..60fa1d0
--- /dev/null
+++ b/uni_modules/uni-datetime-picker/package.json
@@ -0,0 +1,90 @@
+{
+ "id": "uni-datetime-picker",
+ "displayName": "uni-datetime-picker 日期选择器",
+ "version": "2.2.6",
+ "description": "uni-datetime-picker 日期时间选择器,支持日历,支持范围选择",
+ "keywords": [
+ "uni-datetime-picker",
+ "uni-ui",
+ "uniui",
+ "日期时间选择器",
+ "日期时间"
+],
+ "repository": "https://github.com/dcloudio/uni-ui",
+ "engines": {
+ "HBuilderX": ""
+ },
+ "directories": {
+ "example": "../../temps/example_temps"
+ },
+ "dcloudext": {
+ "category": [
+ "前端组件",
+ "通用组件"
+ ],
+ "sale": {
+ "regular": {
+ "price": "0.00"
+ },
+ "sourcecode": {
+ "price": "0.00"
+ }
+ },
+ "contact": {
+ "qq": ""
+ },
+ "declaration": {
+ "ads": "无",
+ "data": "无",
+ "permissions": "无"
+ },
+ "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
+ },
+ "uni_modules": {
+ "dependencies": [
+ "uni-scss",
+ "uni-icons"
+ ],
+ "encrypt": [],
+ "platforms": {
+ "cloud": {
+ "tcb": "y",
+ "aliyun": "y"
+ },
+ "client": {
+ "App": {
+ "app-vue": "y",
+ "app-nvue": "n"
+ },
+ "H5-mobile": {
+ "Safari": "y",
+ "Android Browser": "y",
+ "微信浏览器(Android)": "y",
+ "QQ浏览器(Android)": "y"
+ },
+ "H5-pc": {
+ "Chrome": "y",
+ "IE": "y",
+ "Edge": "y",
+ "Firefox": "y",
+ "Safari": "y"
+ },
+ "小程序": {
+ "微信": "y",
+ "阿里": "y",
+ "百度": "y",
+ "字节跳动": "y",
+ "QQ": "y"
+ },
+ "快应用": {
+ "华为": "u",
+ "联盟": "u"
+ },
+ "Vue": {
+ "vue2": "y",
+ "vue3": "y"
+ }
+ }
+ }
+ }
+}
diff --git a/uni_modules/uni-datetime-picker/readme.md b/uni_modules/uni-datetime-picker/readme.md
new file mode 100644
index 0000000..162fbef
--- /dev/null
+++ b/uni_modules/uni-datetime-picker/readme.md
@@ -0,0 +1,21 @@
+
+
+> `重要通知:组件升级更新 2.0.0 后,支持日期+时间范围选择,组件 ui 将使用日历选择日期,ui 变化较大,同时支持 PC 和 移动端。此版本不向后兼容,不再支持单独的时间选择(type=time)及相关的 hide-second 属性(时间选可使用内置组件 picker)。若仍需使用旧版本,可在插件市场下载*非uni_modules版本*,旧版本将不再维护`
+
+## DatetimePicker 时间选择器
+
+> **组件名:uni-datetime-picker**
+> 代码块: `uDatetimePicker`
+
+
+该组件的优势是,支持**时间戳**输入和输出(起始时间、终止时间也支持时间戳),可**同时选择**日期和时间。
+
+若只是需要单独选择日期和时间,不需要时间戳输入和输出,可使用原生的 picker 组件。
+
+**_点击 picker 默认值规则:_**
+
+- 若设置初始值 value, 会显示在 picker 显示框中
+- 若无初始值 value,则初始值 value 为当前本地时间 Date.now(), 但不会显示在 picker 显示框中
+
+### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-datetime-picker)
+#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
\ No newline at end of file
diff --git a/uni_modules/uni-section/changelog.md b/uni_modules/uni-section/changelog.md
new file mode 100644
index 0000000..738f2b3
--- /dev/null
+++ b/uni_modules/uni-section/changelog.md
@@ -0,0 +1,2 @@
+## 0.0.1(2022-07-22)
+- 初始化
diff --git a/uni_modules/uni-section/components/uni-section/uni-section.vue b/uni_modules/uni-section/components/uni-section/uni-section.vue
new file mode 100644
index 0000000..9a52e0b
--- /dev/null
+++ b/uni_modules/uni-section/components/uni-section/uni-section.vue
@@ -0,0 +1,167 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/uni_modules/uni-section/package.json b/uni_modules/uni-section/package.json
new file mode 100644
index 0000000..0a31fb5
--- /dev/null
+++ b/uni_modules/uni-section/package.json
@@ -0,0 +1,87 @@
+{
+ "id": "uni-section",
+ "displayName": "uni-section 标题栏",
+ "version": "0.0.1",
+ "description": "标题栏组件",
+ "keywords": [
+ "uni-ui",
+ "uniui",
+ "标题栏"
+],
+ "repository": "https://github.com/dcloudio/uni-ui",
+ "engines": {
+ "HBuilderX": ""
+ },
+ "directories": {
+ "example": "../../temps/example_temps"
+ },
+ "dcloudext": {
+ "category": [
+ "前端组件",
+ "通用组件"
+ ],
+ "sale": {
+ "regular": {
+ "price": "0.00"
+ },
+ "sourcecode": {
+ "price": "0.00"
+ }
+ },
+ "contact": {
+ "qq": ""
+ },
+ "declaration": {
+ "ads": "无",
+ "data": "无",
+ "permissions": "无"
+ },
+ "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
+ },
+ "uni_modules": {
+ "dependencies": [
+ "uni-scss"
+ ],
+ "encrypt": [],
+ "platforms": {
+ "cloud": {
+ "tcb": "y",
+ "aliyun": "y"
+ },
+ "client": {
+ "App": {
+ "app-vue": "y",
+ "app-nvue": "y"
+ },
+ "H5-mobile": {
+ "Safari": "y",
+ "Android Browser": "y",
+ "微信浏览器(Android)": "y",
+ "QQ浏览器(Android)": "y"
+ },
+ "H5-pc": {
+ "Chrome": "y",
+ "IE": "y",
+ "Edge": "y",
+ "Firefox": "y",
+ "Safari": "y"
+ },
+ "小程序": {
+ "微信": "y",
+ "阿里": "y",
+ "百度": "y",
+ "字节跳动": "y",
+ "QQ": "y"
+ },
+ "快应用": {
+ "华为": "u",
+ "联盟": "u"
+ },
+ "Vue": {
+ "vue2": "y",
+ "vue3": "y"
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/uni_modules/uni-section/readme.md b/uni_modules/uni-section/readme.md
new file mode 100644
index 0000000..d47faab
--- /dev/null
+++ b/uni_modules/uni-section/readme.md
@@ -0,0 +1,8 @@
+## Section 标题栏
+> **组件名:uni-section**
+> 代码块: `uSection`
+
+uni-section 组件主要用于文章、列表详情等标题展示
+
+### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-section)
+#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
diff --git a/utils/check.js b/utils/check.js
new file mode 100644
index 0000000..9de497c
--- /dev/null
+++ b/utils/check.js
@@ -0,0 +1,38 @@
+
+/*
+检测正整数, 不能为0
+*/
+
+export const checkNumber1 = /^[0-9]*[1-9][0-9]*$/;
+/*
+检测最多2位小数(包含0)
+*/
+export const checkNumber2 = /^(-){0,1}(([1-9]{1}\d*)|(0{1}))(\.\d{1,2})?$/;
+
+/*
+检测最多2位小数(包含0) 正数
+*/
+export const checkNumber2_1 = /^(([1-9]{1}\d*)|(0{1}))(\.\d{1,2})?$/;
+
+/*
+检测最多3位小数(包含0)
+*/
+export const checkNumber3 = /^(-){0,1}(([1-9]{1}\d*)|(0{1}))(\.\d{1,3})?$/;
+
+/*
+检测最多4位小数(包含0)
+*/
+export const checkNumber4 = /^(-){0,1}(([1-9]{1}\d*)|(0{1}))(\.\d{1,4})?$/;
+/*
+检测最多5位小数(包含0)
+*/
+export const checkNumber5 = /^(-){0,1}(([1-9]{1}\d*)|(0{1}))(\.\d{1,5})?$/;
+/*
+检测最多10位小数(包含0)
+*/
+export const checkNumber10 = /^(-){0,1}(([1-9]{1}\d*)|(0{1}))(\.\d{1,10})?$/;
+
+// 邮箱正则表达式
+export const emailRegular = /^[a-zA-Z0-9]+([-_.][a-zA-Z0-9]+)*@[a-zA-Z0-9]+([-_.][a-zA-Z0-9]+)*\.[a-z]{2,}$/;
+// 电话号正则表达式
+export const phoneRegular = /^1(?:3\d|4[4-9]|5[0-35-9]|6[67]|7[013-8]|8\d|9\d)\d{8}$/;
\ No newline at end of file
diff --git a/utils/nonNullCheck.js b/utils/nonNullCheck.js
new file mode 100644
index 0000000..1a0a314
--- /dev/null
+++ b/utils/nonNullCheck.js
@@ -0,0 +1,13 @@
+function nonNullCheck(params){
+
+ if(params === "" || params === undefined || params === null) {
+ return false;
+ }
+ params = params + "";
+ if(!params.trim()){
+ return false;
+ }
+ return true;
+}
+
+export default nonNullCheck;