This commit is contained in:
shijing 2022-07-28 17:03:46 +08:00
commit 0a645b2f3a
19 changed files with 2004 additions and 316 deletions

12
.idea/ehs_mp2.iml Normal file
View File

@ -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>

4
.idea/encodings.xml Normal file
View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" addBOMForNewFiles="with NO BOM" />
</project>

6
.idea/misc.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
</project>

8
.idea/modules.xml Normal file
View File

@ -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>

6
.idea/vcs.xml Normal file
View File

@ -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>

228
.idea/workspace.xml Normal file
View File

@ -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
View File

@ -2,7 +2,7 @@
export default { export default {
// globalDatauView // globalDatauView
globalData: { globalData: {
username: '白居易' appid: 'wxf7d6140f507466be'
}, },
onLaunch() { onLaunch() {
// 1.1.0http/common/http.interceptor.js // 1.1.0http/common/http.interceptor.js
@ -15,7 +15,8 @@
*/ */
//var that=this //var that=this
// //
/* uni.showLoading({ // #ifdef MP-WEIXIN
uni.showLoading({
title: '微信自动登录中...', title: '微信自动登录中...',
mask: true mask: true
}) })
@ -54,17 +55,7 @@
}) })
} }
}); });
*/ // #endif
let accessToken = this.$store.state.vuex_token;
if(accessToken){
uni.reLaunch({
url:'/pages/home/home_'
})
}else{
uni.reLaunch({
url:'/pages/login/login_'
})
}
}, },
} }
</script> </script>

View File

@ -35,14 +35,6 @@ const install = (Vue, vm) => {
let getOpreation = (id)=>vm.$u.get(`/opm/operation/${id}/`);//rpj查询 let getOpreation = (id)=>vm.$u.get(`/opm/operation/${id}/`);//rpj查询
let getOpl = (id)=>vm.$u.get(`/opm/opl/${id}/`);//opl作业许可证查询 let getOpl = (id)=>vm.$u.get(`/opm/opl/${id}/`);//opl作业许可证查询
vm.$u.api = {getUserInfo, vm.$u.api = {getUserInfo,
getCode, getCode,
codeLogin, codeLogin,

View File

@ -18,9 +18,17 @@
} }
}, },
{ {
"path": "pages/login/login", "path" : "pages/login/login",
"style" :
{
"navigationBarTitleText": "验证码登录",
"enablePullDownRefresh": false
}
},
{
"path": "pages/login/login_password",
"style": { "style": {
"navigationBarTitleText": "验证码登录", "navigationBarTitleText": "码登录",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
@ -80,7 +88,7 @@
{ {
"path": "pages/workSpace/newWork/work", "path": "pages/workSpace/newWork/work",
"style": { "style": {
"navigationBarTitleText": "作业管理", "navigationBarTitleText": "新建作业",
"navigationStyle": "custom", "navigationStyle": "custom",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
@ -88,13 +96,37 @@
{ {
"path": "pages/workSpace/newWork/relevant", "path": "pages/workSpace/newWork/relevant",
"style": { "style": {
"navigationBarTitleText": "入厂项目", "navigationBarTitleText": "新建入厂项目",
"navigationStyle": "custom", "navigationStyle": "custom",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
{ {
"path": "pages/workSpace/newWork/visit", "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": { "style": {
"navigationBarTitleText": "来访项目", "navigationBarTitleText": "来访项目",
"navigationStyle": "custom", "navigationStyle": "custom",

View File

@ -48,7 +48,9 @@
export default { export default {
data() { data() {
return { return {
wxcode: null,
imageURL: '/static/banner3.jpg', 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: { loginForm: {
phone: "", phone: "",
code: "" code: ""
@ -88,7 +90,19 @@
}, },
onReady() { onReady() {
this.$refs.uForm.setRules(this.rules); this.$refs.uForm.setRules(this.rules);
// #ifdef MP-WEIXIN
uni.hideHomeButton() uni.hideHomeButton()
// #endif
},
onLoad() {
// #ifdef H5
this.wxcode = this.getUrlCode('code')
//
if(this.wxcode) {
this.wxcodeLogin()
}
// #endif
}, },
computed: { computed: {
inputStyle() { inputStyle() {
@ -113,8 +127,16 @@
uni.showLoading({}) uni.showLoading({})
this.$u.api.codeLogin(this.loginForm).then(res => { this.$u.api.codeLogin(this.loginForm).then(res => {
this.$u.vuex('vuex_token', res.access) this.$u.vuex('vuex_token', res.access)
// #ifdef MP-WEIXIN
let data = {openid: uni.getStorageSync('wxmp_openid')} let data = {openid: uni.getStorageSync('wxmp_openid')}
this.$u.api.bindmp(data).then(res=>{}) 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.api.getUserInfo().then(res => {
this.$u.vuex('vuex_user', res) this.$u.vuex('vuex_user', res)
// //
@ -154,7 +176,43 @@
this.$u.toast('倒计时结束后再发送'); 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() { mpLogin() {
// #ifdef H5
this.getWxCode()
// #endif
// #ifdef MP-WEIXIN
uni.showLoading({ uni.showLoading({
title: '微信登录中...', title: '微信登录中...',
mask: true mask: true
@ -181,6 +239,7 @@
// '?token=' + this.vuex_token) // '?token=' + this.vuex_token)
}) })
}).catch(e => { }).catch(e => {
uni.setStorageSync('wxmp_openid', e.data.wxmp_openid)
uni.hideLoading() uni.hideLoading()
uni.showToast({ uni.showToast({
title: "暂未绑定微信!", title: "暂未绑定微信!",
@ -189,7 +248,33 @@
}) })
} }
}); });
} // #endif
},
// code
// urlcodecodecode
getWxCode () {
// const isWechat = () => {
// return String(navigator.userAgent.toLowerCase().match(/MicroMessenger/i)) === "micromessenger";
// }
// if(isWechat()) {
// codecodecodecodeopenId
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_uriurlcodeencodeURIComponent
// 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> </script>

View File

@ -5,19 +5,20 @@
</view> </view>
<view class="handle-area"> <view class="handle-area">
<view class="handle-type"> <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>
<view class="login-area"> <view class="login-area" v-if="isPassword">
<form style="display: block;" @submit="formSubmit"> <form style="display: block;" @submit="formSubmit">
<view class="login-item"> <view class="login-item">
<image class="login-icon" src="../../static/login/avatar.png" mode=""></image> <image class="login-icon" src="../../static/login/avatar.png" mode=""></image>
<input placeholder-style="color: #2c6fd9;" style="color: #2c6fd9;" class="my-phone" type="text" <input placeholder-style="color: #2c6fd9;" style="color: #2c6fd9;" class="loginItemInput"
name="username" placeholder="请输入您的账号" /> type="text" name="username" placeholder="请输入您的账号" />
</view> </view>
<view class="login-item"> <view class="login-item">
<image class="login-icon" src="../../static/login/password.png" mode=""></image> <image class="login-icon" src="../../static/login/password.png" mode=""></image>
<input placeholder-style="color: #2c6fd9;" style="color: #2c6fd9;" class="my-psd" type="text" <input placeholder-style="color: #2c6fd9;" style="color: #2c6fd9;" class="loginItemInput"
name="password" password placeholder="请输入您的密码" /> type="text" name="password" password placeholder="请输入您的密码" />
</view> </view>
<view class="privacy"> <view class="privacy">
<view class="privacyIn"> <view class="privacyIn">
@ -35,13 +36,42 @@
</view> </view>
</form> </form>
</view> </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="Wxtitle">
<view class="WxtitleIn"> <view class="WxtitleIn">
第三方登录 第三方登录
</view> </view>
</view> </view>
<view class="wx" @click="loginFn"> <view class="wx" @click="mpLogin">
<image src="/static/login/weixin.png" mode=""></image> <image src="/static/login/weixin.png" mode=""></image>
</view> </view>
</view> </view>
@ -57,12 +87,15 @@
export default { export default {
data() { data() {
return { return {
wxcode: null,
agreement: false, agreement: false,
checkedShow: false, checkedShow: true,
key: "", key: "",
img: "", img: "",
username: '', username: '',
password: '', password: '',
phoneNumber: '',
message: '',
code: "", code: "",
isShow: true, isShow: true,
myTopBgSrc: require("../../static/login/my-bg.jpg"), myTopBgSrc: require("../../static/login/my-bg.jpg"),
@ -70,6 +103,11 @@
userContent: '', userContent: '',
privacyContent: '', privacyContent: '',
wxShow: false, 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() { 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
// urlcodecodecode
getWxCode() {
// codecodecodecodeopenId
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_uriurlcodeencodeURIComponent
// code
// http://127.0.0.1/pages/views/profile/login/login?code=001BWV4J1lRzz00H4J1J1vRE4J1BWV4q&state=1
} else {
this.wxcode = code
this.wxcodeLogin()
}
// }
},
updateCidFn(username) { updateCidFn(username) {
var data = { var data = {
userCid: uni.getStorageSync('setcid'), userCid: uni.getStorageSync('setcid'),
@ -186,33 +284,69 @@
}; };
return true; return true;
}, },
changeLogType(index) {
if (index === 'password') {
this.isPassword = true;
this.isMessage = false;
} else {
this.isPassword = false;
this.isMessage = true;
}
},
formSubmit(e) { formSubmit(e) {
var that = this; var that = this;
const obj = e.target.value; const obj = e.target.value;
if (!that.checkedParams(obj)) return; if (!that.checkedParams(obj)) return;
debugger; debugger;
console.log(obj) 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_token', res.access)
that.$u.vuex('vuex_refresh', res.refresh) that.$u.vuex('vuex_refresh', res.refresh)
// let data = {openid: uni.getStorageSync('wxmp_openid')} // let data = {openid: uni.getStorageSync('wxmp_openid')}
// that.$u.api.bindmp(data).then(res=>{}) // 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) that.$u.vuex('vuex_user', res)
// //
}) })
uni.reLaunch({ uni.reLaunch({
url:'/pages/home/home_' url: '/pages/home/home_'
}) })
} }).catch(e => {
).catch(e=>{
console.log(e) console.log(e)
uni.showToast({ uni.showToast({
title:'账户密码错误', title: '账户密码错误',
icon:'none' 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> </script>
@ -322,8 +456,12 @@
padding: 62rpx; padding: 62rpx;
} }
.typeText {
margin-right: 20rpx;
}
.active { .active {
font-size: 38rpx; font-size: 34rpx;
line-height: 72rpx; line-height: 72rpx;
color: #2c6fd9; color: #2c6fd9;
font-weight: bold; font-weight: bold;
@ -333,7 +471,7 @@
.active::after { .active::after {
display: block; display: block;
content: ""; content: "";
width: 42rpx; width: 100%;
height: 6rpx; height: 6rpx;
background-color: #2c6fd9; background-color: #2c6fd9;
border-radius: 3rpx; border-radius: 3rpx;
@ -355,6 +493,10 @@
margin-bottom: 56rpx; margin-bottom: 56rpx;
} }
.loginItemInput {
border-radius: 0 88rpx 88rpx 0;
}
.code-img-item { .code-img-item {
padding-left: 72rpx; padding-left: 72rpx;
} }
@ -389,6 +531,20 @@
background-color: #EEEEEE; 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, .login-btn,
.register-btn { .register-btn {
width: 635rpx; width: 635rpx;

View File

@ -60,7 +60,9 @@ export default {
}, },
onReady() { onReady() {
this.$refs.uForm.setRules(this.rules); this.$refs.uForm.setRules(this.rules);
// #ifdef MP-WEIXIN
uni.hideHomeButton() uni.hideHomeButton()
// #endif
}, },
computed: { computed: {
inputStyle() { inputStyle() {
@ -79,10 +81,19 @@ export default {
this.$u.api.login(this.loginForm).then( this.$u.api.login(this.loginForm).then(
res=>{ res=>{
this.$u.vuex('vuex_token', res.access) this.$u.vuex('vuex_token', res.access)
// #ifdef MP-WEIXIN
let data = {openid: uni.getStorageSync('wxmp_openid')} let data = {openid: uni.getStorageSync('wxmp_openid')}
this.$u.api.bindmp(data).then(res=>{}) 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.api.getUserInfo().then(res=>{
this.$u.vuex('vuex_user', res) this.$u.vuex('vuex_user', res)
// //
}) })
uni.reLaunch({ uni.reLaunch({

View File

@ -13,12 +13,16 @@
</view> </view>
<!-- #endif --> <!-- #endif -->
<!-- #ifndef MP-WEIXIN --> <!-- #ifndef MP-WEIXIN -->
<u-avatar :src="vuex_user.avatar" size="140"></u-avatar> <u-avatar :src="vuex_user.avatar" size="124"></u-avatar>
<!-- #endif --> <!-- #endif -->
</view> </view>
<view> <view>
<view style="font-weight: bold;" class="user-name">{{vuex_user.name}}</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> </view>
<button type="default" class="modify-info" @click="goInto('myData')">完善资料</button> <button type="default" class="modify-info" @click="goInto('myData')">完善资料</button>
</view> </view>
@ -28,6 +32,7 @@
<image class="left-icon" src="../../static/my/wodeshenqing.png" mode=""></image> <image class="left-icon" src="../../static/my/wodeshenqing.png" mode=""></image>
<text class="title-text">我的申请</text> <text class="title-text">我的申请</text>
<uni-icons size="13" color="#b9b9b9" class="right-icon" type="right"></uni-icons> <uni-icons size="13" color="#b9b9b9" class="right-icon" type="right"></uni-icons>
</view> </view>
<view class="enter-item" @click="goInto('daiban')"> <view class="enter-item" @click="goInto('daiban')">
<image class="left-icon" src="../../static/my/wodeshenpi.png" mode=""></image> <image class="left-icon" src="../../static/my/wodeshenpi.png" mode=""></image>
@ -43,6 +48,7 @@
</view> </view>
<view class="sign-out"> <view class="sign-out">
<button type="default" @click="signoutFn" class="sign-out-btn">退出</button> <button type="default" @click="signoutFn" class="sign-out-btn">退出</button>
</view> </view>
</view> </view>
</template> </template>

View File

@ -1,101 +1,451 @@
<template> <template>
<view> <view class="profile">
<view class="u-flex user-box u-p-l-30 u-p-r-20 u-p-b-30"> <view class="nav-bar" style="position: relative;">
<view class="u-m-r-10"> <image style="position: absolute;left: 0;top: 0;display: block;width: 100%;height: 100%;z-index: 1;"
<!-- #ifdef MP-WEIXIN --> :src="myTopBgSrc" mode=""></image>
<view class="avatarImg">
<open-data type="userAvatarUrl" default-avatar="/static/other/timg.jpg"></open-data>
</view>
<!-- #endif -->
<!-- #ifndef MP-WEIXIN -->
<u-avatar :src="vuex_user.avatar" size="140"></u-avatar>
<!-- #endif -->
</view>
<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'"/>
</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>
</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>
</view> </view>
</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>
</view>
<!-- #endif -->
<!-- #ifndef MP-WEIXIN -->
<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-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="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> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
pic:'https://uviewui.com/common/logo.png', username: '用户名',
show:true 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: { methods: {
Logout(){ /* 查询年假剩余天数 */
this.$u.api.unbindmp().then(res=>{ _getSystemHomePageTabChart() {
this.$u.vuex('vuex_token', '') systemHomePageTabChart().then((res) => {
uni.redirectTo({ if (res.statusCode === 200) {
url: '/pages/login/login' 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'
})
})
}, },
bindMP(){ getLeaveTimePaidLeaveFn() {
let data = {openid: uni.getStorageSync('wxmp_openid')} getLeaveTimePaidLeave().then(res => {
this.$u.api.bindmp(data).then(res=>{}) if (res.statusCode === 200) {
// uni.login({ this.getLeaveTimePaidLeaveCon = res.data.data.b_leave_days;
// provider: 'weixin', } else {
// success: (loginRes)=>{ uni.showToast({
// this.$u.api.bindmp({code:loginRes.code}).then(res=>{ title: '获取用户累计请假天数失败',
// this.$u.toast(''); icon: 'none'
// this.$u.vuex('vuex_user.wxmp_openid', res.data.wxmp_openid) })
// uni.reLaunch({ }
// url:'/pages/my/my' }).catch(err => {
// }) uni.showToast({
// }).catch(e=>{}) 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'
})
})
})
},
signoutFn() {
var that = this;
this.$u.api.loginOut().then(()=>{
that.$u.vuex('vuex_token', null);
uni.reLaunch({
url:'/pages/login/login_'
})
})
} }
} }
} }
</script> </script>
<style>
<style lang="scss"> page {
page{ background-color: #f3fbff;
background-color: #ededed; }
} </style>
<style scoped>
.camera{ .profile {
width: 54px; position: relative;
height: 44px; background-color: #f3fbff;
padding-bottom: 70rpx;
&:active{ }
background-color: #ededed;
} .nav-bar {
} height: 210rpx;
.user-box{ background-color: #2cade8;
background-color: #fff; color: #FFFFFF;
padding-top:24rpx; display: flex;
} align-items: center;
.avatarImg { }
width: 148rpx;
height: 148rpx; .user-info {
border-radius: 20rpx; width: 680rpx;
overflow: hidden; 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> </style>
c

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -1,10 +1,11 @@
<template> <template>
<view class="workbench"> <view class="workbench">
<view style="position: relative;overflow: hidden;"> <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
</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;"> <view class="top-title" style="display: flex;">
<block v-for="(item,index) in routerList" :key="item.index"> <block v-for="(item,index) in routerList" :key="item.index">
<!-- <view class="title-item" v-if="item.children"> <!-- <view class="title-item" v-if="item.children">
<view class="title-icon" > <view class="title-icon" >
<image :src="require('@/static/worSpace/'+item.icon+'')" mode="widthFix"></image> <image :src="require('@/static/worSpace/'+item.icon+'')" mode="widthFix"></image>
@ -16,21 +17,21 @@
</view> </view>
</picker> </picker>
</view> --> </view> -->
<view class="title-item" @click="goInto(index)"> <view class="title-item" @click="goInto(index)">
<view class="title-icon"> <view class="title-icon">
<image :src="require('@/static/workSpace/'+item.icon+'')" mode="widthFix"></image> <image :src="require('@/static/workSpace/'+item.icon+'')" mode="widthFix"></image>
</view> </view>
<text class="title-text">{{item.name}}</text> <text class="title-text">{{item.name}}</text>
</view> </view>
</block> </block>
</view> </view>
</view> </view>
<view style="height: 22rpx;"> <view style="height: 22rpx;">
</view> </view>
<view class="my-apply"> <view class="my-apply">
<view class="title"> <view class="title">
@ -38,7 +39,7 @@
<image src="../../static/home/daiban.png" mode="widthFix" class="img"></image> <image src="../../static/home/daiban.png" mode="widthFix" class="img"></image>
<text class="title-text-left">作业管理</text> <text class="title-text-left">作业管理</text>
</view> </view>
<view class="" @click="goIntoMoreApply()"> <view class="" @click="goIntoMoreApply('operation')">
<text class="title-text-right">查看更多</text> <text class="title-text-right">查看更多</text>
<uni-icons type="right" :size="15" color="#ababab"></uni-icons> <uni-icons type="right" :size="15" color="#ababab"></uni-icons>
</view> </view>
@ -61,23 +62,23 @@
<view class="apply-content"> <view class="apply-content">
申请人{{val.applicantName}} 申请人{{val.applicantName}}
</view> </view>
<view class="apply-time"> <view class="apply-time">
{{val.submissionTime}} {{val.submissionTime}}
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class="my-apply"> <view class="my-apply">
<view class="title"> <view class="title">
<view class=""> <view class="">
<image src="../../static/home/daiban.png" mode="widthFix" class="img"></image> <image src="../../static/home/daiban.png" mode="widthFix" class="img"></image>
<text class="title-text-left">入场项目</text> <text class="title-text-left">入场项目</text>
</view> </view>
<view class="" @click="goIntoMoreApply()"> <view class="" @click="goIntoMoreApply('rpj')">
<text class="title-text-right">查看更多</text> <text class="title-text-right">查看更多</text>
<uni-icons type="right" :size="15" color="#ababab"></uni-icons> <uni-icons type="right" :size="15" color="#ababab"></uni-icons>
</view> </view>
@ -100,13 +101,13 @@
<view class="apply-content"> <view class="apply-content">
申请人{{val.applicantName}} 申请人{{val.applicantName}}
</view> </view>
<view class="apply-time"> <view class="apply-time">
{{val.submissionTime}} {{val.submissionTime}}
</view> </view>
</view> </view>
</view> </view>
</view> </view>
@ -116,7 +117,7 @@
<image src="../../static/home/daiban.png" mode="widthFix" class="img"></image> <image src="../../static/home/daiban.png" mode="widthFix" class="img"></image>
<text class="title-text-left">来访项目</text> <text class="title-text-left">来访项目</text>
</view> </view>
<view class="" @click="goIntoMoreApply()"> <view class="" @click="goIntoMoreApply('visit')">
<text class="title-text-right">查看更多</text> <text class="title-text-right">查看更多</text>
<uni-icons type="right" :size="15" color="#ababab"></uni-icons> <uni-icons type="right" :size="15" color="#ababab"></uni-icons>
</view> </view>
@ -139,13 +140,13 @@
<view class="apply-content"> <view class="apply-content">
申请人{{val.applicantName}} 申请人{{val.applicantName}}
</view> </view>
<view class="apply-time"> <view class="apply-time">
{{val.submissionTime}} {{val.submissionTime}}
</view> </view>
</view> </view>
</view> </view>
</view> </view>
@ -153,46 +154,52 @@
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
name: "", name: "",
username:"", username: "",
routerList:[ routerList: [{
{name:'作业管理', name: '作业管理',
icon:'specialmatter.png', icon: 'specialmatter.png',
path:'index', path: 'index',
childItems : [ childItems: [{
{ name: "请假申请"
name: "请假申请" },
}, {
{ name: "公出申请"
name: "公出申请" },
}, {
{ name: "出差申请"
name: "出差申请" },
}, {
{ name: "值班申请"
name: "值班申请" },
}, {
{ name: "未打卡说明"
name: "未打卡说明" }
}
],
], 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",
"/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: [], myApplyArray: [],
mytopimg: require("@/static/workSpace/bgimg-top.jpg"), mytopimg: require("@/static/workSpace/bgimg-top.jpg"),
} }
@ -202,21 +209,21 @@
// this.getUserInfo(); // this.getUserInfo();
}, },
methods: { methods: {
goInto(index){ goInto(index) {
if (index == 0) { if (index == 0) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/workSpace/newWork/work' url: '/pages/workSpace/newWork/work'
}) })
}else if (index == 1) { } else if (index == 1) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/workSpace/newWork/relevant' url: '/pages/workSpace/newWork/relevant'
}) })
}else if (index == 2) { } else if (index == 2) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/workSpace/newWork/visit' url: '/pages/workSpace/newWork/visit'
}) })
} }
}, },
getUserInfo() { getUserInfo() {
var promise; var promise;
@ -240,8 +247,8 @@
}) })
}) })
}) })
promise.then(function(){ promise.then(function() {
// //
getCurrentUserRoute(that.username).then(res => { getCurrentUserRoute(that.username).then(res => {
if (res.statusCode === 200) { if (res.statusCode === 200) {
@ -260,100 +267,94 @@
}) })
}) })
}) })
}, },
initList(routes){ initList(routes) {
const obj =routes.find(item=>{ const obj = routes.find(item => {
return item.path === '/apply' return item.path === '/apply'
}) })
// //
const project =routes.find(item=>{ const project = routes.find(item => {
return item.path === '/project_management' return item.path === '/project_management'
}) })
// //
const inform =routes.find(item=>{ const inform = routes.find(item => {
return item.path === '/press' return item.path === '/press'
}) })
let projectObj; let projectObj;
let informObj; let informObj;
if(project){ // if (project) { //
projectObj = project.children.find(item=>{ projectObj = project.children.find(item => {
return item.path == "hetongxinxi_shoukuan"; return item.path == "hetongxinxi_shoukuan";
}) })
} }
if(inform){ // if (inform) { //
informObj = inform.children.find(item=>{ informObj = inform.children.find(item => {
return item.path == "index"; return item.path == "index";
}) })
} }
if(obj){ if (obj) {
const newObj = JSON.parse(JSON.stringify(obj)); const newObj = JSON.parse(JSON.stringify(obj));
let arr = newObj.children; let arr = newObj.children;
const index = arr.findIndex(item=>{ const index = arr.findIndex(item => {
return item.path == "index"; return item.path == "index";
}); });
if(index!==-1){ if (index !== -1) {
arr.splice(index,1); // index arr.splice(index, 1); // index
} }
if(informObj){ if (informObj) {
const newInformObj = JSON.parse(JSON.stringify(informObj)); const newInformObj = JSON.parse(JSON.stringify(informObj));
arr.splice(arr.length,0,newInformObj); // arr.splice(arr.length, 0, newInformObj); //
} }
let htBackItem; let htBackItem;
for(let val of arr){ for (let val of arr) {
if(val.path=="yewufeiyong"){ if (val.path == "yewufeiyong") {
htBackItem = val; htBackItem = val;
break; break;
} } else if (val.path == "jiesuanguanli") {
else if(val.path=="jiesuanguanli"){ htBackItem = val;
htBackItem = val; break;
break; } else if (val.path == "index_detail_xinwen") {
} htBackItem = val;
else if(val.path=="index_detail_xinwen"){ break;
htBackItem = val; } else if (val.path == "special_matter") {
break; htBackItem = val;
} break;
else if(val.path=="special_matter"){ } else if (val.path == "issue_report") {
htBackItem = val; htBackItem = val;
break; break;
} } else if (val.path == "index") {
else if(val.path=="issue_report"){ htBackItem = val;
htBackItem = val; break;
break;
}
else if(val.path=="index"){
htBackItem = val;
break;
} }
} }
if(projectObj){ if (projectObj) {
const newProjectObj = JSON.parse(JSON.stringify(projectObj)); const newProjectObj = JSON.parse(JSON.stringify(projectObj));
newProjectObj.name = "创建合同"; newProjectObj.name = "创建合同";
if(htBackItem){ if (htBackItem) {
const backIndex = arr.findIndex(item=>{ const backIndex = arr.findIndex(item => {
return item==htBackItem; return item == htBackItem;
}) })
if(backIndex!==-1){ if (backIndex !== -1) {
arr.splice(backIndex,0,newProjectObj); // arr.splice(backIndex, 0, newProjectObj); //
}else{ } else {
arr.push(newProjectObj) // arr.push(newProjectObj) //
} }
} else{ } else {
arr.push(newProjectObj) arr.push(newProjectObj)
} }
} }
this.routerList = arr.map(item=>{ this.routerList = arr.map(item => {
item.childItems =[]; item.childItems = [];
item.childUrls =[]; item.childUrls = [];
item.icon = "kaoqin.png"; item.icon = "kaoqin.png";
if(item.path=="kqgl"){ if (item.path == "kqgl") {
item.icon = "kaoqin.png"; item.icon = "kaoqin.png";
item.childItems = [ item.childItems = [{
{
name: "请假申请" name: "请假申请"
}, },
{ {
@ -368,7 +369,7 @@
{ {
name: "未打卡说明" name: "未打卡说明"
} }
]; ];
item.childUrls = [ item.childUrls = [
"/pages/workSpace/new_apply/kaoqin_management/qingjia_apply", "/pages/workSpace/new_apply/kaoqin_management/qingjia_apply",
@ -376,15 +377,13 @@
"/pages/workSpace/new_apply/kaoqin_management/chuchai_apply", "/pages/workSpace/new_apply/kaoqin_management/chuchai_apply",
"/pages/workSpace/new_apply/kaoqin_management/zhiban_apply", "/pages/workSpace/new_apply/kaoqin_management/zhiban_apply",
"/pages/workSpace/new_apply/kaoqin_management/weidaka_apply", "/pages/workSpace/new_apply/kaoqin_management/weidaka_apply",
] ]
} } else if (item.path == "cl") {
else if(item.path=="cl"){
item.icon = "cheliang.png"; item.icon = "cheliang.png";
item.childItems = [ item.childItems = [{
{
name: "车辆维修、保养" name: "车辆维修、保养"
}, },
{ {
name: "私车公用申请" name: "私车公用申请"
}, },
@ -397,11 +396,9 @@
"/pages/workSpace/new_apply/car_management/private_car_public", "/pages/workSpace/new_apply/car_management/private_car_public",
"/pages/workSpace/new_apply/car_management/paicheshenqing", "/pages/workSpace/new_apply/car_management/paicheshenqing",
] ]
} } else if (item.path == "cg") {
else if(item.path=="cg"){
item.icon = "caigou.png"; item.icon = "caigou.png";
item.childItems = [ item.childItems = [{
{
name: "印刷品清单" name: "印刷品清单"
}, },
{ {
@ -417,16 +414,14 @@
item.childUrls = [ item.childUrls = [
"/pages/workSpace/new_apply/caigou_management/print_list_apply", "/pages/workSpace/new_apply/caigou_management/print_list_apply",
"/pages/workSpace/new_apply/caigou_management/office_supplies_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/fixed_assets_apply",
"/pages/workSpace/new_apply/caigou_management/low_value_products_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.icon = "fixedassets.png";
item.childItems = [ item.childItems = [{
{
name: "验收记录" name: "验收记录"
}, },
{ {
name: "内部调拨记录表" name: "内部调拨记录表"
}, },
@ -443,31 +438,25 @@
"/pages/workSpace/new_apply/fixed_assets_management/baofeishenqing", "/pages/workSpace/new_apply/fixed_assets_management/baofeishenqing",
"/pages/workSpace/new_apply/fixed_assets_management/weixiushenqing" "/pages/workSpace/new_apply/fixed_assets_management/weixiushenqing"
]; ];
} } else if (item.path == "jiesuanguanli") {
else if(item.path=="jiesuanguanli"){
item.icon = "jiesuan.png"; item.icon = "jiesuan.png";
} } else if (item.path == "xinziguanli") {
else if(item.path=="xinziguanli"){
item.icon = "xinzi.png"; item.icon = "xinzi.png";
} } else if (item.path == "yewufeiyong") {
else if(item.path=="yewufeiyong"){
item.icon = "yewu.png"; item.icon = "yewu.png";
} } else if (item.path == "hetongxinxi_shoukuan") {
else if(item.path=="hetongxinxi_shoukuan"){
item.icon = "hetong.png"; item.icon = "hetong.png";
} } else if (item.path == "yzgl") {
else if(item.path=="yzgl"){
item.icon = "yinzhang.png"; item.icon = "yinzhang.png";
item.childItems = [ item.childItems = [{
{
name: "刻章申请表" name: "刻章申请表"
}, },
{ {
name: "重要文件/印鉴借用" name: "重要文件/印鉴借用"
}, },
{ {
name:'销毁印鉴申请表' name: '销毁印鉴申请表'
}, },
{ {
name: "印章申请表" name: "印章申请表"
@ -479,12 +468,10 @@
"/pages/workSpace/new_apply/yinzhang__management/xiaohuiyinjian", "/pages/workSpace/new_apply/yinzhang__management/xiaohuiyinjian",
"/pages/workSpace/new_apply/yinzhang__management/yinzhangshenqingbiao" "/pages/workSpace/new_apply/yinzhang__management/yinzhangshenqingbiao"
]; ];
} } else if (item.path == "zdwj") {
else if(item.path=="zdwj"){ item.name = "制度文件";
item.name = "制度文件";
item.icon = "zhidu.png"; item.icon = "zhidu.png";
item.childItems = [ item.childItems = [{
{
name: "红头文件审批" name: "红头文件审批"
}, },
{ {
@ -495,15 +482,11 @@
"/pages/workSpace/new_apply/zhiduwenjian_management/hongtouwenjian", "/pages/workSpace/new_apply/zhiduwenjian_management/hongtouwenjian",
"/pages/workSpace/new_apply/zhiduwenjian_management/hongtouwenjian_cw" "/pages/workSpace/new_apply/zhiduwenjian_management/hongtouwenjian_cw"
]; ];
} } else if (item.path == "issue_report") {
else if(item.path=="issue_report"){
item.icon = "fafang.png" item.icon = "fafang.png"
} } else if (item.path == "special_matter") {
else if(item.path=="special_matter"){
item.icon = "specialmatter.png" item.icon = "specialmatter.png"
} } else if (item.path == "index") {
else if(item.path=="index"){
item.name = "通知公告"; item.name = "通知公告";
item.icon = "tongzhigonggao.png" item.icon = "tongzhigonggao.png"
} }
@ -511,16 +494,17 @@
}) })
} }
}, },
/* 跳转详情页 */ /* 跳转详情页 */
intoUpdataPage(val) { intoUpdataPage(val) {
this.$store.commit("clearAllStoreData"); /* 清空选择人员时留存的数据 */ this.$store.commit("clearAllStoreData"); /* 清空选择人员时留存的数据 */
const routeObj = routeArray.find(item => { const routeObj = routeArray.find(item => {
return item.pcRoute == val.menuID; 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({ uni.navigateTo({
url: routeObj.appAdd + params, url: routeObj.appAdd + params,
@ -594,11 +578,20 @@
}, },
goIntoMoreApply() { goIntoMoreApply(index) {
uni.navigateTo({ if (index === 'operation')
url: '/pages/profile/my_apply/my_apply' uni.navigateTo({
}) 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; height: auto;
background-color: #FFFFFF; background-color: #FFFFFF;
border-radius: 10rpx; border-radius: 10rpx;
margin-top:190rpx; margin-top: 190rpx;
margin-left:50%; margin-left: 50%;
transform: translateX(-50%); transform: translateX(-50%);
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
@ -682,7 +675,7 @@
width: 720rpx; width: 720rpx;
margin: 0 auto; margin: 0 auto;
border-radius: 10rpx; border-radius: 10rpx;
} }
.line { .line {
@ -763,15 +756,15 @@
.apply-item .apply-time { .apply-item .apply-time {
font-family: PingFang-SC-Regular; font-family: PingFang-SC-Regular;
font-size: 24rpx; font-size: 24rpx;
letter-spacing: 0rpx; letter-spacing: 0rpx;
color: #ababab; color: #ababab;
} }
.apply-item .apply-content { .apply-item .apply-content {
flex: 1; flex: 1;
font-size: 28rpx; font-size: 28rpx;
letter-spacing: -2rpx; letter-spacing: -2rpx;
margin-left: 15rpx; margin-left: 15rpx;
color: #5b5b5b; color: #5b5b5b;

View File

@ -12,7 +12,7 @@ try{
} }
// 需要永久存储且下次APP启动需要取出的在state中的变量名 // 需要永久存储且下次APP启动需要取出的在state中的变量名
let saveStateKeys = ['vuex_user', 'vuex_token']; let saveStateKeys = ['vuex_user', 'vuex_token', 'vuex_appid'];
// 保存变量到本地存储中 // 保存变量到本地存储中
const saveLifeData = function(key, value){ const saveLifeData = function(key, value){
@ -33,8 +33,9 @@ const store = new Vuex.Store({
// 加上vuex_前缀是防止变量名冲突也让人一目了然 // 加上vuex_前缀是防止变量名冲突也让人一目了然
vuex_user: lifeData.vuex_user ? lifeData.vuex_user : {}, vuex_user: lifeData.vuex_user ? lifeData.vuex_user : {},
vuex_token: lifeData.vuex_token ? lifeData.vuex_token : '', vuex_token: lifeData.vuex_token ? lifeData.vuex_token : '',
vuex_refresh: lifeData.vuex_refresh ? lifeData.vuex_refresh : '', vuex_appid: 'wxf7d6140f507466be',
vuex_host: 'http://1.203.161.103:2800', 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://47.95.0.242:9101/api',
vuex_api: 'http://1.203.161.103:2800/api', vuex_api: 'http://1.203.161.103:2800/api',
// vuex_apifile: 'http://127.0.0.1:8000/api/file/', // vuex_apifile: 'http://127.0.0.1:8000/api/file/',