0728
This commit is contained in:
commit
0a645b2f3a
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding" addBOMForNewFiles="with NO BOM" />
|
||||
</project>
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="JavaScriptSettings">
|
||||
<option name="languageLevel" value="ES6" />
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/ehs_mp2.iml" filepath="$PROJECT_DIR$/.idea/ehs_mp2.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,228 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="7bfc8262-4758-430e-9980-a5047e8ac032" name="默认更改列表" comment="" />
|
||||
<ignored path="$PROJECT_DIR$/.tmp/" />
|
||||
<ignored path="$PROJECT_DIR$/temp/" />
|
||||
<ignored path="$PROJECT_DIR$/tmp/" />
|
||||
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||
</component>
|
||||
<component name="FileEditorManager">
|
||||
<leaf>
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/App.vue">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="6">
|
||||
<caret line="32" column="46" selection-start-line="32" selection-start-column="46" selection-end-line="32" selection-end-column="46" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/store/index.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="1020">
|
||||
<caret line="34" column="67" selection-start-line="34" selection-start-column="67" selection-end-line="34" selection-end-column="67" />
|
||||
<folding>
|
||||
<element signature="e#0#21#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="true">
|
||||
<entry file="file://$PROJECT_DIR$/pages/my/my_.vue">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="690">
|
||||
<caret line="41" column="83" selection-start-line="41" selection-start-column="83" selection-end-line="41" selection-end-column="83" />
|
||||
<folding>
|
||||
<element signature="e#3837#4097#0" />
|
||||
<element signature="e#4110#8160#0" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/pages/my/my.vue">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="540">
|
||||
<caret line="23" column="78" selection-start-line="23" selection-start-column="77" selection-end-line="23" selection-end-column="78" />
|
||||
<folding>
|
||||
<element signature="n#style#0;n#view#0;n#view#1;n#view#0;n#view#1;n#view#0;n#template#0;n#!!top" expanded="true" />
|
||||
<element signature="e#3841#4101#0" />
|
||||
<element signature="e#4114#8164#0" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
</leaf>
|
||||
</component>
|
||||
<component name="FindInProjectRecents">
|
||||
<findStrings>
|
||||
<find>Logout</find>
|
||||
</findStrings>
|
||||
</component>
|
||||
<component name="Git.Settings">
|
||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
||||
</component>
|
||||
<component name="IdeDocumentHistory">
|
||||
<option name="CHANGED_PATHS">
|
||||
<list>
|
||||
<option value="$PROJECT_DIR$/App.vue" />
|
||||
<option value="$PROJECT_DIR$/store/index.js" />
|
||||
<option value="$PROJECT_DIR$/pages/my/my.vue" />
|
||||
<option value="$PROJECT_DIR$/pages/my/my_.vue" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectFrameBounds">
|
||||
<option name="x" value="-2231" />
|
||||
<option name="y" value="53" />
|
||||
<option name="width" value="2139" />
|
||||
<option name="height" value="1390" />
|
||||
</component>
|
||||
<component name="ProjectView">
|
||||
<navigator proportions="" version="1">
|
||||
<foldersAlwaysOnTop value="true" />
|
||||
</navigator>
|
||||
<panes>
|
||||
<pane id="Scope" />
|
||||
<pane id="ProjectPane">
|
||||
<subPane>
|
||||
<expand>
|
||||
<path>
|
||||
<item name="ehs_mp2" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="ehs_mp2" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="ehs_mp2" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="ehs_mp2" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="pages" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="ehs_mp2" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="ehs_mp2" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="pages" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="my" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="ehs_mp2" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="ehs_mp2" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="store" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
</expand>
|
||||
<select />
|
||||
</subPane>
|
||||
</pane>
|
||||
</panes>
|
||||
</component>
|
||||
<component name="PropertiesComponent">
|
||||
<property name="WebServerToolWindowFactoryState" value="false" />
|
||||
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
|
||||
<property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
|
||||
<property name="nodejs_npm_path_reset_for_default_project" value="true" />
|
||||
</component>
|
||||
<component name="RunDashboard">
|
||||
<option name="ruleStates">
|
||||
<list>
|
||||
<RuleState>
|
||||
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
|
||||
</RuleState>
|
||||
<RuleState>
|
||||
<option name="name" value="StatusDashboardGroupingRule" />
|
||||
</RuleState>
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="SvnConfiguration">
|
||||
<configuration />
|
||||
</component>
|
||||
<component name="TaskManager">
|
||||
<task active="true" id="Default" summary="Default task">
|
||||
<changelist id="7bfc8262-4758-430e-9980-a5047e8ac032" name="默认更改列表" comment="" />
|
||||
<created>1658992730309</created>
|
||||
<option name="number" value="Default" />
|
||||
<option name="presentableId" value="Default" />
|
||||
<updated>1658992730309</updated>
|
||||
<workItem from="1658992731466" duration="2219000" />
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TimeTrackingManager">
|
||||
<option name="totallyTimeSpent" value="2219000" />
|
||||
</component>
|
||||
<component name="ToolWindowManager">
|
||||
<frame x="-2231" y="53" width="2139" height="1390" extended-state="0" />
|
||||
<editor active="true" />
|
||||
<layout>
|
||||
<window_info id="Favorites" side_tool="true" />
|
||||
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.24988101" />
|
||||
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
|
||||
<window_info anchor="bottom" id="Docker" show_stripe_button="false" />
|
||||
<window_info anchor="bottom" id="Version Control" />
|
||||
<window_info anchor="bottom" id="Terminal" />
|
||||
<window_info anchor="bottom" id="Event Log" side_tool="true" />
|
||||
<window_info anchor="bottom" id="Message" order="0" />
|
||||
<window_info anchor="bottom" id="Find" order="1" />
|
||||
<window_info anchor="bottom" id="Run" order="2" />
|
||||
<window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
|
||||
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
|
||||
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
|
||||
<window_info anchor="bottom" id="TODO" order="6" />
|
||||
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
|
||||
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
|
||||
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
|
||||
</layout>
|
||||
</component>
|
||||
<component name="TypeScriptGeneratedFilesManager">
|
||||
<option name="version" value="1" />
|
||||
</component>
|
||||
<component name="editorHistoryManager">
|
||||
<entry file="file://$PROJECT_DIR$/App.vue">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="6">
|
||||
<caret line="32" column="46" selection-start-line="32" selection-start-column="46" selection-end-line="32" selection-end-column="46" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/store/index.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="1020">
|
||||
<caret line="34" column="67" selection-start-line="34" selection-start-column="67" selection-end-line="34" selection-end-column="67" />
|
||||
<folding>
|
||||
<element signature="e#0#21#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/pages/my/my.vue">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="540">
|
||||
<caret line="23" column="78" selection-start-line="23" selection-start-column="77" selection-end-line="23" selection-end-column="78" />
|
||||
<folding>
|
||||
<element signature="n#style#0;n#view#0;n#view#1;n#view#0;n#view#1;n#view#0;n#template#0;n#!!top" expanded="true" />
|
||||
<element signature="e#3841#4101#0" />
|
||||
<element signature="e#4114#8164#0" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/pages/my/my_.vue">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="690">
|
||||
<caret line="41" column="83" selection-start-line="41" selection-start-column="83" selection-end-line="41" selection-end-column="83" />
|
||||
<folding>
|
||||
<element signature="e#3837#4097#0" />
|
||||
<element signature="e#4110#8160#0" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</component>
|
||||
</project>
|
17
App.vue
17
App.vue
|
@ -2,7 +2,7 @@
|
|||
export default {
|
||||
// 此处globalData为了演示其作用,不是uView框架的一部分
|
||||
globalData: {
|
||||
username: '白居易'
|
||||
appid: 'wxf7d6140f507466be'
|
||||
},
|
||||
onLaunch() {
|
||||
// 1.1.0版本之前关于http拦截器代码,已平滑移动到/common/http.interceptor.js中
|
||||
|
@ -15,7 +15,8 @@
|
|||
*/
|
||||
//var that=this
|
||||
// 小程序自动登录
|
||||
/* uni.showLoading({
|
||||
// #ifdef MP-WEIXIN
|
||||
uni.showLoading({
|
||||
title: '微信自动登录中...',
|
||||
mask: true
|
||||
})
|
||||
|
@ -54,17 +55,7 @@
|
|||
})
|
||||
}
|
||||
});
|
||||
*/
|
||||
let accessToken = this.$store.state.vuex_token;
|
||||
if(accessToken){
|
||||
uni.reLaunch({
|
||||
url:'/pages/home/home_'
|
||||
})
|
||||
}else{
|
||||
uni.reLaunch({
|
||||
url:'/pages/login/login_'
|
||||
})
|
||||
}
|
||||
// #endif
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -35,14 +35,6 @@ const install = (Vue, vm) => {
|
|||
let getOpreation = (id)=>vm.$u.get(`/opm/operation/${id}/`);//rpj查询
|
||||
let getOpl = (id)=>vm.$u.get(`/opm/opl/${id}/`);//opl作业许可证查询
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
vm.$u.api = {getUserInfo,
|
||||
getCode,
|
||||
codeLogin,
|
||||
|
|
40
pages.json
40
pages.json
|
@ -18,12 +18,20 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/login/login",
|
||||
"style": {
|
||||
"path" : "pages/login/login",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText": "验证码登录",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/login/login_password",
|
||||
"style": {
|
||||
"navigationBarTitleText": "密码登录",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/home/home_",
|
||||
"style": {
|
||||
|
@ -80,7 +88,7 @@
|
|||
{
|
||||
"path": "pages/workSpace/newWork/work",
|
||||
"style": {
|
||||
"navigationBarTitleText": "作业管理",
|
||||
"navigationBarTitleText": "新建作业",
|
||||
"navigationStyle": "custom",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
@ -88,13 +96,37 @@
|
|||
{
|
||||
"path": "pages/workSpace/newWork/relevant",
|
||||
"style": {
|
||||
"navigationBarTitleText": "入厂项目",
|
||||
"navigationBarTitleText": "新建入厂项目",
|
||||
"navigationStyle": "custom",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/workSpace/newWork/visit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "新建来访项目",
|
||||
"navigationStyle": "custom",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/workSpace/list/opreation",
|
||||
"style": {
|
||||
"navigationBarTitleText": "作业列表",
|
||||
"navigationStyle": "custom",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/workSpace/list/rpj",
|
||||
"style": {
|
||||
"navigationBarTitleText": "入厂项目",
|
||||
"navigationStyle": "custom",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/workSpace/list/visit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "来访项目",
|
||||
"navigationStyle": "custom",
|
||||
|
|
|
@ -48,7 +48,9 @@
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
wxcode: null,
|
||||
imageURL: '/static/banner3.jpg',
|
||||
testUrl: 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxf7d6140f507466be&redirect_uri=http%3A%2F%2Fqyjy.ctc-zc.com&response_type=code&scope=snsapi_base#wechat_redirect',
|
||||
loginForm: {
|
||||
phone: "",
|
||||
code: ""
|
||||
|
@ -88,7 +90,19 @@
|
|||
},
|
||||
onReady() {
|
||||
this.$refs.uForm.setRules(this.rules);
|
||||
// #ifdef MP-WEIXIN
|
||||
uni.hideHomeButton()
|
||||
// #endif
|
||||
},
|
||||
onLoad() {
|
||||
// #ifdef H5
|
||||
this.wxcode = this.getUrlCode('code')
|
||||
// 微信公众号自动登录
|
||||
if(this.wxcode) {
|
||||
this.wxcodeLogin()
|
||||
}
|
||||
// #endif
|
||||
|
||||
},
|
||||
computed: {
|
||||
inputStyle() {
|
||||
|
@ -113,8 +127,16 @@
|
|||
uni.showLoading({})
|
||||
this.$u.api.codeLogin(this.loginForm).then(res => {
|
||||
this.$u.vuex('vuex_token', res.access)
|
||||
// #ifdef MP-WEIXIN
|
||||
let data = {openid: uni.getStorageSync('wxmp_openid')}
|
||||
this.$u.api.bindmp(data).then(res=>{})
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
let data = {openid: uni.getStorageSync('wx_openid')}
|
||||
if(data){
|
||||
this.$u.api.bindwx(data).then(res=>{})
|
||||
}
|
||||
// #endif
|
||||
this.$u.api.getUserInfo().then(res => {
|
||||
this.$u.vuex('vuex_user', res)
|
||||
// 修改资源请求地址
|
||||
|
@ -154,7 +176,43 @@
|
|||
this.$u.toast('倒计时结束后再发送');
|
||||
}
|
||||
},
|
||||
wxcodeLogin(){
|
||||
uni.showLoading({
|
||||
title: '微信登录中...',
|
||||
mask: true
|
||||
})
|
||||
this.$u.api.wxLogin({
|
||||
code: this.wxcode
|
||||
}).then(res => {
|
||||
this.$u.vuex('vuex_token', res.access)
|
||||
this.$u.api.getUserInfo().then(res => {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: "登录成功",
|
||||
icon: "none"
|
||||
})
|
||||
uni.reLaunch({
|
||||
url: "/pages/home/home"
|
||||
})
|
||||
this.$u.vuex('vuex_user', res)
|
||||
// 修改资源请求地址
|
||||
// this.$u.vuex('vuex_user.avatar', this.vuex_user.avatar +
|
||||
// '?token=' + this.vuex_token)
|
||||
})
|
||||
}).catch(e => {
|
||||
uni.setStorageSync('wx_openid', e.data.wx_openid)
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: "暂未绑定微信!",
|
||||
icon: "none"
|
||||
})
|
||||
})
|
||||
},
|
||||
mpLogin() {
|
||||
// #ifdef H5
|
||||
this.getWxCode()
|
||||
// #endif
|
||||
// #ifdef MP-WEIXIN
|
||||
uni.showLoading({
|
||||
title: '微信登录中...',
|
||||
mask: true
|
||||
|
@ -181,6 +239,7 @@
|
|||
// '?token=' + this.vuex_token)
|
||||
})
|
||||
}).catch(e => {
|
||||
uni.setStorageSync('wxmp_openid', e.data.wxmp_openid)
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: "暂未绑定微信!",
|
||||
|
@ -189,7 +248,33 @@
|
|||
})
|
||||
}
|
||||
});
|
||||
// #endif
|
||||
},
|
||||
// 获取code
|
||||
// 先判断url中有没有code,如果有code,表明已经授权,如果没有code,跳转微信授权链接
|
||||
getWxCode () {
|
||||
// const isWechat = () => {
|
||||
// return String(navigator.userAgent.toLowerCase().match(/MicroMessenger/i)) === "micromessenger";
|
||||
// }
|
||||
// if(isWechat()) {
|
||||
// 截取地址中的code,如果没有code就去微信授权,如果已经获取到code了就直接把code传给后台获取openId
|
||||
let code = this.getUrlCode('code')
|
||||
if (code === null || code === '') {
|
||||
window.location.href = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid='+this.vuex_appid+'&redirect_uri=' + encodeURIComponent(this.vuex_login) + '&response_type=code&scope=snsapi_base&state=1#wechat_redirect'
|
||||
// redirect_uri是授权成功后,跳转的url地址,微信会帮我们跳转到该链接,并且通过?的形式拼接code,这里需要用encodeURIComponent对链接进行处理。
|
||||
// 如果配置参数一一对应,那么此时已经通过回调地址刷新页面后,你就会再地址栏中看到code了。
|
||||
// http://127.0.0.1/pages/views/profile/login/login?code=001BWV4J1lRzz00H4J1J1vRE4J1BWV4q&state=1
|
||||
}else{
|
||||
this.wxcode = code
|
||||
this.wxcodeLogin()
|
||||
}
|
||||
// }
|
||||
},
|
||||
|
||||
getUrlCode (name) {
|
||||
return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.href) || [, ''])[1].replace(/\+/g, '%20')) || null
|
||||
},
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -5,19 +5,20 @@
|
|||
</view>
|
||||
<view class="handle-area">
|
||||
<view class="handle-type">
|
||||
<text class="text" :class="{active: isShow}">登录</text>
|
||||
<text class="typeText" :class="{active:isPassword}" @click="changeLogType('password')">密码登录</text>
|
||||
<text class="typeText" :class="{active:isMessage}" @click="changeLogType('message')">验证码登录</text>
|
||||
</view>
|
||||
<view class="login-area">
|
||||
<view class="login-area" v-if="isPassword">
|
||||
<form style="display: block;" @submit="formSubmit">
|
||||
<view class="login-item">
|
||||
<image class="login-icon" src="../../static/login/avatar.png" mode=""></image>
|
||||
<input placeholder-style="color: #2c6fd9;" style="color: #2c6fd9;" class="my-phone" type="text"
|
||||
name="username" placeholder="请输入您的账号" />
|
||||
<input placeholder-style="color: #2c6fd9;" style="color: #2c6fd9;" class="loginItemInput"
|
||||
type="text" name="username" placeholder="请输入您的账号" />
|
||||
</view>
|
||||
<view class="login-item">
|
||||
<image class="login-icon" src="../../static/login/password.png" mode=""></image>
|
||||
<input placeholder-style="color: #2c6fd9;" style="color: #2c6fd9;" class="my-psd" type="text"
|
||||
name="password" password placeholder="请输入您的密码" />
|
||||
<input placeholder-style="color: #2c6fd9;" style="color: #2c6fd9;" class="loginItemInput"
|
||||
type="text" name="password" password placeholder="请输入您的密码" />
|
||||
</view>
|
||||
<view class="privacy">
|
||||
<view class="privacyIn">
|
||||
|
@ -35,13 +36,42 @@
|
|||
</view>
|
||||
</form>
|
||||
</view>
|
||||
<view class="wxBig" v-if="wxShow == true">
|
||||
<view class="login-area" v-if="isMessage">
|
||||
<form style="display: block;" @submit="formSubmit">
|
||||
<view class="login-item">
|
||||
<image class="login-icon" src="../../static/login/avatar.png" mode=""></image>
|
||||
<input placeholder-style="color: #2c6fd9;" style="color: #2c6fd9;" class="loginItemInput"
|
||||
type="text" name="phoneNumber" v-model="phoneNumber" placeholder="请输入手机号" />
|
||||
</view>
|
||||
<view class="login-item">
|
||||
<image class="login-icon" src="../../static/login/password.png" mode=""></image>
|
||||
<input placeholder-style="color: #2c6fd9;" style="color: #2c6fd9;" class="loginItemInput"
|
||||
type="text" name="message" password placeholder="请输入验证码" />
|
||||
<button class="getMessageCode" @click="getCode">{{codeTips}}</button>
|
||||
</view>
|
||||
<view class="privacy">
|
||||
<view class="privacyIn">
|
||||
<u-checkbox-group>
|
||||
<u-checkbox @change="checkboxChange" v-model="checkedShow"></u-checkbox>
|
||||
</u-checkbox-group>
|
||||
<view class="privacyCon">
|
||||
我已阅读并同意《<text style="color: #2d8cff;" @click="agreementFn(1)">用户协议</text>》和《<text
|
||||
style="color: #2d8cff;" @click="agreementFn(2)">隐私政策</text>》
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="">
|
||||
<button type="default" form-type="submit" class="login-btn">立即登录</button>
|
||||
</view>
|
||||
</form>
|
||||
</view>
|
||||
<view class="wxBig">
|
||||
<view class="Wxtitle">
|
||||
<view class="WxtitleIn">
|
||||
第三方登录
|
||||
</view>
|
||||
</view>
|
||||
<view class="wx" @click="loginFn">
|
||||
<view class="wx" @click="mpLogin">
|
||||
<image src="/static/login/weixin.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -57,12 +87,15 @@
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
wxcode: null,
|
||||
agreement: false,
|
||||
checkedShow: false,
|
||||
checkedShow: true,
|
||||
key: "",
|
||||
img: "",
|
||||
username: '',
|
||||
password: '',
|
||||
phoneNumber: '',
|
||||
message: '',
|
||||
code: "",
|
||||
isShow: true,
|
||||
myTopBgSrc: require("../../static/login/my-bg.jpg"),
|
||||
|
@ -70,6 +103,11 @@
|
|||
userContent: '',
|
||||
privacyContent: '',
|
||||
wxShow: false,
|
||||
isPassword: true,
|
||||
isMessage: false,
|
||||
codeTips: "获取验证码",
|
||||
testUrl: 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxf7d6140f507466be&redirect_uri=http%3A%2F%2Fqyjy.ctc-zc.com&response_type=code&scope=snsapi_base#wechat_redirect',
|
||||
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
@ -132,7 +170,67 @@
|
|||
})
|
||||
|
||||
},
|
||||
//
|
||||
mpLogin() {
|
||||
// #ifdef H5
|
||||
this.getWxCode()
|
||||
// #endif
|
||||
// #ifdef MP-WEIXIN
|
||||
uni.showLoading({
|
||||
title: '微信登录中...',
|
||||
mask: true
|
||||
})
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: (loginRes) => {
|
||||
this.$u.api.wxmplogin({
|
||||
code: loginRes.code
|
||||
}).then(res => {
|
||||
this.$u.vuex('vuex_token', res.access)
|
||||
this.$u.api.getUserInfo().then(res => {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: "登录成功",
|
||||
icon: "none"
|
||||
})
|
||||
uni.reLaunch({
|
||||
url: "/pages/home/home"
|
||||
})
|
||||
this.$u.vuex('vuex_user', res)
|
||||
// 修改资源请求地址
|
||||
// this.$u.vuex('vuex_user.avatar', this.vuex_user.avatar +
|
||||
// '?token=' + this.vuex_token)
|
||||
})
|
||||
}).catch(e => {
|
||||
uni.setStorageSync('wxmp_openid', e.data.wxmp_openid)
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: "暂未绑定微信!",
|
||||
icon: "none"
|
||||
})
|
||||
})
|
||||
}
|
||||
});
|
||||
// #endif
|
||||
},
|
||||
// 获取code
|
||||
// 先判断url中有没有code,如果有code,表明已经授权,如果没有code,跳转微信授权链接
|
||||
getWxCode() {
|
||||
// 截取地址中的code,如果没有code就去微信授权,如果已经获取到code了就直接把code传给后台获取openId
|
||||
let code = this.getUrlCode('code')
|
||||
if (code === null || code === '') {
|
||||
window.location.href = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=' + this.vuex_appid +
|
||||
'&redirect_uri=' + encodeURIComponent(this.vuex_login) +
|
||||
'&response_type=code&scope=snsapi_base&state=1#wechat_redirect'
|
||||
// redirect_uri是授权成功后,跳转的url地址,微信会帮我们跳转到该链接,并且通过?的形式拼接code,这里需要用encodeURIComponent对链接进行处理。
|
||||
// 如果配置参数一一对应,那么此时已经通过回调地址刷新页面后,你就会再地址栏中看到code了。
|
||||
// http://127.0.0.1/pages/views/profile/login/login?code=001BWV4J1lRzz00H4J1J1vRE4J1BWV4q&state=1
|
||||
} else {
|
||||
this.wxcode = code
|
||||
this.wxcodeLogin()
|
||||
}
|
||||
// }
|
||||
},
|
||||
|
||||
updateCidFn(username) {
|
||||
var data = {
|
||||
userCid: uni.getStorageSync('setcid'),
|
||||
|
@ -186,33 +284,69 @@
|
|||
};
|
||||
return true;
|
||||
},
|
||||
changeLogType(index) {
|
||||
if (index === 'password') {
|
||||
this.isPassword = true;
|
||||
this.isMessage = false;
|
||||
} else {
|
||||
this.isPassword = false;
|
||||
this.isMessage = true;
|
||||
}
|
||||
},
|
||||
formSubmit(e) {
|
||||
var that = this;
|
||||
const obj = e.target.value;
|
||||
if (!that.checkedParams(obj)) return;
|
||||
debugger;
|
||||
console.log(obj)
|
||||
that.$u.api.login(obj).then(res=>{
|
||||
that.$u.api.login(obj).then(res => {
|
||||
that.$u.vuex('vuex_token', res.access)
|
||||
that.$u.vuex('vuex_refresh', res.refresh)
|
||||
// let data = {openid: uni.getStorageSync('wxmp_openid')}
|
||||
// that.$u.api.bindmp(data).then(res=>{})
|
||||
that.$u.api.getUserInfo().then(res=>{
|
||||
that.$u.api.getUserInfo().then(res => {
|
||||
that.$u.vuex('vuex_user', res)
|
||||
// 修改资源请求地址
|
||||
})
|
||||
uni.reLaunch({
|
||||
url:'/pages/home/home_'
|
||||
url: '/pages/home/home_'
|
||||
})
|
||||
}
|
||||
).catch(e=>{
|
||||
}).catch(e => {
|
||||
console.log(e)
|
||||
uni.showToast({
|
||||
title:'账户密码错误',
|
||||
icon:'none'
|
||||
title: '账户密码错误',
|
||||
icon: 'none'
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
codeChange(text) {
|
||||
this.codeTips = text;
|
||||
},
|
||||
// 获取验证码
|
||||
getCode() {
|
||||
debugger;
|
||||
if (this.phoneNumber !== '') {
|
||||
uni.showLoading({
|
||||
title: '正在获取验证码',
|
||||
mask: true
|
||||
})
|
||||
this.$u.api.getCode({
|
||||
phone: 16619852123
|
||||
}).then(res => {
|
||||
setTimeout(() => {
|
||||
uni.hideLoading();
|
||||
// 这里此提示会被this.start()方法中的提示覆盖
|
||||
this.$u.toast('验证码已发送');
|
||||
// 通知验证码组件内部开始倒计时
|
||||
this.$refs.uCode.start();
|
||||
}, 2000);
|
||||
})
|
||||
} else {
|
||||
// this.$u.toast('倒计时结束后再发送');
|
||||
this.$u.toast('请输入手机号');
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -322,8 +456,12 @@
|
|||
padding: 62rpx;
|
||||
}
|
||||
|
||||
.typeText {
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.active {
|
||||
font-size: 38rpx;
|
||||
font-size: 34rpx;
|
||||
line-height: 72rpx;
|
||||
color: #2c6fd9;
|
||||
font-weight: bold;
|
||||
|
@ -333,7 +471,7 @@
|
|||
.active::after {
|
||||
display: block;
|
||||
content: "";
|
||||
width: 42rpx;
|
||||
width: 100%;
|
||||
height: 6rpx;
|
||||
background-color: #2c6fd9;
|
||||
border-radius: 3rpx;
|
||||
|
@ -355,6 +493,10 @@
|
|||
margin-bottom: 56rpx;
|
||||
}
|
||||
|
||||
.loginItemInput {
|
||||
border-radius: 0 88rpx 88rpx 0;
|
||||
}
|
||||
|
||||
.code-img-item {
|
||||
padding-left: 72rpx;
|
||||
}
|
||||
|
@ -389,6 +531,20 @@
|
|||
background-color: #EEEEEE;
|
||||
}
|
||||
|
||||
.getMessageCode {
|
||||
width: fit-content;
|
||||
position: absolute;
|
||||
top: 10%;
|
||||
right: 20rpx;
|
||||
height: 80%;
|
||||
color: #ffffff;
|
||||
font-size: 26rpx;
|
||||
border-color: #19be6b;
|
||||
background-color: #19be6b;
|
||||
z-index: 100;
|
||||
border-radius: 36rpx !important;
|
||||
}
|
||||
|
||||
.login-btn,
|
||||
.register-btn {
|
||||
width: 635rpx;
|
||||
|
|
|
@ -60,7 +60,9 @@ export default {
|
|||
},
|
||||
onReady() {
|
||||
this.$refs.uForm.setRules(this.rules);
|
||||
// #ifdef MP-WEIXIN
|
||||
uni.hideHomeButton()
|
||||
// #endif
|
||||
},
|
||||
computed: {
|
||||
inputStyle() {
|
||||
|
@ -79,10 +81,19 @@ export default {
|
|||
this.$u.api.login(this.loginForm).then(
|
||||
res=>{
|
||||
this.$u.vuex('vuex_token', res.access)
|
||||
// #ifdef MP-WEIXIN
|
||||
let data = {openid: uni.getStorageSync('wxmp_openid')}
|
||||
this.$u.api.bindmp(data).then(res=>{})
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
let data = {openid: uni.getStorageSync('wx_openid')}
|
||||
if(data){
|
||||
this.$u.api.bindwx(data).then(res=>{})
|
||||
}
|
||||
// #endif
|
||||
this.$u.api.getUserInfo().then(res=>{
|
||||
this.$u.vuex('vuex_user', res)
|
||||
|
||||
// 修改资源请求地址
|
||||
})
|
||||
uni.reLaunch({
|
||||
|
|
|
@ -13,12 +13,16 @@
|
|||
</view>
|
||||
<!-- #endif -->
|
||||
<!-- #ifndef MP-WEIXIN -->
|
||||
<u-avatar :src="vuex_user.avatar" size="140"></u-avatar>
|
||||
<u-avatar :src="vuex_user.avatar" size="124"></u-avatar>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
<view>
|
||||
<view style="font-weight: bold;" class="user-name">{{vuex_user.name}}</view>
|
||||
<view class="user-phone">{{vuex_user.type}}</view>
|
||||
<view class="user-phone">
|
||||
<u-tag text="企业员工" v-if="vuex_user.type === 'employee'"/>
|
||||
<u-tag text="相关方" v-if="vuex_user.type === 'remployee'"/>
|
||||
<u-tag text="访客" v-if="vuex_user.type === 'visitor'"/>
|
||||
</view>
|
||||
</view>
|
||||
<button type="default" class="modify-info" @click="goInto('myData')">完善资料</button>
|
||||
</view>
|
||||
|
@ -28,6 +32,7 @@
|
|||
<image class="left-icon" src="../../static/my/wodeshenqing.png" mode=""></image>
|
||||
<text class="title-text">我的申请</text>
|
||||
<uni-icons size="13" color="#b9b9b9" class="right-icon" type="right"></uni-icons>
|
||||
|
||||
</view>
|
||||
<view class="enter-item" @click="goInto('daiban')">
|
||||
<image class="left-icon" src="../../static/my/wodeshenpi.png" mode=""></image>
|
||||
|
@ -43,6 +48,7 @@
|
|||
</view>
|
||||
<view class="sign-out">
|
||||
<button type="default" @click="signoutFn" class="sign-out-btn">退出</button>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
|
460
pages/my/my_.vue
460
pages/my/my_.vue
|
@ -1,7 +1,12 @@
|
|||
<template>
|
||||
<view>
|
||||
<view class="u-flex user-box u-p-l-30 u-p-r-20 u-p-b-30">
|
||||
<view class="u-m-r-10">
|
||||
<view class="profile">
|
||||
<view class="nav-bar" style="position: relative;">
|
||||
<image style="position: absolute;left: 0;top: 0;display: block;width: 100%;height: 100%;z-index: 1;"
|
||||
:src="myTopBgSrc" mode=""></image>
|
||||
</view>
|
||||
<view class="num-info" style="position: relative;z-index: 3;">
|
||||
<view class="user-info" style="z-index: 2;">
|
||||
<view class="user-head">
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<view class="avatarImg">
|
||||
<open-data type="userAvatarUrl" default-avatar="/static/other/timg.jpg"></open-data>
|
||||
|
@ -11,23 +16,72 @@
|
|||
<u-avatar :src="vuex_user.avatar" size="140"></u-avatar>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
<view>
|
||||
<view style="font-weight: bold;" class="user-name">{{vuex_user.name}}</view>
|
||||
<view class="user-phone">{{vuex_user.type}}</view>
|
||||
</view>
|
||||
<button type="default" class="modify-info" @click="goInto('myData')">完善资料</button>
|
||||
</view>
|
||||
<<<<<<< HEAD
|
||||
</view>
|
||||
<view class="enter-list">
|
||||
<view class="enter-item" @click="goInto('myApply')">
|
||||
<image class="left-icon" src="../../static/my/wodeshenqing.png" mode=""></image>
|
||||
<text class="title-text">我的申请</text>
|
||||
<uni-icons size="13" color="#b9b9b9" class="right-icon" type="right"></uni-icons>
|
||||
=======
|
||||
<view class="u-flex-1">
|
||||
<view class="u-font-18 u-p-b-20">
|
||||
{{vuex_user.name}}
|
||||
<u-tag text="企业员工" v-if="vuex_user.type == 'employee'"/>
|
||||
<u-tag text="相关方" v-if="vuex_user.type == 'remployee'"/>
|
||||
<u-tag text="访客" v-if="vuex_user.type == 'visitor'"/>
|
||||
<u-tag v-if="vuex_user.wxmp_openid" text="小程序" size="mini"></u-tag>
|
||||
<u-tag v-else type="error" text="小程序" size="mini"></u-tag>
|
||||
<u-tag v-if="vuex_user.wx_openid" text="微信通知" size="mini"></u-tag>
|
||||
<u-tag v-else type="error" text="微信通知" size="mini"></u-tag>
|
||||
</view>
|
||||
<view class="u-font-14 u-type-info">{{vuex_user.username}}-{{vuex_user.belong_dept_name}}-{{vuex_user.post_name}}</view>
|
||||
<view class="u-font-14 u-type-info" v-if="vuex_user.wxmp_openid">已绑定微信小程序</view>
|
||||
<view class="u-font-14 u-type-info" v-if="vuex_user.wx_openid">已绑定公众号通知</view>
|
||||
<view class="u-font-14">
|
||||
<u-tag v-if="vuex_user.wxmp_openid" text="小程序" size="mini"></u-tag>
|
||||
<u-tag v-else type="error" text="小程序" size="mini"></u-tag>
|
||||
<u-tag v-if="vuex_user.wx_openid" text="微信通知" size="mini"></u-tag>
|
||||
<u-tag v-else type="error" text="微信通知" size="mini"></u-tag>
|
||||
</view>
|
||||
>>>>>>> 810142d6db853cb8dd13af76655edff443dd42c1
|
||||
</view>
|
||||
<view class="enter-item" @click="goInto('daiban')">
|
||||
<image class="left-icon" src="../../static/my/wodeshenpi.png" mode=""></image>
|
||||
<text class="title-text">我的审批</text>
|
||||
<uni-icons size="13" color="#b9b9b9" class="right-icon" type="right"></uni-icons>
|
||||
</view>
|
||||
<view class="enter-item" @click="goInto('myData')">
|
||||
<image style="width: 34rpx;height: 30rpx;" class="left-icon" src="../../static/my/wodeziliao.png"
|
||||
mode=""></image>
|
||||
<text class="title-text">我的资料</text>
|
||||
<uni-icons size="13" color="#b9b9b9" class="right-icon" type="right"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<<<<<<< HEAD
|
||||
<view class="sign-out">
|
||||
<button type="default" @click="signoutFn" class="sign-out-btn">退出</button>
|
||||
=======
|
||||
|
||||
<view class="u-m-t-20">
|
||||
<u-cell-group>
|
||||
<u-cell-item icon="weixin-fill" title="绑定微信" :arrow="false" @click="bindMP" v-if="!vuex_user.wxmp_openid"></u-cell-item>
|
||||
<u-cell-item icon="star" title="收藏"></u-cell-item>
|
||||
<u-cell-item icon="photo" title="相册"></u-cell-item>
|
||||
<u-cell-item icon="coupon" title="卡券"></u-cell-item>
|
||||
<u-cell-item icon="heart" title="关注"></u-cell-item>
|
||||
</u-cell-group>
|
||||
</view> -->
|
||||
|
||||
<view class="u-m-t-20">
|
||||
<u-cell-group>
|
||||
<!-- <u-cell-item icon="weixin-fill" title="绑定微信" :arrow="false" @click="bindMP" v-if="!vuex_user.wxmp_openid"></u-cell-item> -->
|
||||
<u-cell-item icon="close" title="退出账号" @click="Logout"></u-cell-item>
|
||||
</u-cell-group>
|
||||
>>>>>>> 810142d6db853cb8dd13af76655edff443dd42c1
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
@ -36,66 +90,362 @@
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
pic:'https://uviewui.com/common/logo.png',
|
||||
show:true
|
||||
username: '用户名',
|
||||
mobile: '1478585',
|
||||
head: '',
|
||||
userName: '',
|
||||
userId: '',
|
||||
getBusinessTripDayTimeCon: '',
|
||||
getLeaveTimePaidLeaveCon: '',
|
||||
getLeaveTimeCon: '',
|
||||
myTopBgSrc: require("../../static/my/my-bg.jpg"),
|
||||
imageUrl: '',
|
||||
isHaveLookApply: false,
|
||||
annualLeaveDay: 0.00, //年假剩余天数
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
onShow() {
|
||||
// this.getUserInfo();
|
||||
//获取当前用户累计出差天数
|
||||
// this.getBusinessTripDayTimeFn();
|
||||
//获取当前用户累计调休天数
|
||||
// this.getLeaveTimeFn();
|
||||
// 获取当前用户累计请假天数(不包括调休的记录)
|
||||
// this.getLeaveTimePaidLeaveFn();
|
||||
|
||||
//查询年假剩余天数
|
||||
// this._getSystemHomePageTabChart();
|
||||
|
||||
|
||||
},
|
||||
methods: {
|
||||
Logout(){
|
||||
this.$u.api.unbindmp().then(res=>{
|
||||
this.$u.vuex('vuex_token', '')
|
||||
uni.redirectTo({
|
||||
url: '/pages/login/login'
|
||||
});
|
||||
/* 查询年假剩余天数 */
|
||||
_getSystemHomePageTabChart() {
|
||||
systemHomePageTabChart().then((res) => {
|
||||
if (res.statusCode === 200) {
|
||||
if (res.data.data !== undefined && res.data.data !== null && res.data.data !== "") {
|
||||
|
||||
this.annualLeaveDay = res.data.data.annualLeaveDay || 0.00;
|
||||
} else {
|
||||
this.annualLeaveDay = 0.00;
|
||||
}
|
||||
)
|
||||
} else {
|
||||
this.annualLeaveDay = 0.00;
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
}).catch(() => {
|
||||
this.annualLeaveDay = 0.00
|
||||
uni.showToast({
|
||||
title: '网络异常, 请求失败',
|
||||
icon: 'none'
|
||||
})
|
||||
})
|
||||
},
|
||||
getLeaveTimePaidLeaveFn() {
|
||||
getLeaveTimePaidLeave().then(res => {
|
||||
if (res.statusCode === 200) {
|
||||
this.getLeaveTimePaidLeaveCon = res.data.data.b_leave_days;
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '获取用户累计请假天数失败',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: '请求失败',
|
||||
icon: 'none'
|
||||
})
|
||||
})
|
||||
},
|
||||
getLeaveTimeFn() {
|
||||
getLeaveTime().then(res => {
|
||||
if (res.statusCode === 200) {
|
||||
this.getLeaveTimeCon = res.data.data.b_leave_days;
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '获取用户累计调休天数失败',
|
||||
icon: 'none'
|
||||
})
|
||||
|
||||
}
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: '请求失败',
|
||||
icon: 'none'
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
getBusinessTripDayTimeFn() {
|
||||
getBusinessTripDayTime().then(res => {
|
||||
if (res.statusCode === 200) {
|
||||
this.getBusinessTripDayTimeCon = res.data.data.b_leave_days;
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '获取用户累计出差天数失败',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: '请求失败',
|
||||
icon: 'none'
|
||||
})
|
||||
})
|
||||
},
|
||||
goInto(type) {
|
||||
if (type == "myApply") {
|
||||
uni.navigateTo({
|
||||
url: '/pages/profile/my_apply/my_apply'
|
||||
})
|
||||
}
|
||||
if (type == "daiban") {
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/daiban_management/daiban_management'
|
||||
})
|
||||
}
|
||||
if (type == "myData") {
|
||||
uni.navigateTo({
|
||||
url: '/pages/my/myInfo'
|
||||
})
|
||||
}
|
||||
if (type == "problem") {
|
||||
uni.navigateTo({
|
||||
url: '/pages/profile/common_problem/common_problem'
|
||||
})
|
||||
}
|
||||
},
|
||||
getUserInfo() {
|
||||
var promise;
|
||||
var that = this;
|
||||
promise = new Promise(function(resolve, reject) {
|
||||
authUser().then(res => {
|
||||
if (res.statusCode === 200) {
|
||||
const principal = res.data.principal;
|
||||
that.username = principal.realname;
|
||||
that.mobile = principal.mobile || '';
|
||||
that.userName = principal.username;
|
||||
that.userId = principal.userId;
|
||||
that.$store.commit("SET_AUTHORITIES", res.data.authorities);
|
||||
//获取微信头像
|
||||
// this.wxUserImg(principal.username);
|
||||
resolve()
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '获取用户信息失败',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: 'user请求失败',
|
||||
icon: 'none'
|
||||
})
|
||||
})
|
||||
})
|
||||
promise.then(function() {
|
||||
userConnection(that.userName).then(res => {
|
||||
that.imageUrl = res.data.data.imageUrl;
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: '微信头像请求失败',
|
||||
icon: 'none'
|
||||
})
|
||||
})
|
||||
//查看当前用户路由
|
||||
getCurrentUserRoute(that.userName).then(res => {
|
||||
if (res.statusCode === 200) {
|
||||
|
||||
const routes = res.data.data.routes;
|
||||
const obj = routes.find(item => {
|
||||
return item.path === '/new_apply_approval'
|
||||
})
|
||||
if (obj) {
|
||||
|
||||
that.isHaveLookApply = Boolean(obj.children.find(item => {
|
||||
return item.path === 'look_apply'; //查看是否有我的审批
|
||||
}))
|
||||
}
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '获取当前用户路由失败',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: '获取路由失败',
|
||||
icon: 'none'
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
},
|
||||
bindMP(){
|
||||
let data = {openid: uni.getStorageSync('wxmp_openid')}
|
||||
this.$u.api.bindmp(data).then(res=>{})
|
||||
// uni.login({
|
||||
// provider: 'weixin',
|
||||
// success: (loginRes)=>{
|
||||
// this.$u.api.bindmp({code:loginRes.code}).then(res=>{
|
||||
// this.$u.toast('绑定成功');
|
||||
// this.$u.vuex('vuex_user.wxmp_openid', res.data.wxmp_openid)
|
||||
// uni.reLaunch({
|
||||
// url:'/pages/my/my'
|
||||
// })
|
||||
// }).catch(e=>{})
|
||||
// }
|
||||
// });
|
||||
|
||||
signoutFn() {
|
||||
var that = this;
|
||||
this.$u.api.loginOut().then(()=>{
|
||||
that.$u.vuex('vuex_token', null);
|
||||
uni.reLaunch({
|
||||
url:'/pages/login/login_'
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page{
|
||||
background-color: #ededed;
|
||||
}
|
||||
|
||||
.camera{
|
||||
width: 54px;
|
||||
height: 44px;
|
||||
|
||||
&:active{
|
||||
background-color: #ededed;
|
||||
}
|
||||
}
|
||||
.user-box{
|
||||
background-color: #fff;
|
||||
padding-top:24rpx;
|
||||
}
|
||||
.avatarImg {
|
||||
width: 148rpx;
|
||||
height: 148rpx;
|
||||
border-radius: 20rpx;
|
||||
overflow: hidden;
|
||||
<style>
|
||||
page {
|
||||
background-color: #f3fbff;
|
||||
}
|
||||
</style>
|
||||
<style scoped>
|
||||
.profile {
|
||||
position: relative;
|
||||
background-color: #f3fbff;
|
||||
padding-bottom: 70rpx;
|
||||
}
|
||||
|
||||
.nav-bar {
|
||||
height: 210rpx;
|
||||
background-color: #2cade8;
|
||||
color: #FFFFFF;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.user-info {
|
||||
width: 680rpx;
|
||||
height: 122rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.user-head {
|
||||
width: 114rpx;
|
||||
height: 114rpx;
|
||||
border-radius: 50%;
|
||||
overflow: hidden;
|
||||
margin-right: 30rpx;
|
||||
}
|
||||
|
||||
.user-head image {
|
||||
width: 114rpx;
|
||||
height: 114rpx;
|
||||
}
|
||||
|
||||
.user-name {
|
||||
font-family: PingFang-SC-Bold;
|
||||
font-size: 34rpx;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.user-phone {
|
||||
font-family: AdobeHeitiStd-Regular;
|
||||
font-size: 22rpx;
|
||||
color: #b7d3fa;
|
||||
}
|
||||
|
||||
.modify-info {
|
||||
width: 136rpx;
|
||||
height: 50rpx;
|
||||
background-image: linear-gradient(253deg, #febe3d 0%, #ff890a 100%);
|
||||
border-radius: 25rpx;
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 24rpx !important;
|
||||
line-height: 50rpx;
|
||||
padding-right: 0rpx;
|
||||
padding-left: 0rpx;
|
||||
color: #ffffff;
|
||||
margin-right: 0rpx;
|
||||
}
|
||||
|
||||
.num-info {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
width: 720rpx;
|
||||
height: 199rpx;
|
||||
background-color: #ffffff;
|
||||
box-shadow: 0rpx 0rpx 24rpx 0rpx rgba(101, 176, 249, 0.41);
|
||||
border-radius: 10rpx;
|
||||
margin: 0 auto;
|
||||
margin-top: -130rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.num-content {
|
||||
font-size: 40rpx;
|
||||
color: #2c6fd9;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.text-content {
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 26rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.enter-list {
|
||||
padding: 0 11rpx;
|
||||
box-sizing: border-box;
|
||||
width: 720rpx;
|
||||
/* height: 405rpx; */
|
||||
background-color: #ffffff;
|
||||
border-radius: 10rpx;
|
||||
margin: 0 auto;
|
||||
margin-top: 28rpx;
|
||||
}
|
||||
|
||||
.enter-item {
|
||||
position: relative;
|
||||
border-bottom: 1rpx solid #f8f8f8;
|
||||
}
|
||||
|
||||
.title-text {
|
||||
margin-left: 78rpx;
|
||||
line-height: 102rpx;
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.enter-item .left-icon {
|
||||
width: 29rpx;
|
||||
height: 32rpx;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 26rpx;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
.enter-item .right-icon {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: 20rpx;
|
||||
transform: translateY(-50%);
|
||||
font-size: 36rpx !important;
|
||||
}
|
||||
|
||||
.sign-out-btn {
|
||||
width: 711rpx;
|
||||
height: 90rpx;
|
||||
background-color: #ffffff;
|
||||
border-radius: 10rpx;
|
||||
margin: 0 auto;
|
||||
margin-top: 28rpx;
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 28rpx;
|
||||
line-height: 90rpx;
|
||||
color: #d30101;
|
||||
}
|
||||
|
||||
.sign-out-btn:after {
|
||||
border: none !important;
|
||||
}
|
||||
</style>
|
||||
c
|
|
@ -0,0 +1,269 @@
|
|||
<template>
|
||||
<view class="my_duty">
|
||||
<uni-nav-bar @clickLeft="goBack()" height="110rpx" leftWidth="200rpx" leftText="作业列表" leftIcon="left" border
|
||||
backgroundColor="#2cade8" color="#fff" fixed statusBar shadow></uni-nav-bar>
|
||||
<view class="my-top-search-nav">
|
||||
<view class="search-wrap">
|
||||
<view class="search-body">
|
||||
<image class="left-img" src="../../../static/home/searchIcon.png" mode=""></image>
|
||||
<input class="search-input" type="text" v-model="search" placeholder="请输入" />
|
||||
<image class="right-img" src="../../../static/my/my_apply/zuofei.png" mode="" @click="resetSearch">
|
||||
</image>
|
||||
<view class="right-btn" @click="searchHandle">搜索</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="empty-view"></view>
|
||||
<view class="content">
|
||||
<view class="item-wrap" v-for="(val,index) in ticketList" :key="val.id">
|
||||
<view class="duty-item">
|
||||
<view class="top-info">
|
||||
<view class="info-title">{{val.title}}</view>
|
||||
</view>
|
||||
<view class="center-info">
|
||||
<view class="info-details">所属工作流:{{val.workflow_.name}}</view>
|
||||
<view class="info-details">工单状态:{{val.state_.name}}</view>
|
||||
<view class="info-details">提交时间:{{val.create_time}} </view>
|
||||
<view class="info-details">更新时间:{{val.update_time}} </view>
|
||||
</view>
|
||||
<view class="bottom-btns">
|
||||
<view class="shenhezhong shenhe-status" @click="ticketHandle(val)">
|
||||
<image src="../../../static/my/my_apply/blue-time.png" mode=""></image>
|
||||
处理
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'ticket',
|
||||
data() {
|
||||
return {
|
||||
search: '',
|
||||
pageSize: 10,
|
||||
pageNum: 1,
|
||||
totalNum: 0,
|
||||
ticketList: [],
|
||||
}
|
||||
},
|
||||
//上拉加载
|
||||
onReachBottom() {
|
||||
const totalPage = Math.ceil(this.totalNum / this.pageSize);
|
||||
if (this.pageNum < totalPage) {
|
||||
this.pageNum += 1;
|
||||
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: "已全部加载",
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.ticketList = [];
|
||||
// this.getTicketLists();
|
||||
},
|
||||
//下拉刷新
|
||||
onPullDownRefresh() {
|
||||
this.pageNum = 1;
|
||||
this.ticketList = [];
|
||||
// this.getTicketLists();
|
||||
},
|
||||
methods: {
|
||||
getTicketLists() {
|
||||
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);
|
||||
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}`;
|
||||
uni.navigateTo({
|
||||
url: '../detail/ticketHandle' + params,
|
||||
})
|
||||
},
|
||||
goBack() {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
},
|
||||
searchHandle() {
|
||||
this.pageNum = 1;
|
||||
this.ticketList = [];
|
||||
this.getTicketLists()
|
||||
},
|
||||
resetSearch() {
|
||||
this.pageNum = 1;
|
||||
this.search = "";
|
||||
this.ticketList = [];
|
||||
this.getTicketLists();
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.empty-view {
|
||||
height: 120rpx;
|
||||
}
|
||||
|
||||
>>>.uni-navbar__header,
|
||||
>>>.uni-status-bar {
|
||||
background-image: linear-gradient(254deg,
|
||||
#0ca7ee 0%,
|
||||
#005aff 100%,
|
||||
#2a8cff 100%,
|
||||
#54bdff 100%),
|
||||
linear-gradient(#e60012,
|
||||
#e60012);
|
||||
}
|
||||
|
||||
.my_duty {
|
||||
background-color: #f3fbff;
|
||||
}
|
||||
|
||||
.my_duty>>>.uni-navbar-btn-text text {
|
||||
font-size: 32rpx !important;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 14rpx;
|
||||
}
|
||||
|
||||
.item-wrap {
|
||||
margin-bottom: 14rpx;
|
||||
}
|
||||
|
||||
.duty-item {
|
||||
width: 720rpx;
|
||||
background-color: #ffffff;
|
||||
border-radius: 10rpx;
|
||||
margin: 0 auto;
|
||||
padding: 24rpx 21rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.info-title {
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 30rpx;
|
||||
line-height: 72rpx;
|
||||
color: #3d3d3d;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.right-time {
|
||||
font-size: 24rpx;
|
||||
line-height: 72rpx;
|
||||
color: #ababab;
|
||||
}
|
||||
|
||||
.center-info {
|
||||
padding-bottom: 30rpx;
|
||||
border-bottom: 1rpx solid #eeeeee;
|
||||
}
|
||||
|
||||
.info-details {
|
||||
font-size: 28rpx;
|
||||
line-height: 40rpx;
|
||||
color: #5b5b5b;
|
||||
}
|
||||
|
||||
.bottom-btns {
|
||||
text-align: center;
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 28rpx;
|
||||
line-height: 83rpx;
|
||||
}
|
||||
|
||||
.shenhezhong {
|
||||
color: #2c6fd9;
|
||||
}
|
||||
|
||||
.shenhe-status image {
|
||||
width: 26rpx;
|
||||
height: 26rpx;
|
||||
margin-right: 10rpx;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.my-top-search-nav {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.search-wrap {
|
||||
background-blend-mode: normal,
|
||||
normal;
|
||||
padding-bottom: 44rpx;
|
||||
padding-top: 20rpx;
|
||||
}
|
||||
|
||||
.search-body {
|
||||
width: 715rpx;
|
||||
height: 78rpx;
|
||||
background-color: #ffffff;
|
||||
border-radius: 39rpx;
|
||||
margin: 0 auto;
|
||||
padding: 13rpx;
|
||||
padding-left: 25rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.search-body .search-input {
|
||||
height: 100%;
|
||||
flex: 1;
|
||||
padding-left: 12rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.left-img {
|
||||
width: 26rpx;
|
||||
height: 26rpx;
|
||||
|
||||
}
|
||||
|
||||
.right-img {
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.right-btn {
|
||||
width: 110rpx;
|
||||
height: 58rpx;
|
||||
line-height: 58rpx;
|
||||
background-image: linear-gradient(0deg,
|
||||
#2da0f3 0%,
|
||||
#54bcff 100%);
|
||||
border-radius: 29rpx;
|
||||
font-size: 28rpx;
|
||||
color: #ffffff;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,269 @@
|
|||
<template>
|
||||
<view class="my_duty">
|
||||
<uni-nav-bar @clickLeft="goBack()" height="110rpx" leftWidth="200rpx" leftText="入场项目" leftIcon="left" border
|
||||
backgroundColor="#2cade8" color="#fff" fixed statusBar shadow></uni-nav-bar>
|
||||
<view class="my-top-search-nav">
|
||||
<view class="search-wrap">
|
||||
<view class="search-body">
|
||||
<image class="left-img" src="../../../static/home/searchIcon.png" mode=""></image>
|
||||
<input class="search-input" type="text" v-model="search" placeholder="请输入" />
|
||||
<image class="right-img" src="../../../static/my/my_apply/zuofei.png" mode="" @click="resetSearch">
|
||||
</image>
|
||||
<view class="right-btn" @click="searchHandle">搜索</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="empty-view"></view>
|
||||
<view class="content">
|
||||
<view class="item-wrap" v-for="(val,index) in ticketList" :key="val.id">
|
||||
<view class="duty-item">
|
||||
<view class="top-info">
|
||||
<view class="info-title">{{val.title}}</view>
|
||||
</view>
|
||||
<view class="center-info">
|
||||
<view class="info-details">所属工作流:{{val.workflow_.name}}</view>
|
||||
<view class="info-details">工单状态:{{val.state_.name}}</view>
|
||||
<view class="info-details">提交时间:{{val.create_time}} </view>
|
||||
<view class="info-details">更新时间:{{val.update_time}} </view>
|
||||
</view>
|
||||
<view class="bottom-btns">
|
||||
<view class="shenhezhong shenhe-status" @click="ticketHandle(val)">
|
||||
<image src="../../../static/my/my_apply/blue-time.png" mode=""></image>
|
||||
处理
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'ticket',
|
||||
data() {
|
||||
return {
|
||||
search: '',
|
||||
pageSize: 10,
|
||||
pageNum: 1,
|
||||
totalNum: 0,
|
||||
ticketList: [],
|
||||
}
|
||||
},
|
||||
//上拉加载
|
||||
onReachBottom() {
|
||||
const totalPage = Math.ceil(this.totalNum / this.pageSize);
|
||||
if (this.pageNum < totalPage) {
|
||||
this.pageNum += 1;
|
||||
// this._getMyApplyList(false);
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: "已全部加载",
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.ticketList = [];
|
||||
// this.getTicketLists();
|
||||
},
|
||||
//下拉刷新
|
||||
onPullDownRefresh() {
|
||||
this.pageNum = 1;
|
||||
this.ticketList = [];
|
||||
// this.getTicketLists();
|
||||
},
|
||||
methods: {
|
||||
getTicketLists() {
|
||||
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);
|
||||
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}`;
|
||||
uni.navigateTo({
|
||||
url: '../detail/ticketHandle' + params,
|
||||
})
|
||||
},
|
||||
goBack() {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
},
|
||||
searchHandle() {
|
||||
this.pageNum = 1;
|
||||
this.ticketList = [];
|
||||
this.getTicketLists()
|
||||
},
|
||||
resetSearch() {
|
||||
this.pageNum = 1;
|
||||
this.search = "";
|
||||
this.ticketList = [];
|
||||
this.getTicketLists();
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.empty-view {
|
||||
height: 120rpx;
|
||||
}
|
||||
|
||||
>>>.uni-navbar__header,
|
||||
>>>.uni-status-bar {
|
||||
background-image: linear-gradient(254deg,
|
||||
#0ca7ee 0%,
|
||||
#005aff 100%,
|
||||
#2a8cff 100%,
|
||||
#54bdff 100%),
|
||||
linear-gradient(#e60012,
|
||||
#e60012);
|
||||
}
|
||||
|
||||
.my_duty {
|
||||
background-color: #f3fbff;
|
||||
}
|
||||
|
||||
.my_duty>>>.uni-navbar-btn-text text {
|
||||
font-size: 32rpx !important;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 14rpx;
|
||||
}
|
||||
|
||||
.item-wrap {
|
||||
margin-bottom: 14rpx;
|
||||
}
|
||||
|
||||
.duty-item {
|
||||
width: 720rpx;
|
||||
background-color: #ffffff;
|
||||
border-radius: 10rpx;
|
||||
margin: 0 auto;
|
||||
padding: 24rpx 21rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.info-title {
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 30rpx;
|
||||
line-height: 72rpx;
|
||||
color: #3d3d3d;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.right-time {
|
||||
font-size: 24rpx;
|
||||
line-height: 72rpx;
|
||||
color: #ababab;
|
||||
}
|
||||
|
||||
.center-info {
|
||||
padding-bottom: 30rpx;
|
||||
border-bottom: 1rpx solid #eeeeee;
|
||||
}
|
||||
|
||||
.info-details {
|
||||
font-size: 28rpx;
|
||||
line-height: 40rpx;
|
||||
color: #5b5b5b;
|
||||
}
|
||||
|
||||
.bottom-btns {
|
||||
text-align: center;
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 28rpx;
|
||||
line-height: 83rpx;
|
||||
}
|
||||
|
||||
.shenhezhong {
|
||||
color: #2c6fd9;
|
||||
}
|
||||
|
||||
.shenhe-status image {
|
||||
width: 26rpx;
|
||||
height: 26rpx;
|
||||
margin-right: 10rpx;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.my-top-search-nav {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.search-wrap {
|
||||
background-blend-mode: normal,
|
||||
normal;
|
||||
padding-bottom: 44rpx;
|
||||
padding-top: 20rpx;
|
||||
}
|
||||
|
||||
.search-body {
|
||||
width: 715rpx;
|
||||
height: 78rpx;
|
||||
background-color: #ffffff;
|
||||
border-radius: 39rpx;
|
||||
margin: 0 auto;
|
||||
padding: 13rpx;
|
||||
padding-left: 25rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.search-body .search-input {
|
||||
height: 100%;
|
||||
flex: 1;
|
||||
padding-left: 12rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.left-img {
|
||||
width: 26rpx;
|
||||
height: 26rpx;
|
||||
|
||||
}
|
||||
|
||||
.right-img {
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.right-btn {
|
||||
width: 110rpx;
|
||||
height: 58rpx;
|
||||
line-height: 58rpx;
|
||||
background-image: linear-gradient(0deg,
|
||||
#2da0f3 0%,
|
||||
#54bcff 100%);
|
||||
border-radius: 29rpx;
|
||||
font-size: 28rpx;
|
||||
color: #ffffff;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,269 @@
|
|||
<template>
|
||||
<view class="my_duty">
|
||||
<uni-nav-bar @clickLeft="goBack()" height="110rpx" leftWidth="200rpx" leftText="来访项目" leftIcon="left" border
|
||||
backgroundColor="#2cade8" color="#fff" fixed statusBar shadow></uni-nav-bar>
|
||||
<view class="my-top-search-nav">
|
||||
<view class="search-wrap">
|
||||
<view class="search-body">
|
||||
<image class="left-img" src="../../../static/home/searchIcon.png" mode=""></image>
|
||||
<input class="search-input" type="text" v-model="search" placeholder="请输入" />
|
||||
<image class="right-img" src="../../../static/my/my_apply/zuofei.png" mode="" @click="resetSearch">
|
||||
</image>
|
||||
<view class="right-btn" @click="searchHandle">搜索</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="empty-view"></view>
|
||||
<view class="content">
|
||||
<view class="item-wrap" v-for="(val,index) in ticketList" :key="val.id">
|
||||
<view class="duty-item">
|
||||
<view class="top-info">
|
||||
<view class="info-title">{{val.title}}</view>
|
||||
</view>
|
||||
<view class="center-info">
|
||||
<view class="info-details">所属工作流:{{val.workflow_.name}}</view>
|
||||
<view class="info-details">工单状态:{{val.state_.name}}</view>
|
||||
<view class="info-details">提交时间:{{val.create_time}} </view>
|
||||
<view class="info-details">更新时间:{{val.update_time}} </view>
|
||||
</view>
|
||||
<view class="bottom-btns">
|
||||
<view class="shenhezhong shenhe-status" @click="ticketHandle(val)">
|
||||
<image src="../../../static/my/my_apply/blue-time.png" mode=""></image>
|
||||
处理
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'ticket',
|
||||
data() {
|
||||
return {
|
||||
search: '',
|
||||
pageSize: 10,
|
||||
pageNum: 1,
|
||||
totalNum: 0,
|
||||
ticketList: [],
|
||||
}
|
||||
},
|
||||
//上拉加载
|
||||
onReachBottom() {
|
||||
const totalPage = Math.ceil(this.totalNum / this.pageSize);
|
||||
if (this.pageNum < totalPage) {
|
||||
this.pageNum += 1;
|
||||
// this._getMyApplyList(false);
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: "已全部加载",
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.ticketList = [];
|
||||
// this.getTicketLists();
|
||||
},
|
||||
//下拉刷新
|
||||
onPullDownRefresh() {
|
||||
this.pageNum = 1;
|
||||
this.ticketList = [];
|
||||
// this.getTicketLists();
|
||||
},
|
||||
methods: {
|
||||
getTicketLists() {
|
||||
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);
|
||||
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}`;
|
||||
uni.navigateTo({
|
||||
url: '../detail/ticketHandle' + params,
|
||||
})
|
||||
},
|
||||
goBack() {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
},
|
||||
searchHandle() {
|
||||
this.pageNum = 1;
|
||||
this.ticketList = [];
|
||||
this.getTicketLists()
|
||||
},
|
||||
resetSearch() {
|
||||
this.pageNum = 1;
|
||||
this.search = "";
|
||||
this.ticketList = [];
|
||||
this.getTicketLists();
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.empty-view {
|
||||
height: 120rpx;
|
||||
}
|
||||
|
||||
>>>.uni-navbar__header,
|
||||
>>>.uni-status-bar {
|
||||
background-image: linear-gradient(254deg,
|
||||
#0ca7ee 0%,
|
||||
#005aff 100%,
|
||||
#2a8cff 100%,
|
||||
#54bdff 100%),
|
||||
linear-gradient(#e60012,
|
||||
#e60012);
|
||||
}
|
||||
|
||||
.my_duty {
|
||||
background-color: #f3fbff;
|
||||
}
|
||||
|
||||
.my_duty>>>.uni-navbar-btn-text text {
|
||||
font-size: 32rpx !important;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 14rpx;
|
||||
}
|
||||
|
||||
.item-wrap {
|
||||
margin-bottom: 14rpx;
|
||||
}
|
||||
|
||||
.duty-item {
|
||||
width: 720rpx;
|
||||
background-color: #ffffff;
|
||||
border-radius: 10rpx;
|
||||
margin: 0 auto;
|
||||
padding: 24rpx 21rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.info-title {
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 30rpx;
|
||||
line-height: 72rpx;
|
||||
color: #3d3d3d;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.right-time {
|
||||
font-size: 24rpx;
|
||||
line-height: 72rpx;
|
||||
color: #ababab;
|
||||
}
|
||||
|
||||
.center-info {
|
||||
padding-bottom: 30rpx;
|
||||
border-bottom: 1rpx solid #eeeeee;
|
||||
}
|
||||
|
||||
.info-details {
|
||||
font-size: 28rpx;
|
||||
line-height: 40rpx;
|
||||
color: #5b5b5b;
|
||||
}
|
||||
|
||||
.bottom-btns {
|
||||
text-align: center;
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 28rpx;
|
||||
line-height: 83rpx;
|
||||
}
|
||||
|
||||
.shenhezhong {
|
||||
color: #2c6fd9;
|
||||
}
|
||||
|
||||
.shenhe-status image {
|
||||
width: 26rpx;
|
||||
height: 26rpx;
|
||||
margin-right: 10rpx;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.my-top-search-nav {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.search-wrap {
|
||||
background-blend-mode: normal,
|
||||
normal;
|
||||
padding-bottom: 44rpx;
|
||||
padding-top: 20rpx;
|
||||
}
|
||||
|
||||
.search-body {
|
||||
width: 715rpx;
|
||||
height: 78rpx;
|
||||
background-color: #ffffff;
|
||||
border-radius: 39rpx;
|
||||
margin: 0 auto;
|
||||
padding: 13rpx;
|
||||
padding-left: 25rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.search-body .search-input {
|
||||
height: 100%;
|
||||
flex: 1;
|
||||
padding-left: 12rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.left-img {
|
||||
width: 26rpx;
|
||||
height: 26rpx;
|
||||
|
||||
}
|
||||
|
||||
.right-img {
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.right-btn {
|
||||
width: 110rpx;
|
||||
height: 58rpx;
|
||||
line-height: 58rpx;
|
||||
background-image: linear-gradient(0deg,
|
||||
#2da0f3 0%,
|
||||
#54bcff 100%);
|
||||
border-radius: 29rpx;
|
||||
font-size: 28rpx;
|
||||
color: #ffffff;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
|
@ -1,7 +1,8 @@
|
|||
<template>
|
||||
<view class="workbench">
|
||||
<view style="position: relative;overflow: hidden;">
|
||||
<view style="position: absolute;top:0;left:0;bottom:0;right:0;height: 290rpx;background-image: url(../../static/workSpace/bgimg.png);background-position: center bottom;background-size: 100%;">
|
||||
<view
|
||||
style="position: absolute;top:0;left:0;bottom:0;right:0;height: 290rpx;background-image: url(../../static/workSpace/bgimg.png);background-position: center bottom;background-size: 100%;">
|
||||
</view>
|
||||
<view class="top-title" style="display: flex;">
|
||||
<block v-for="(item,index) in routerList" :key="item.index">
|
||||
|
@ -38,7 +39,7 @@
|
|||
<image src="../../static/home/daiban.png" mode="widthFix" class="img"></image>
|
||||
<text class="title-text-left">作业管理</text>
|
||||
</view>
|
||||
<view class="" @click="goIntoMoreApply()">
|
||||
<view class="" @click="goIntoMoreApply('operation')">
|
||||
<text class="title-text-right">查看更多</text>
|
||||
<uni-icons type="right" :size="15" color="#ababab"></uni-icons>
|
||||
</view>
|
||||
|
@ -77,7 +78,7 @@
|
|||
<image src="../../static/home/daiban.png" mode="widthFix" class="img"></image>
|
||||
<text class="title-text-left">入场项目</text>
|
||||
</view>
|
||||
<view class="" @click="goIntoMoreApply()">
|
||||
<view class="" @click="goIntoMoreApply('rpj')">
|
||||
<text class="title-text-right">查看更多</text>
|
||||
<uni-icons type="right" :size="15" color="#ababab"></uni-icons>
|
||||
</view>
|
||||
|
@ -116,7 +117,7 @@
|
|||
<image src="../../static/home/daiban.png" mode="widthFix" class="img"></image>
|
||||
<text class="title-text-left">来访项目</text>
|
||||
</view>
|
||||
<view class="" @click="goIntoMoreApply()">
|
||||
<view class="" @click="goIntoMoreApply('visit')">
|
||||
<text class="title-text-right">查看更多</text>
|
||||
<uni-icons type="right" :size="15" color="#ababab"></uni-icons>
|
||||
</view>
|
||||
|
@ -153,19 +154,16 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
name: "",
|
||||
username:"",
|
||||
routerList:[
|
||||
{name:'作业管理',
|
||||
icon:'specialmatter.png',
|
||||
path:'index',
|
||||
childItems : [
|
||||
{
|
||||
username: "",
|
||||
routerList: [{
|
||||
name: '作业管理',
|
||||
icon: 'specialmatter.png',
|
||||
path: 'index',
|
||||
childItems: [{
|
||||
name: "请假申请"
|
||||
},
|
||||
{
|
||||
|
@ -182,16 +180,25 @@
|
|||
}
|
||||
|
||||
],
|
||||
childUrls : [
|
||||
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:'入厂项目',icon:'hetong.png',path:'index'},
|
||||
{name:'来访项目',icon:'renli.png',path:'index'},
|
||||
]
|
||||
},
|
||||
{
|
||||
name: '入厂项目',
|
||||
icon: 'hetong.png',
|
||||
path: 'index'
|
||||
},
|
||||
{
|
||||
name: '来访项目',
|
||||
icon: 'renli.png',
|
||||
path: 'index'
|
||||
},
|
||||
],
|
||||
myApplyArray: [],
|
||||
mytopimg: require("@/static/workSpace/bgimg-top.jpg"),
|
||||
|
@ -202,16 +209,16 @@
|
|||
// this.getUserInfo();
|
||||
},
|
||||
methods: {
|
||||
goInto(index){
|
||||
goInto(index) {
|
||||
if (index == 0) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/workSpace/newWork/work'
|
||||
})
|
||||
}else if (index == 1) {
|
||||
} else if (index == 1) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/workSpace/newWork/relevant'
|
||||
})
|
||||
}else if (index == 2) {
|
||||
} else if (index == 2) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/workSpace/newWork/visit'
|
||||
})
|
||||
|
@ -240,7 +247,7 @@
|
|||
})
|
||||
})
|
||||
})
|
||||
promise.then(function(){
|
||||
promise.then(function() {
|
||||
|
||||
//查看当前用户路由
|
||||
getCurrentUserRoute(that.username).then(res => {
|
||||
|
@ -262,98 +269,92 @@
|
|||
})
|
||||
|
||||
},
|
||||
initList(routes){
|
||||
const obj =routes.find(item=>{
|
||||
initList(routes) {
|
||||
const obj = routes.find(item => {
|
||||
return item.path === '/apply'
|
||||
})
|
||||
//合同管理
|
||||
const project =routes.find(item=>{
|
||||
const project = routes.find(item => {
|
||||
return item.path === '/project_management'
|
||||
})
|
||||
//通知公告
|
||||
const inform =routes.find(item=>{
|
||||
const inform = routes.find(item => {
|
||||
return item.path === '/press'
|
||||
})
|
||||
let projectObj;
|
||||
let informObj;
|
||||
if(project){ //创建合同
|
||||
projectObj = project.children.find(item=>{
|
||||
if (project) { //创建合同
|
||||
projectObj = project.children.find(item => {
|
||||
return item.path == "hetongxinxi_shoukuan";
|
||||
})
|
||||
}
|
||||
if(inform){ //通知公告
|
||||
informObj = inform.children.find(item=>{
|
||||
if (inform) { //通知公告
|
||||
informObj = inform.children.find(item => {
|
||||
return item.path == "index";
|
||||
})
|
||||
}
|
||||
|
||||
if(obj){
|
||||
if (obj) {
|
||||
const newObj = JSON.parse(JSON.stringify(obj));
|
||||
let arr = newObj.children;
|
||||
const index = arr.findIndex(item=>{
|
||||
const index = arr.findIndex(item => {
|
||||
return item.path == "index";
|
||||
});
|
||||
if(index!==-1){
|
||||
arr.splice(index,1); //去除‘新建申请 index’
|
||||
if (index !== -1) {
|
||||
arr.splice(index, 1); //去除‘新建申请 index’
|
||||
}
|
||||
|
||||
if(informObj){
|
||||
if (informObj) {
|
||||
const newInformObj = JSON.parse(JSON.stringify(informObj));
|
||||
arr.splice(arr.length,0,newInformObj); //‘通知公告’放到倒数第一个
|
||||
arr.splice(arr.length, 0, newInformObj); //‘通知公告’放到倒数第一个
|
||||
}
|
||||
|
||||
let htBackItem;
|
||||
for(let val of arr){
|
||||
if(val.path=="yewufeiyong"){
|
||||
for (let val of arr) {
|
||||
if (val.path == "yewufeiyong") {
|
||||
htBackItem = val;
|
||||
break;
|
||||
}
|
||||
else if(val.path=="jiesuanguanli"){
|
||||
} else if (val.path == "jiesuanguanli") {
|
||||
htBackItem = val;
|
||||
break;
|
||||
}
|
||||
else if(val.path=="index_detail_xinwen"){
|
||||
} else if (val.path == "index_detail_xinwen") {
|
||||
htBackItem = val;
|
||||
break;
|
||||
}
|
||||
else if(val.path=="special_matter"){
|
||||
} else if (val.path == "special_matter") {
|
||||
htBackItem = val;
|
||||
break;
|
||||
}
|
||||
else if(val.path=="issue_report"){
|
||||
} else if (val.path == "issue_report") {
|
||||
htBackItem = val;
|
||||
break;
|
||||
}
|
||||
else if(val.path=="index"){
|
||||
} else if (val.path == "index") {
|
||||
htBackItem = val;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(projectObj){
|
||||
if (projectObj) {
|
||||
const newProjectObj = JSON.parse(JSON.stringify(projectObj));
|
||||
newProjectObj.name = "创建合同";
|
||||
if(htBackItem){
|
||||
const backIndex = arr.findIndex(item=>{
|
||||
return item==htBackItem;
|
||||
if (htBackItem) {
|
||||
const backIndex = arr.findIndex(item => {
|
||||
return item == htBackItem;
|
||||
})
|
||||
if(backIndex!==-1){
|
||||
arr.splice(backIndex,0,newProjectObj); //‘合同’插入业务费用之前
|
||||
}else{
|
||||
if (backIndex !== -1) {
|
||||
arr.splice(backIndex, 0, newProjectObj); //‘合同’插入业务费用之前
|
||||
} else {
|
||||
arr.push(newProjectObj) //容错处理
|
||||
}
|
||||
} else{
|
||||
} else {
|
||||
arr.push(newProjectObj)
|
||||
}
|
||||
}
|
||||
|
||||
this.routerList = arr.map(item=>{
|
||||
item.childItems =[];
|
||||
item.childUrls =[];
|
||||
this.routerList = arr.map(item => {
|
||||
item.childItems = [];
|
||||
item.childUrls = [];
|
||||
item.icon = "kaoqin.png";
|
||||
if(item.path=="kqgl"){
|
||||
if (item.path == "kqgl") {
|
||||
item.icon = "kaoqin.png";
|
||||
item.childItems = [
|
||||
{
|
||||
item.childItems = [{
|
||||
name: "请假申请"
|
||||
},
|
||||
{
|
||||
|
@ -378,11 +379,9 @@
|
|||
"/pages/workSpace/new_apply/kaoqin_management/weidaka_apply",
|
||||
|
||||
]
|
||||
}
|
||||
else if(item.path=="cl"){
|
||||
} else if (item.path == "cl") {
|
||||
item.icon = "cheliang.png";
|
||||
item.childItems = [
|
||||
{
|
||||
item.childItems = [{
|
||||
name: "车辆维修、保养"
|
||||
},
|
||||
{
|
||||
|
@ -397,11 +396,9 @@
|
|||
"/pages/workSpace/new_apply/car_management/private_car_public",
|
||||
"/pages/workSpace/new_apply/car_management/paicheshenqing",
|
||||
]
|
||||
}
|
||||
else if(item.path=="cg"){
|
||||
} else if (item.path == "cg") {
|
||||
item.icon = "caigou.png";
|
||||
item.childItems = [
|
||||
{
|
||||
item.childItems = [{
|
||||
name: "印刷品清单"
|
||||
},
|
||||
{
|
||||
|
@ -420,11 +417,9 @@
|
|||
"/pages/workSpace/new_apply/caigou_management/fixed_assets_apply",
|
||||
"/pages/workSpace/new_apply/caigou_management/low_value_products_apply"
|
||||
];
|
||||
}
|
||||
else if(item.path=="gdzc"){
|
||||
} else if (item.path == "gdzc") {
|
||||
item.icon = "fixedassets.png";
|
||||
item.childItems = [
|
||||
{
|
||||
item.childItems = [{
|
||||
name: "验收记录"
|
||||
},
|
||||
{
|
||||
|
@ -443,31 +438,25 @@
|
|||
"/pages/workSpace/new_apply/fixed_assets_management/baofeishenqing",
|
||||
"/pages/workSpace/new_apply/fixed_assets_management/weixiushenqing"
|
||||
];
|
||||
}
|
||||
else if(item.path=="jiesuanguanli"){
|
||||
} else if (item.path == "jiesuanguanli") {
|
||||
item.icon = "jiesuan.png";
|
||||
}
|
||||
else if(item.path=="xinziguanli"){
|
||||
} else if (item.path == "xinziguanli") {
|
||||
item.icon = "xinzi.png";
|
||||
}
|
||||
else if(item.path=="yewufeiyong"){
|
||||
} else if (item.path == "yewufeiyong") {
|
||||
item.icon = "yewu.png";
|
||||
}
|
||||
else if(item.path=="hetongxinxi_shoukuan"){
|
||||
} else if (item.path == "hetongxinxi_shoukuan") {
|
||||
item.icon = "hetong.png";
|
||||
|
||||
}
|
||||
else if(item.path=="yzgl"){
|
||||
} else if (item.path == "yzgl") {
|
||||
item.icon = "yinzhang.png";
|
||||
item.childItems = [
|
||||
{
|
||||
item.childItems = [{
|
||||
name: "刻章申请表"
|
||||
},
|
||||
{
|
||||
name: "重要文件/印鉴借用"
|
||||
},
|
||||
{
|
||||
name:'销毁印鉴申请表'
|
||||
name: '销毁印鉴申请表'
|
||||
},
|
||||
{
|
||||
name: "印章申请表"
|
||||
|
@ -479,12 +468,10 @@
|
|||
"/pages/workSpace/new_apply/yinzhang__management/xiaohuiyinjian",
|
||||
"/pages/workSpace/new_apply/yinzhang__management/yinzhangshenqingbiao"
|
||||
];
|
||||
}
|
||||
else if(item.path=="zdwj"){
|
||||
} else if (item.path == "zdwj") {
|
||||
item.name = "制度文件";
|
||||
item.icon = "zhidu.png";
|
||||
item.childItems = [
|
||||
{
|
||||
item.childItems = [{
|
||||
name: "红头文件审批"
|
||||
},
|
||||
{
|
||||
|
@ -495,15 +482,11 @@
|
|||
"/pages/workSpace/new_apply/zhiduwenjian_management/hongtouwenjian",
|
||||
"/pages/workSpace/new_apply/zhiduwenjian_management/hongtouwenjian_cw"
|
||||
];
|
||||
}
|
||||
|
||||
else if(item.path=="issue_report"){
|
||||
} else if (item.path == "issue_report") {
|
||||
item.icon = "fafang.png"
|
||||
}
|
||||
else if(item.path=="special_matter"){
|
||||
} else if (item.path == "special_matter") {
|
||||
item.icon = "specialmatter.png"
|
||||
}
|
||||
else if(item.path=="index"){
|
||||
} else if (item.path == "index") {
|
||||
item.name = "通知公告";
|
||||
item.icon = "tongzhigonggao.png"
|
||||
}
|
||||
|
@ -520,7 +503,8 @@
|
|||
const routeObj = routeArray.find(item => {
|
||||
return item.pcRoute == val.menuID;
|
||||
})
|
||||
const params = `?pkId=${val.pkId}&itemId=${val.itemId}&execId=${val.execId}&eventStatus=${val.eventStatus}&detail=${true}`;
|
||||
const params =
|
||||
`?pkId=${val.pkId}&itemId=${val.itemId}&execId=${val.execId}&eventStatus=${val.eventStatus}&detail=${true}`;
|
||||
uni.navigateTo({
|
||||
url: routeObj.appAdd + params,
|
||||
|
||||
|
@ -595,9 +579,18 @@
|
|||
|
||||
|
||||
|
||||
goIntoMoreApply() {
|
||||
goIntoMoreApply(index) {
|
||||
if (index === 'operation')
|
||||
uni.navigateTo({
|
||||
url: '/pages/profile/my_apply/my_apply'
|
||||
url: '/pages/workSpace/list/opreation'
|
||||
})
|
||||
else if (index === 'rpj')
|
||||
uni.navigateTo({
|
||||
url: '/pages/workSpace/list/rpj'
|
||||
})
|
||||
else if (index === 'visit')
|
||||
uni.navigateTo({
|
||||
url: '/pages/workSpace/list/visit'
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -644,8 +637,8 @@
|
|||
height: auto;
|
||||
background-color: #FFFFFF;
|
||||
border-radius: 10rpx;
|
||||
margin-top:190rpx;
|
||||
margin-left:50%;
|
||||
margin-top: 190rpx;
|
||||
margin-left: 50%;
|
||||
transform: translateX(-50%);
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
|
|
|
@ -12,7 +12,7 @@ try{
|
|||
}
|
||||
|
||||
// 需要永久存储,且下次APP启动需要取出的,在state中的变量名
|
||||
let saveStateKeys = ['vuex_user', 'vuex_token'];
|
||||
let saveStateKeys = ['vuex_user', 'vuex_token', 'vuex_appid'];
|
||||
|
||||
// 保存变量到本地存储中
|
||||
const saveLifeData = function(key, value){
|
||||
|
@ -33,8 +33,9 @@ const store = new Vuex.Store({
|
|||
// 加上vuex_前缀,是防止变量名冲突,也让人一目了然
|
||||
vuex_user: lifeData.vuex_user ? lifeData.vuex_user : {},
|
||||
vuex_token: lifeData.vuex_token ? lifeData.vuex_token : '',
|
||||
vuex_refresh: lifeData.vuex_refresh ? lifeData.vuex_refresh : '',
|
||||
vuex_host: 'http://1.203.161.103:2800',
|
||||
vuex_appid: 'wxf7d6140f507466be',
|
||||
vuex_login: 'http://qyjy.ctc-zc.com/h5/',
|
||||
vuex_host: 'http://127.0.0.1:8000',
|
||||
//vuex_api: 'http://47.95.0.242:9101/api',
|
||||
vuex_api: 'http://1.203.161.103:2800/api',
|
||||
// vuex_apifile: 'http://127.0.0.1:8000/api/file/',
|
||||
|
|
Loading…
Reference in New Issue