|
@@ -8,7 +8,8 @@
|
|
@cancel="cancel()"
|
|
@cancel="cancel()"
|
|
>
|
|
>
|
|
<article>
|
|
<article>
|
|
- <h2 class="form-title">需求范围</h2>
|
|
|
|
|
|
+ <h2 v-show="type==='require'" class="form-title">需求范围</h2>
|
|
|
|
+ <h2 v-show="type==='task'" class="form-title">任务范围</h2>
|
|
<el-form ref="form" :model="formData" label-width="100px" label-position="left">
|
|
<el-form ref="form" :model="formData" label-width="100px" label-position="left">
|
|
<el-form-item :label="type === 'require'?'需求方向':'任务方向'">
|
|
<el-form-item :label="type === 'require'?'需求方向':'任务方向'">
|
|
<el-select v-model="formData.direction" placeholder="请选择" size="small">
|
|
<el-select v-model="formData.direction" placeholder="请选择" size="small">
|
|
@@ -32,11 +33,11 @@
|
|
<h2 class="form-title">通知条件</h2>
|
|
<h2 class="form-title">通知条件</h2>
|
|
<el-form ref="form" :model="formData" label-width="100px" label-position="left">
|
|
<el-form ref="form" :model="formData" label-width="100px" label-position="left">
|
|
<el-form-item v-for="(item,index) in formData.conditionList" :key="'condition'+index" label="条件">
|
|
<el-form-item v-for="(item,index) in formData.conditionList" :key="'condition'+index" label="条件">
|
|
- <el-select v-model="item.type" placeholder="请选择" size="small" class="condition-select">
|
|
|
|
|
|
+ <el-select v-model="item.type" placeholder="请选择类型" size="small" class="condition-select">
|
|
<el-option v-for="key in typeList" :key="key.label" :label="key.label" :value="key.value" />
|
|
<el-option v-for="key in typeList" :key="key.label" :label="key.label" :value="key.value" />
|
|
</el-select>
|
|
</el-select>
|
|
- <el-select v-model="item.status" placeholder="请选择" size="small" class="condition-select">
|
|
|
|
- <el-option v-for="key in typeList" :key="key.label" :label="key.label" :value="key.value" />
|
|
|
|
|
|
+ <el-select v-model="item.status" placeholder="请选择状态" size="small" class="condition-select">
|
|
|
|
+ <el-option v-for="key in statusList" :key="'status'+key.code" :label="key.msg" :value="key.code" />
|
|
</el-select>
|
|
</el-select>
|
|
<el-select v-model="item.delay" placeholder="请选择" size="small" class="condition-select">
|
|
<el-select v-model="item.delay" placeholder="请选择" size="small" class="condition-select">
|
|
<el-option v-for="key in typeList" :key="key.label" :label="key.label" :value="key.value" />
|
|
<el-option v-for="key in typeList" :key="key.label" :label="key.label" :value="key.value" />
|
|
@@ -78,14 +79,18 @@
|
|
<div v-show="noticeList.DChart" class="add-notice" @click="addMembers(DChartList)"><i class="el-icon-circle-plus-outline" /> 添加人群</div>
|
|
<div v-show="noticeList.DChart" class="add-notice" @click="addMembers(DChartList)"><i class="el-icon-circle-plus-outline" /> 添加人群</div>
|
|
<!-- DChart群方式 -->
|
|
<!-- DChart群方式 -->
|
|
<el-checkbox v-model="noticeList.Group" class="notice-check">DChart群通知</el-checkbox>
|
|
<el-checkbox v-model="noticeList.Group" class="notice-check">DChart群通知</el-checkbox>
|
|
- <el-popover
|
|
|
|
- placement="bottom-start"
|
|
|
|
- width="280"
|
|
|
|
- trigger="click"
|
|
|
|
- >
|
|
|
|
- <section class="group-form">
|
|
|
|
- <el-form ref="groupForm" :model="GroupItem" :rules="groupRules" label-width="0" label-position="left">
|
|
|
|
- <el-form-item prop="name">
|
|
|
|
|
|
+ <div v-show="noticeList.Group" class="add-condition">
|
|
|
|
+ <ul v-show="GroupList.length>0" class="group-list">
|
|
|
|
+ <li v-for="(item,index) in GroupList" :key="'gourp-item'+ index" class="group-item">
|
|
|
|
+ <div>{{ item.name }}</div>
|
|
|
|
+ <div>{{ item.link }}</div>
|
|
|
|
+ <span><i class="el-icon-delete" @click.stop="removeGroup(index)" /></span>
|
|
|
|
+ </li>
|
|
|
|
+ </ul>
|
|
|
|
+ <span @click="showGroupForm = true"><i class="el-icon-circle-plus-outline" /> 添加DChart群</span>
|
|
|
|
+ <section v-if="showGroupForm" class="group-form">
|
|
|
|
+ <el-form ref="groupForm" :model="GroupItem" :rules="groupRules" label-width="200px" label-position="left">
|
|
|
|
+ <el-form-item prop="name" label="群名称或群ID">
|
|
<el-input
|
|
<el-input
|
|
v-model="GroupItem.name"
|
|
v-model="GroupItem.name"
|
|
type="textarea"
|
|
type="textarea"
|
|
@@ -94,7 +99,7 @@
|
|
:autosize="{ minRows: 1, maxRows: 5 }"
|
|
:autosize="{ minRows: 1, maxRows: 5 }"
|
|
/>
|
|
/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item prop="link">
|
|
|
|
|
|
+ <el-form-item prop="link" label="机器人webhook地址">
|
|
<el-input
|
|
<el-input
|
|
v-model="GroupItem.link"
|
|
v-model="GroupItem.link"
|
|
type="textarea"
|
|
type="textarea"
|
|
@@ -104,11 +109,12 @@
|
|
/>
|
|
/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
|
|
+ <div class="group-confirm">
|
|
|
|
+ <el-button size="small" @click.stop="showGroupForm = false">取消</el-button>
|
|
|
|
+ <el-button type="primary" size="small" @click.stop="addGroup()">确认</el-button>
|
|
|
|
+ </div>
|
|
</section>
|
|
</section>
|
|
- <div v-show="noticeList.Group" slot="reference" class="add-condition" @click="addGroup()">
|
|
|
|
- <i class="el-icon-circle-plus-outline" /> 添加DChart群
|
|
|
|
- </div>
|
|
|
|
- </el-popover>
|
|
|
|
|
|
+ </div>
|
|
</el-form>
|
|
</el-form>
|
|
</article>
|
|
</article>
|
|
</normal-dialog>
|
|
</normal-dialog>
|
|
@@ -144,7 +150,7 @@ export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
bizId: localStorage.getItem('bizId'),
|
|
bizId: localStorage.getItem('bizId'),
|
|
- title: '新建需求定时通知',
|
|
|
|
|
|
+ title: this.type === 'require' ? '新建需求定时通知' : '新建任务定时通知',
|
|
formData: {
|
|
formData: {
|
|
direction: null, // 方向
|
|
direction: null, // 方向
|
|
app: null, // 客户端
|
|
app: null, // 客户端
|
|
@@ -156,6 +162,7 @@ export default {
|
|
DChartList: [], // DChart系统通知列表
|
|
DChartList: [], // DChart系统通知列表
|
|
GroupList: [], // DChart群通知列表
|
|
GroupList: [], // DChart群通知列表
|
|
GroupItem: { name: null, link: null }, // 当前群添加对象
|
|
GroupItem: { name: null, link: null }, // 当前群添加对象
|
|
|
|
+ showGroupForm: false,
|
|
groupRules: {// 群填写规则
|
|
groupRules: {// 群填写规则
|
|
name: [{ required: true, message: '请填写群名称或群ID', trigger: 'change' }],
|
|
name: [{ required: true, message: '请填写群名称或群ID', trigger: 'change' }],
|
|
link: [{ required: true, message: '请填写机器人webhook地址', trigger: 'change' }]
|
|
link: [{ required: true, message: '请填写机器人webhook地址', trigger: 'change' }]
|
|
@@ -224,15 +231,6 @@ export default {
|
|
this.DChartList = []
|
|
this.DChartList = []
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- },
|
|
|
|
- 'noticeList.Group': {
|
|
|
|
- handler(newV, oldV) {
|
|
|
|
- if (newV) {
|
|
|
|
- if (this.GroupList.length === 0) this.GroupList.push({ name: null, link: null })
|
|
|
|
- } else {
|
|
|
|
- this.GroupList = []
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
@@ -250,13 +248,13 @@ export default {
|
|
async showRequireStatusEnum() { // 获取需求状态列表
|
|
async showRequireStatusEnum() { // 获取需求状态列表
|
|
const res = await showRequireStatusEnum(this.bizId)
|
|
const res = await showRequireStatusEnum(this.bizId)
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
- this.statusList = res.data || []
|
|
|
|
|
|
+ this.statusList = res.data.requirementStatus || []
|
|
}
|
|
}
|
|
},
|
|
},
|
|
async showTaskStatusEnum() { // 获取任务状态列表
|
|
async showTaskStatusEnum() { // 获取任务状态列表
|
|
const res = await showTaskStatusEnum(this.bizId)
|
|
const res = await showTaskStatusEnum(this.bizId)
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
- this.statusList = res.data || []
|
|
|
|
|
|
+ this.statusList = res.data.taskStatus || []
|
|
}
|
|
}
|
|
},
|
|
},
|
|
async queryTeamInfoList() { // 获取用户团队列表
|
|
async queryTeamInfoList() { // 获取用户团队列表
|
|
@@ -269,11 +267,11 @@ export default {
|
|
if (this.type === 'require') {
|
|
if (this.type === 'require') {
|
|
this.typeList = [{ label: '需求状态', value: 0 }, { label: '需求事件', value: 1 }]
|
|
this.typeList = [{ label: '需求状态', value: 0 }, { label: '需求事件', value: 1 }]
|
|
this.noticeGroupList = [{ label: '需求成员', value: 0 }, { label: '团队', value: 1 }, { label: '自定义人员', value: 2 }]
|
|
this.noticeGroupList = [{ label: '需求成员', value: 0 }, { label: '团队', value: 1 }, { label: '自定义人员', value: 2 }]
|
|
- // this.showRequireStatusEnum()
|
|
|
|
|
|
+ this.showRequireStatusEnum()
|
|
} else {
|
|
} else {
|
|
this.typeList = [{ label: '任务状态', value: 0 }, { label: '任务事件', value: 1 }]
|
|
this.typeList = [{ label: '任务状态', value: 0 }, { label: '任务事件', value: 1 }]
|
|
this.noticeGroupList = [{ label: '任务成员', value: 0 }, { label: '团队', value: 1 }, { label: '自定义人员', value: 2 }]
|
|
this.noticeGroupList = [{ label: '任务成员', value: 0 }, { label: '团队', value: 1 }, { label: '自定义人员', value: 2 }]
|
|
- // this.showTaskStatusEnum()
|
|
|
|
|
|
+ this.showTaskStatusEnum()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
addCondition() { // 添加条件
|
|
addCondition() { // 添加条件
|
|
@@ -289,7 +287,11 @@ export default {
|
|
list.splice(index, 1)
|
|
list.splice(index, 1)
|
|
},
|
|
},
|
|
addGroup() { // 添加DChart群
|
|
addGroup() { // 添加DChart群
|
|
- this.GroupList.push({ name: null, link: null })
|
|
|
|
|
|
+ this.GroupList.push({
|
|
|
|
+ ...this.GroupItem
|
|
|
|
+ })
|
|
|
|
+ this.GroupItem = { name: null, link: null }
|
|
|
|
+ this.showGroupForm = false
|
|
},
|
|
},
|
|
removeGroup(index) { // 移除DChart群
|
|
removeGroup(index) { // 移除DChart群
|
|
this.GroupList.splice(index, 1)
|
|
this.GroupList.splice(index, 1)
|
|
@@ -306,7 +308,12 @@ export default {
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
|
|
+article::-webkit-scrollbar{
|
|
|
|
+ display: none;
|
|
|
|
+}
|
|
article{
|
|
article{
|
|
|
|
+ max-height: 500px;
|
|
|
|
+ overflow: scroll;
|
|
padding: 0 45px;
|
|
padding: 0 45px;
|
|
.form-title {
|
|
.form-title {
|
|
margin: 0;
|
|
margin: 0;
|
|
@@ -332,6 +339,7 @@ article{
|
|
.add-condition,.add-notice {
|
|
.add-condition,.add-notice {
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
color: #409EFF;
|
|
color: #409EFF;
|
|
|
|
+ position: relative;
|
|
}
|
|
}
|
|
.add-notice {
|
|
.add-notice {
|
|
margin-left: 100px;
|
|
margin-left: 100px;
|
|
@@ -353,13 +361,68 @@ article{
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.group-form {
|
|
.group-form {
|
|
|
|
+ width: 280px;
|
|
|
|
+ position: absolute;
|
|
|
|
+ bottom: 30px;
|
|
|
|
+ left: 0;
|
|
|
|
+ padding: 10px;
|
|
|
|
+ z-index: 99;
|
|
|
|
+ background:rgba(255,255,255,1);
|
|
|
|
+ box-shadow:0px 0px 12px rgba(0,0,0,0.1);
|
|
/deep/.el-form-item{
|
|
/deep/.el-form-item{
|
|
display: flex;
|
|
display: flex;
|
|
|
|
+ flex-direction: column;
|
|
|
|
+ margin-bottom: 10px;
|
|
.el-form-item__content {
|
|
.el-form-item__content {
|
|
- margin: 0;
|
|
|
|
|
|
+ margin: 0 !important;
|
|
width: 100%;
|
|
width: 100%;
|
|
line-height: 10px;
|
|
line-height: 10px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ .group-confirm {
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ margin-top: 20px;
|
|
|
|
+ button:nth-child(1) {
|
|
|
|
+ margin-right: 10px;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+.group-list{
|
|
|
|
+ margin: 0;
|
|
|
|
+ padding: 0;
|
|
|
|
+ list-style: none;
|
|
|
|
+ width: 100%;
|
|
|
|
+ color: #333333;
|
|
|
|
+ font-size: 14px;
|
|
|
|
+ .group-item {
|
|
|
|
+ margin: 0;
|
|
|
|
+ padding: 0;
|
|
|
|
+ list-style: none;
|
|
|
|
+ width: 100%;
|
|
|
|
+ display: grid;
|
|
|
|
+ grid-template-columns: 30% 60% 10%;
|
|
|
|
+ border:1px solid rgba(209,208,208,1);
|
|
|
|
+ height:37px;
|
|
|
|
+ border-radius: 4px;
|
|
|
|
+ margin-bottom: 10px;
|
|
|
|
+ align-items: center;
|
|
|
|
+ div{
|
|
|
|
+ border-right:1px solid rgba(209,208,208,1);
|
|
|
|
+ overflow: hidden;
|
|
|
|
+ text-overflow: ellipsis;
|
|
|
|
+ white-space: nowrap;
|
|
|
|
+ text-align: center;
|
|
|
|
+ line-height: 37px;
|
|
|
|
+ padding: 0 5px;
|
|
|
|
+ }
|
|
|
|
+ span {
|
|
|
|
+ height: 100%;
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ font-size: 18px;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|