#功能开发
This commit is contained in:
parent
4d603f92ea
commit
a452c11fcc
|
@ -11,18 +11,18 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="title">成员列表</div>
|
<div class="title">成员列表</div>
|
||||||
<div class="list" >
|
<div class="list" >
|
||||||
<div style="text-align: right" v-if="jurisdiction == '0'"><el-button type="primary" round><router-link to="/member/management/add" style="text-decoration:none;color: white">添加</router-link></el-button></div>
|
<div style="text-align: right" v-if="userjurisdiction == '0'"><el-button type="primary" round><router-link to="/member/management/add" style="text-decoration:none;color: white">添加</router-link></el-button></div>
|
||||||
<div style="text-align: right" v-else></div>
|
<div style="text-align: right" v-else></div>
|
||||||
<template>
|
<template>
|
||||||
<el-table :data="user" style="width: 100%">
|
<el-table :data="user" style="width: 100%">
|
||||||
<el-table-column prop="name" label="姓名" width="180"></el-table-column>
|
<el-table-column prop="name" label="用户名" width="100"></el-table-column>
|
||||||
<el-table-column prop="jurisdiction" label="权限" width="180"></el-table-column>
|
<el-table-column prop="jurisdiction" label="权限" width="100"></el-table-column>
|
||||||
<el-table-column prop="phone" label="电话" width="180"></el-table-column>
|
<el-table-column prop="phone" label="电话" width="180"></el-table-column>
|
||||||
<el-table-column prop="email" label="邮箱"></el-table-column>
|
<el-table-column prop="email" label="邮箱" width="180"></el-table-column>
|
||||||
<el-table-column prop="organization" label="单位"></el-table-column>
|
<el-table-column prop="organization" label="单位" width="180"></el-table-column>
|
||||||
<el-table-column prop="task" label="课题组"></el-table-column>
|
<el-table-column prop="task" label="课题组"></el-table-column>
|
||||||
<el-table-column label="操作" align="center">
|
<el-table-column label="操作" align="center" width="180">
|
||||||
<template slot-scope="scope" v-if="jurisdiction == 0 || jurisdiction == 1">
|
<template slot-scope="scope" v-if="userjurisdiction == 0 || userjurisdiction == 1">
|
||||||
<el-button size="mini" @click="update(scope.row.id)">编辑</el-button>
|
<el-button size="mini" @click="update(scope.row.id)">编辑</el-button>
|
||||||
<template>
|
<template>
|
||||||
<el-popover placement="top" width="160">
|
<el-popover placement="top" width="160">
|
||||||
|
@ -67,7 +67,7 @@ export default {
|
||||||
return {
|
return {
|
||||||
user: '',
|
user: '',
|
||||||
username: '',
|
username: '',
|
||||||
jurisdiction: '',
|
userjurisdiction: '',
|
||||||
local: true
|
local: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -81,8 +81,8 @@ export default {
|
||||||
}
|
}
|
||||||
}).then(function (response) {
|
}).then(function (response) {
|
||||||
_this.user = response.data.user
|
_this.user = response.data.user
|
||||||
_this.jurisdiction = response.data.jurisdiction
|
_this.userjurisdiction = response.data.jurisdiction
|
||||||
console.log(' _this.jurisdiction:' + _this.jurisdiction)
|
console.log(' _this.jurisdiction:' + _this.user.jurisdiction)
|
||||||
}).catch(function (error) {
|
}).catch(function (error) {
|
||||||
alert(error)
|
alert(error)
|
||||||
})
|
})
|
||||||
|
|
|
@ -20,17 +20,12 @@
|
||||||
<span style="margin-left: 10px">{{ scope.row.taskname }}</span>
|
<span style="margin-left: 10px">{{ scope.row.taskname }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="负责人" width="180">
|
<el-table-column label="负责人" width="300">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span style="margin-left: 10px">{{ scope.row.principalname }}</span>
|
<span style="margin-left: 10px">{{ scope.row.principal }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="联系人" width="180">
|
<el-table-column label="依托单位" width="300">
|
||||||
<template slot-scope="scope">
|
|
||||||
<span style="margin-left: 10px">{{ scope.row.linkmanname }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="依托单位">
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span style="margin-left: 10px">{{ scope.row.organization }}</span>
|
<span style="margin-left: 10px">{{ scope.row.organization }}</span>
|
||||||
</template>
|
</template>
|
||||||
|
@ -75,7 +70,7 @@ export default {
|
||||||
var _this = this
|
var _this = this
|
||||||
axios({
|
axios({
|
||||||
method: 'post',
|
method: 'post',
|
||||||
url: 'http://210.77.68.250:8081/management/task/management/',
|
url: 'http://127.0.0.1:8000/management/task/management/',
|
||||||
data: {
|
data: {
|
||||||
username: _this.$store.state.token
|
username: _this.$store.state.token
|
||||||
}
|
}
|
||||||
|
@ -102,7 +97,7 @@ export default {
|
||||||
console.log(id)
|
console.log(id)
|
||||||
axios({
|
axios({
|
||||||
method: 'get',
|
method: 'get',
|
||||||
url: 'http://210.77.68.250:8081/management/task/management/delete/' + id
|
url: 'http://127.0.0.1:8000/management/task/management/delete/' + id
|
||||||
}).then(function (response) {
|
}).then(function (response) {
|
||||||
if (response.data.status === '1') {
|
if (response.data.status === '1') {
|
||||||
window.location.reload()
|
window.location.reload()
|
||||||
|
|
|
@ -29,6 +29,11 @@
|
||||||
<el-form-item label="备注" prop="remark">
|
<el-form-item label="备注" prop="remark">
|
||||||
<el-input v-model="ruleForm.remark"></el-input>
|
<el-input v-model="ruleForm.remark"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="负责人">
|
||||||
|
<el-select v-model="ruleForm.principal" placeholder="请选择负责人" style="width: 400px">
|
||||||
|
<el-option v-for="item in user" :key="item.id" :label="item.username" :value="item.id"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="submitForm()">创建</el-button>
|
<el-button type="primary" @click="submitForm()">创建</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -79,13 +84,26 @@ export default {
|
||||||
taskname: '',
|
taskname: '',
|
||||||
taskcode: '',
|
taskcode: '',
|
||||||
organization: '',
|
organization: '',
|
||||||
remark: ''
|
remark: '',
|
||||||
|
principal: ''
|
||||||
},
|
},
|
||||||
localshow: true,
|
localshow: true,
|
||||||
localhide: false
|
localhide: false,
|
||||||
|
user: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
|
var _this = this
|
||||||
|
axios({
|
||||||
|
method: 'get',
|
||||||
|
url: 'http://127.0.0.1:8000/management/task/management/add/'
|
||||||
|
})
|
||||||
|
.then(function (response) {
|
||||||
|
console.log(response)
|
||||||
|
_this.user = response.data.user
|
||||||
|
}).catch(function (error) {
|
||||||
|
alert(error)
|
||||||
|
})
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
},
|
},
|
||||||
|
@ -94,12 +112,13 @@ export default {
|
||||||
var _this = this
|
var _this = this
|
||||||
axios({
|
axios({
|
||||||
method: 'post',
|
method: 'post',
|
||||||
url: 'http://210.77.68.250:8081/management/task/management/add/',
|
url: 'http://127.0.0.1:8000/management/task/management/add/',
|
||||||
data: {
|
data: {
|
||||||
taskname: _this.ruleForm.taskname,
|
taskname: _this.ruleForm.taskname,
|
||||||
taskcode: _this.ruleForm.taskcode,
|
taskcode: _this.ruleForm.taskcode,
|
||||||
organization: _this.ruleForm.organization,
|
organization: _this.ruleForm.organization,
|
||||||
remark: _this.ruleForm.remark
|
remark: _this.ruleForm.remark,
|
||||||
|
principal: _this.ruleForm.principal
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.then(function (response) {
|
.then(function (response) {
|
||||||
|
|
|
@ -24,6 +24,11 @@
|
||||||
<el-form-item label="备注">
|
<el-form-item label="备注">
|
||||||
<el-input v-model="form.remark" @input="change($event)" clearable></el-input>
|
<el-input v-model="form.remark" @input="change($event)" clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="负责人">
|
||||||
|
<el-select v-model="form.principal" placeholder="请选择负责人" style="width: 400px">
|
||||||
|
<el-option v-for="item in user" :key="item.id" :label="item.username" :value="item.id"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="update()">立即修改</el-button>
|
<el-button type="primary" @click="update()">立即修改</el-button>
|
||||||
<el-button>取消</el-button>
|
<el-button>取消</el-button>
|
||||||
|
@ -48,8 +53,10 @@ export default {
|
||||||
taskname: '',
|
taskname: '',
|
||||||
taskcode: '',
|
taskcode: '',
|
||||||
organization: '',
|
organization: '',
|
||||||
remark: ''
|
remark: '',
|
||||||
}
|
principal: ''
|
||||||
|
},
|
||||||
|
user: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
|
@ -57,13 +64,15 @@ export default {
|
||||||
console.log(_this.id)
|
console.log(_this.id)
|
||||||
axios({
|
axios({
|
||||||
method: 'get',
|
method: 'get',
|
||||||
url: 'http://210.77.68.250:8081/management/task/management/update/' + _this.id
|
url: 'http://127.0.0.1:8000/management/task/management/update/' + _this.id
|
||||||
}).then(function (response) {
|
}).then(function (response) {
|
||||||
console.log('response:' + response.data)
|
console.log('response:' + response.data)
|
||||||
_this.form.taskname = response.data.taskname
|
_this.form.taskname = response.data.taskname
|
||||||
_this.form.taskcode = response.data.taskcode
|
_this.form.taskcode = response.data.taskcode
|
||||||
_this.form.organization = response.data.organization
|
_this.form.organization = response.data.organization
|
||||||
_this.form.remark = response.data.remark
|
_this.form.remark = response.data.remark
|
||||||
|
_this.form.principal = response.data.principal
|
||||||
|
_this.user = response.data.user
|
||||||
}).catch(function (error) {
|
}).catch(function (error) {
|
||||||
alert(error)
|
alert(error)
|
||||||
})
|
})
|
||||||
|
@ -74,12 +83,13 @@ export default {
|
||||||
console.log(_this.id)
|
console.log(_this.id)
|
||||||
axios({
|
axios({
|
||||||
method: 'post',
|
method: 'post',
|
||||||
url: 'http://210.77.68.250:8081/management/task/management/update/' + _this.id + '/',
|
url: 'http://127.0.0.1:8000/management/task/management/update/' + _this.id + '/',
|
||||||
data: {
|
data: {
|
||||||
taskname: _this.form.taskname,
|
taskname: _this.form.taskname,
|
||||||
taskcode: _this.form.taskcode,
|
taskcode: _this.form.taskcode,
|
||||||
organization: _this.form.organization,
|
organization: _this.form.organization,
|
||||||
remark: _this.form.remark
|
remark: _this.form.remark,
|
||||||
|
principal: _this.form.principal
|
||||||
}
|
}
|
||||||
}).then(function (response) {
|
}).then(function (response) {
|
||||||
if (response.data.status === '1') {
|
if (response.data.status === '1') {
|
||||||
|
|
Loading…
Reference in New Issue