Commit 715d27d5 by 姜鹏凯

离职继承表格选择绑定&&群裂变失败状态添加

1 parent 33c35327
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
export default { export default {
name: 'Group', name: 'Group',
data () { data() {
return { return {
query: { query: {
pageNum: 1, pageNum: 1,
...@@ -11,15 +11,15 @@ ...@@ -11,15 +11,15 @@
taskName: '', taskName: '',
startTime: '', startTime: '',
overTime: '', overTime: '',
fissionType: 2, fissionType: 2
}, },
dateRange: [], dateRange: [],
tableData: [], tableData: [],
total: 0, total: 0,
loading: false, loading: false
} }
}, },
created () { created() {
this.getList() this.getList()
this.$store.dispatch( this.$store.dispatch(
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
) )
}, },
methods: { methods: {
setChange (e) { setChange(e) {
if (e) { if (e) {
this.query.startTime = e[0] this.query.startTime = e[0]
this.query.overTime = e[1] this.query.overTime = e[1]
...@@ -39,19 +39,19 @@ ...@@ -39,19 +39,19 @@
this.query.overTime = '' this.query.overTime = ''
} }
}, },
resetFn () { resetFn() {
this.query = { this.query = {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
taskName: '', taskName: '',
startTime: '', startTime: '',
overTime: '', overTime: '',
fissionType: 2, fissionType: 2
} }
this.dateRange = [] this.dateRange = []
this.getList() this.getList()
}, },
getList (data) { getList(data) {
this.loading = true this.loading = true
let params = Object.assign({}, this.query, data) let params = Object.assign({}, this.query, data)
api.getList(params).then(({ rows, total }) => { api.getList(params).then(({ rows, total }) => {
...@@ -60,23 +60,23 @@ ...@@ -60,23 +60,23 @@
this.loading = false this.loading = false
}) })
}, },
resetForm () { }, resetForm() {},
toDetail (row) { toDetail(row) {
this.$router.push({ this.$router.push({
path: `detail?id=${row.id}`, path: `detail?id=${row.id}`
}) })
}, },
newAdd () { newAdd() {
this.$router.push({ this.$router.push({
path: 'add', path: 'add'
}) })
}, },
toEdit (row) { toEdit(row) {
this.$router.push({ this.$router.push({
path: `add?id=${row.id}`, path: `add?id=${row.id}`
}) })
}, }
}, }
} }
</script> </script>
...@@ -87,12 +87,32 @@ ...@@ -87,12 +87,32 @@
<el-input v-model="query.taskName" placeholder="请输入"></el-input> <el-input v-model="query.taskName" placeholder="请输入"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="添加日期"> <el-form-item label="添加日期">
<el-date-picker v-model="dateRange" @change="setChange" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" align="right"></el-date-picker> <el-date-picker
v-model="dateRange"
@change="setChange"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
align="right"
></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label=" "> <el-form-item label=" ">
<el-button v-hasPermi="['customerManage:customer:query']" type="primary" @click="getList({ pageNum: 1 })" :loading="loading">查询</el-button> <el-button
v-hasPermi="['customerManage:customer:query']"
type="primary"
@click="getList({ pageNum: 1 })"
:loading="loading"
>查询</el-button
>
<el-button @click="resetFn" type="success">清空</el-button> <el-button @click="resetFn" type="success">清空</el-button>
<el-button v-hasPermi="['customerManage:customer:query']" type="primary" style="background: #fa7216; color: #ffffff; border-color: #fa7216" @click="newAdd()">新增任务</el-button> <el-button
v-hasPermi="['customerManage:customer:query']"
type="primary"
style="background: #fa7216; color: #ffffff; border-color: #fa7216;"
@click="newAdd()"
>新增任务</el-button
>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table :data="tableData"> <el-table :data="tableData">
...@@ -101,7 +121,7 @@ ...@@ -101,7 +121,7 @@
<el-table-column prop="fissStatus" label="活动状态"> <el-table-column prop="fissStatus" label="活动状态">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<p> <p>
{{ { 0: '待开始', 1: '进行中', 2: '已结束', }[row.fissStatus] }} {{ { '-1': '失败', 0: '待开始', 1: '进行中', 2: '已结束' }[row.fissStatus] }}
</p> </p>
</template> </template>
</el-table-column> </el-table-column>
...@@ -112,12 +132,24 @@ ...@@ -112,12 +132,24 @@
</el-table-column> </el-table-column>
<el-table-column prop="operation" label="操作"> <el-table-column prop="operation" label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button @click="toDetail(scope.row)" v-hasPermi="['enterpriseWechat:view']" size="medium" type="text" icon="el-icon-view"></el-button> <el-button
@click="toDetail(scope.row)"
v-hasPermi="['enterpriseWechat:view']"
size="medium"
type="text"
icon="el-icon-view"
></el-button>
<!-- <el-button v-if="scope.row.fissStatus != 2" @click="toEdit(scope.row)" v-hasPermi="['enterpriseWechat:edit']" size="medium" type="text" icon="el-icon-edit-outline" style="color: #e74e59"></el-button> --> <!-- <el-button v-if="scope.row.fissStatus != 2" @click="toEdit(scope.row)" v-hasPermi="['enterpriseWechat:edit']" size="medium" type="text" icon="el-icon-edit-outline" style="color: #e74e59"></el-button> -->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination v-show="total > 0" :total="total" :page.sync="query.pageNum" :limit.sync="query.pageSize" @pagination="getList()" /> <pagination
v-show="total > 0"
:total="total"
:page.sync="query.pageNum"
:limit.sync="query.pageSize"
@pagination="getList()"
/>
</div> </div>
</template> </template>
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
name: 'Dimission', name: 'Dimission',
components: { SelectWeUser }, components: { SelectWeUser },
props: {}, props: {},
data () { data() {
return { return {
// 查询参数 // 查询参数
query: { query: {
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
}, },
watch: {}, watch: {},
computed: {}, computed: {},
created () { created() {
this.getList() this.getList()
this.$store.dispatch( this.$store.dispatch(
'app/setBusininessDesc', 'app/setBusininessDesc',
...@@ -40,10 +40,10 @@ ...@@ -40,10 +40,10 @@
` `
) )
}, },
mounted () { }, mounted() {},
methods: { methods: {
/** 查询 */ /** 查询 */
getList (page) { getList(page) {
if (this.dateRange) { if (this.dateRange) {
this.query.beginTime = this.dateRange[0] this.query.beginTime = this.dateRange[0]
this.query.endTime = this.dateRange[1] this.query.endTime = this.dateRange[1]
...@@ -64,18 +64,18 @@ ...@@ -64,18 +64,18 @@
this.loading = false this.loading = false
}) })
}, },
resetForm (formName) { resetForm(formName) {
this.dateRange = [] this.dateRange = []
this.$refs['queryForm'].resetFields() this.$refs['queryForm'].resetFields()
}, },
showSelectDialog () { showSelectDialog() {
if (this.currentRow.userId) { if (this.currentRow.userId) {
this.dialogVisibleSelectUser = true this.dialogVisibleSelectUser = true
} else { } else {
this.$message.warning('请先选择一位员工') this.$message.warning('请先选择一位员工')
} }
}, },
allocate (userlist) { allocate(userlist) {
if (userlist.length > 1) { if (userlist.length > 1) {
this.dialogVisibleSelectUser = true this.dialogVisibleSelectUser = true
return return
...@@ -96,15 +96,15 @@ ...@@ -96,15 +96,15 @@
}) })
}, },
// // 选中数据 // // 选中数据
// handleCurrentChange(val) { handleCurrentChange(val) {
// this.currentRow = val this.currentRow = val
// }, },
// 多选框选中数据 // 多选框选中数据
handleSelectionChange (selection) { handleSelectionChange(selection) {
this.currentRow = selection[0] this.currentRow = selection[0]
}, },
// 用于多选变单选 // 用于多选变单选
handleSelection (selection, row) { handleSelection(selection, row) {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.table.clearSelection() this.$refs.table.clearSelection()
this.$refs.table.toggleRowSelection(row) this.$refs.table.toggleRowSelection(row)
...@@ -121,7 +121,16 @@ ...@@ -121,7 +121,16 @@
<el-input v-model="query.userName" placeholder="请输入"></el-input> <el-input v-model="query.userName" placeholder="请输入"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="离职日期"> <el-form-item label="离职日期">
<el-date-picker v-model="dateRange" type="daterange" value-format="yyyy-MM-dd" :picker-options="pickerOptions" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" align="right"></el-date-picker> <el-date-picker
v-model="dateRange"
type="daterange"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
align="right"
></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label> <el-form-item label>
...@@ -142,7 +151,16 @@ ...@@ -142,7 +151,16 @@
</div> </div>
</div> </div>
<el-table v-loading="loading" ref="multipleTable" :data="list" tooltip-effect="dark" style="width: 100%" highlight-current-row @select="handleSelection" @selection-change="handleSelectionChange"> <el-table
v-loading="loading"
ref="multipleTable"
:data="list"
tooltip-effect="dark"
style="width: 100%;"
highlight-current-row
@select="handleSelection"
@selection-change="handleSelectionChange"
>
<!-- <el-table-column type="selection" align="center" width="55"> </el-table-column> --> <!-- <el-table-column type="selection" align="center" width="55"> </el-table-column> -->
<el-table-column type="index" label="序号" width="55"></el-table-column> <el-table-column type="index" label="序号" width="55"></el-table-column>
<el-table-column prop="userName" label="已离职员工"></el-table-column> <el-table-column prop="userName" label="已离职员工"></el-table-column>
...@@ -159,7 +177,13 @@ ...@@ -159,7 +177,13 @@
</el-table-column>--> </el-table-column>-->
</el-table> </el-table>
<pagination v-show="total > 0" :total="total" :page.sync="query.pageNum" :limit.sync="query.pageSize" @pagination="getList()" /> <pagination
v-show="total > 0"
:total="total"
:page.sync="query.pageNum"
:limit.sync="query.pageSize"
@pagination="getList()"
/>
<!-- 选择添加人弹窗 --> <!-- 选择添加人弹窗 -->
<SelectWeUser :visible.sync="dialogVisibleSelectUser" title="选择分配人" @success="allocate"></SelectWeUser> <SelectWeUser :visible.sync="dialogVisibleSelectUser" title="选择分配人" @success="allocate"></SelectWeUser>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!